PageSourceSearch

https://www.teachertube.com/dist/vendors.js?v=tLv67GWfxvT220KOaEYvfVfmc_hlVCjV_weQjgFyM8s

js teachertube.com collected 2026-10-01 10:29:27 UTC 1,879,032 bytes, 157 lines download raw bytes

vendor: 6,717 bytes, line 1
1(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(e,t,n){"use strict";function i(){}n.d(t,"a",function(){return m}),n.d(t,"b",function(){return Kn}),n.d(t,"c",function(){return Dn}),n.d(t,"d",function(){return qn}),n.d(t,"e",function(){return ws}),n.d(t,"f",function(){return Na}),n.d(t,"g",function(){return hn}),n.d(t,"h",function(){return Ci}),n.d(t,"i",function(){return g}),n.d(t,"j",function(){return En}),n.d(t,"k",function(){return i}),n.d(t,"l",function(){return rn}),n.d(t,"m",function(){return ge}),n.d(t,"n",function(){return l}),n.d(t,"o",function(){return Mt}),n.d(t,"p",function(){return an}),n.d(t,"q",function(){return vi}),n.d(t,"r",function(){return gi}),n.d(t,"s",function(){return he}),n.d(t,"t",function(){return Rn}),n.d(t,"u",function(){return sl}),n.d(t,"v",function(){return na}),n.d(t,"w",function(){return Qn}),n.d(t,"x",function(){return Ct}),n.d(t,"y",function(){return s}),n.d(t,"z",function(){return De}),n.d(t,"A",function(){return Oe}),n.d(t,"B",function(){return mu}),n.d(t,"C",function(){return ya}),n.d(t,"D",function(){return gn}),n.d(t,"E",function(){return hi}),n.d(t,"F",function(){return No}),n.d(t,"G",function(){return Ta}),n.d(t,"H",function(){return ba}),n.d(t,"I",function(){return Bl}),n.d(t,"J",function(){return Kt}),n.d(t,"K",function(){return Rt}),n.d(t,"L",function(){return It}),n.d(t,"M",function(){return Da}),n.d(t,"N",function(){return Qt}),n.d(t,"O",function(){return ma}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}),Object.assign(i.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),i=0,r=n.length;i<r;i++)n[i].call(this,e)}}}});var r,a,o,s="105",l={LEFT:0,MIDDLE:1,RIGHT:2},u=0,d=1,c=2,f=1,h=2,p=0,m=1,g=2,v=0,y=0,_=1,E=2,b=3,T=4,w=5,A=100,S=101,x=102,M=103,R=104,C=200,I=201,L=202,O=203,D=204,P=205,N=206,k=207,F=208,B=209,U=210,j=0,G=1,V=2,H=3,z=4,W=5,q=6,Y=7,K=0,X=1,Q=2,Z=0,J=1,$=2,ee=3,te=4,ne=5,ie=301,re=302,ae=303,oe=304,se=305,le=306,ue=307,de=1e3,ce=1001,fe=1002,he=1003,pe=1004,me=1005,ge=1006,ve=1007,ye=1008,_e=1009,Ee=1010,be=1011,Te=1012,we=1013,Ae=1014,Se=1015,xe=1016,Me=1017,Re=1018,Ce=1019,Ie=1020,Le=1021,Oe=1022,De=1023,Pe=1024,Ne=1025,ke=1026,Fe=1027,Be=1028,Ue=33776,je=33777,Ge=33778,Ve=33779,He=35840,ze=35841,We=35842,qe=35843,Ye=36196,Ke=37808,Xe=37809,Qe=37810,Ze=37811,Je=37812,$e=37813,et=37814,tt=37815,nt=37816,it=37817,rt=37818,at=37819,ot=37820,st=37821,lt=2300,ut=2301,dt=2302,ct=2400,ft=2401,ht=2402,pt=0,mt=1,gt=2,vt=3e3,yt=3001,_t=3007,Et=3002,bt=3004,Tt=3005,wt=3006,At=3200,St=3201,xt=1,Mt={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return function(){var t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]+"-"+e[255&n]+e[n>>8&255]+"-"+e[n>>16&15|64]+e[n>>24&255]+"-"+e[63&i|128]+e[i>>8&255]+"-"+e[i>>16&255]+e[i>>24&255]+e[255&r]+e[r>>8&255]+e[r>>16&255]+e[r>>24&255]).toUpperCase()}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Mt.DEG2RAD},radToDeg:function(e){return e*Mt.RAD2DEG},isPowerOfTwo:function(e){return!(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function Rt(e,t){this.x=e||0,this.y=t||0}function Ct(e,t,n,i){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==i?i:1}function It(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function Lt(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(Rt.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(Rt.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.
vendor: 5,732 bytes, line 1
1y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},cross:function(e){return this.x*e.y-this.y*e.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*i+e.x,this.y=r*i+a*n+e.y,this}}),Object.assign(Ct,{slerp:function(e,t,n,i){return n.copy(e).slerp(t,i)},slerpFlat:function(e,t,n,i,r,a,o){var s=n[i+0],l=n[i+1],u=n[i+2],d=n[i+3],c=r[a+0],f=r[a+1],h=r[a+2],p=r[a+3];if(d!==p||s!==c||l!==f||u!==h){var m=1-o,g=s*c+l*f+u*h+d*p,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var _=Math.sqrt(y),E=Math.atan2(_,g*v);m=Math.sin(m*E)/_,o=Math.sin(o*E)/_}var b=o*v;if(s=s*m+c*b,l=l*m+f*b,u=u*m+h*b,d=d*m+p*b,m===1-o){var T=1/Math.sqrt(s*s+l*l+u*u+d*d);s*=T,l*=T,u*=T,d*=T}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=d}}),Object.defineProperties(Ct.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this.onChangeCallback()}}}),Object.assign(Ct.prototype,{isQuaternion:!0,set:function(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,i=e._y,r=e._z,a=e.order,o=Math.cos,s=Math.sin,l=o(n/2),u=o(i/2),d=o(r/2),c=s(n/2),f=s(i/2),h=s(r/2);return"XYZ"===a?(this._x=c*u*d+l*f*h,this._y=l*f*d-c*u*h,this._z=l*u*h+c*f*d,this._w=l*u*d-c*f*h):"YXZ"===a?(this._x=c*u*d+l*f*h,this._y=l*f*d-c*u*h,this._z=l*u*h-c*f*d,this._w=l*u*d+c*f*h):"ZXY"===a?(this._x=c*u*d-l*f*h,this._y=l*f*d+c*u*h,this._z=l*u*h+c*f*d,this._w=l*u*d-c*f*h):"ZYX"===a?(this._x=c*u*d-l*f*h,this._y=l*f*d+c*u*h,this._z=l*u*h-c*f*d,this._w=l*u*d+c*f*h):"YZX"===a?(this._x=c*u*d+l*f*h,this._y=l*f*d+c*u*h,this._z=l*u*h-c*f*d,this._w=l*u*d-c*f*h):"XZY"===a&&(this._x=c*u*d-l*f*h,this._y=l*f*d-c*u*h,this._z=l*u*h+c*f*d,this._w=l*u*d+c*f*h),!1!==t&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,i=n[0],r=n[4],a=n[8],o=n[1],s=n[5],l=n[9],u=n[2],d=n[6],c=n[10],f=i+s+c;return f>0?(t=.5/Math.sqrt(f+1),this._w=.25/t,this._x=(d-l)*t,this._y=(a-u)*t,this._z=(o-r)*t):i>s&&i>c?(t=2*Math.sqrt(1+i-s-c),this._w=(d-l)/t,this._x=.25*t,this._y=(r+o)/t,this._z=(a+u)/t):s>c?(t=2*Math.sqrt(1+s-i-c),this._w=(a-u)/t,this._x=(r+o)/t,this._y=.25*t,this._z=(l+d)/t):(t=2*Math.sqrt(1+c-i-s),this._w=(o-r)/t,this._x=(a+u)/t,this._y=(l+d)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>
vendor: 5,323 bytes, line 1
1Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(Mt.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var i=Math.min(1,t/n);return this.slerp(e,i),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,i=e._y,r=e._z,a=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+a*o+i*l-r*s,this._y=i*u+a*s+r*o-n*l,this._z=r*u+a*l+n*s-i*o,this._w=a*u-n*o-i*s-r*l,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,i=this._y,r=this._z,a=this._w,o=a*e._w+n*e._x+i*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=i,this._z=r,this;var s=1-o*o;if(s<=Number.EPSILON){var l=1-t;return this._w=l*a+t*this._w,this._x=l*n+t*this._x,this._y=l*i+t*this._y,this._z=l*r+t*this._z,this.normalize()}var u=Math.sqrt(s),d=Math.atan2(u,o),c=Math.sin((1-t)*d)/u,f=Math.sin(t*d)/u;return this._w=a*c+this._w*f,this._x=n*c+this._x*f,this._y=i*c+this._y*f,this._z=r*c+this._z*f,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(It.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:(a=new Ct,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(a.setFromEuler(e))}),applyAxisAngle:function(){var e=new Ct;return function(t,n){return this.applyQuaternion(e.setFromAxisAngle(t,n))}}(),applyMatrix3:function(e){var t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this},applyMatrix4:function(e){var t=this.x,n=this.y,i=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this},applyQuaternion:function(e){var t=this.x,n=this.y,i=this.z,r=e.x,a=e.
vendor: 6,437 bytes, line 1
1y,o=e.z,s=e.w,l=s*t+a*i-o*n,u=s*n+o*t-r*i,d=s*i+r*n-a*t,c=-r*t-a*n-o*i;return this.x=l*s+c*-r+u*-o-d*-a,this.y=u*s+c*-a+d*-r-l*-o,this.z=d*s+c*-o+l*-a-u*-r,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,i=e.y,r=e.z,a=t.x,o=t.y,s=t.z;return this.x=i*s-r*o,this.y=r*a-n*s,this.z=n*o-i*a,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:(r=new It,function(e){return r.copy(this).projectOnVector(e),this.sub(r)}),reflect:function(){var e=new It;return function(t){return this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(Mt.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}}),Object.assign(Lt.prototype,{isMatrix3:!0,set:function(e,t,n,i,r,a,o,s,l){var u=this.elements;return u[0]=e,u[1]=i,u[2]=o,u[3]=t,u[4]=r,u[5]=s,u[6]=n,u[7]=a,u[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var e=new It;return function(t){for(var n=0,i=t.count;n<i;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix3(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,i=t.elements,r=this.elements,a=n[0],o=n[3],s=n[6],l=n[1],u=n[4],d=n[7],c=n[2],f=n[5],h=n[8],p=i[0],m=i[3],g=i[6],v=i[1],y=i[4],_=i[7],E=i[2],b=i[5],T=i[8];return r[0]=a*p+o*v+s*E,r[3]=a*m+o*y+s*b,r[6]=a*g+o*_+s*T,r[1]=l*p+u*v+d*E,r[4]=l*m+u*y+d*b,r[7]=l*g+u*_+d*T,r[2]=c*p+f*v+h*E,r[5]=c*m+f*y+h*b,r[8]=c*g+f*_+h*T,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*a*u-t*o*l-n*r*u+n*o*s+i*r*l-i*a*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matr
1ix4 argument.");var n=e.elements,i=this.elements,r=n[0],a=n[1],o=n[2],s=n[3],l=n[4],u=n[5],d=n[6],c=n[7],f=n[8],h=f*l-u*c,p=u*d-f*s,m=c*s-l*d,g=r*h+a*p+o*m;if(0===g){var v="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(v);return console.warn(v),this.identity()}var y=1/g;return i[0]=h*y,i[1]=(o*c-f*a)*y,i[2]=(u*a-o*l)*y,i[3]=p*y,i[4]=(f*r-o*d)*y,i[5]=(o*s-u*r)*y,i[6]=m*y,i[7]=(a*d-c*r)*y,i[8]=(l*r-a*s)*y,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,n,i,r,a,o){var s=Math.cos(r),l=Math.sin(r);this.set(n*s,n*l,-n*(s*a+l*o)+a+e,-i*l,i*s,-i*(-l*a+s*o)+o+t,0,0,1)},scale:function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},rotate:function(e){var t=Math.cos(e),n=Math.sin(e),i=this.elements,r=i[0],a=i[3],o=i[6],s=i[1],l=i[4],u=i[7];return i[0]=t*r+n*s,i[3]=t*a+n*l,i[6]=t*o+n*u,i[1]=-n*r+t*s,i[4]=-n*a+t*l,i[7]=-n*o+t*u,this},translate:function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this},equals:function(e){for(var t=this.elements,n=e.elements,i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}});var Ot,Dt,Pt,Nt,kt,Ft,Bt,Ut,jt,Gt,Vt,Ht,zt,Wt,qt={getDataURL:function(e){var t;if("undefined"==typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)t=e;else{void 0===o&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),o.width=e.width,o.height=e.height;var n=o.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=o}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},Yt=0;function Kt(e,t,n,i,r,a,o,s,l,u){Object.defineProperty(this,"id",{value:Yt++}),this.uuid=Mt.generateUUID(),this.name="",this.image=void 0!==e?e:Kt.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Kt.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:ce,this.wrapT=void 0!==i?i:ce,this.magFilter=void 0!==r?r:ge,this.minFilter=void 0!==a?a:ye,this.anisotropy=void 0!==l?l:1,this.format=void 0!==o?o:De,this.type=void 0!==s?s:_e,this.offset=new Rt(0,0),this.repeat=new Rt(1,1),this.center=new Rt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Lt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:vt,this.version=0,this.onUpdate=null}function Xt(e,t,n,i){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==i?i:1}function Qt(e,t,n){this.width=e,this.height=t,this.scissor=new Xt(0,0,e,t),this.scissorTest=!1,this.viewport=new Xt(0,0,e,t),n=n||{},this.texture=new Kt(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ge,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function Zt(e,t,n){Qt.call(this,e,t,n),this.samples=4}function Jt(e,t,n){Qt.call(this,e,t,n)}function $t(e,t,n,i,r,a,o,s,l,u,d,c){Kt.call(this,null,a,o,s,l,u,i,r,d,c),this.image={data:e,width:t,height:n},this.magFilter=void 0!==l?l:he,this.minFilter=void 0!==u?u:he,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function en(e,t){this.min=void 0!==e?e:new It(1/0,1/0,1/0),this.max=void 0!==t?t:new It(-1/0,-1/0,-1/0)}function tn(e,t){this.center=void 0!==e?e:new It,this.radius=void 0!==t?t:0}function nn(e,t){this.normal=void 0!==e?e:new It(1,0,0),this.constant=void 0!==t?t:0}function rn(e,t,n,i,r,a){this.planes=[void 0!==e?e:new nn,void 0!==t?t:new nn,void 0!==n?n:new nn,void 0!==i?i:new nn,void 0!==r?r:new nn,void 0!==a?a:new nn]}function an(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}Kt.DEFAULT_IMAGE=void 0,Kt.DEFAULT_MAPPING=300,Kt.prototype=Object.assign(Object.create(i.prototype),{constructor:Kt,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.t
vendor: 4,135 bytes, line 1
1ype,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var i=this.image;if(void 0===i.uuid&&(i.uuid=Mt.generateUUID()),!t&&void 0===e.images[i.uuid]){var r;if(Array.isArray(i)){r=[];for(var a=0,o=i.length;a<o;a++)r.push(qt.getDataURL(i[a]))}else r=qt.getDataURL(i);e.images[i.uuid]={uuid:i.uuid,url:r}}n.image=i.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case de:e.x=e.x-Math.floor(e.x);break;case ce:e.x=e.x<0?0:1;break;case fe:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case de:e.y=e.y-Math.floor(e.y);break;case ce:e.y=e.y<0?0:1;break;case fe:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(Kt.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Xt.prototype,{isVector4:!0,set:function(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,i=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*i+a[15]*r,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,i,r,a=.01,o=.1,s=e.elements,l=s[0],u=s[4],d=s[8],c=s[1],f=s[5],h=s[9],p=s[2],m=s[6],g=s[10];if(Math.abs(u-c)<a&&Math.abs(d-p)<a&&Math.abs(h-m)<a){if(Math.abs(u+c)<o&&Math.abs(d+p)<o&&Math.abs(h+m)<o&&Math.abs(l+f+g-3)<o)return this.set(1,0,0,0),this;t=Math.PI;var v=(l+1)/2,y=(f+1)/2,_=(g+1)/2,E=(u+c)/4,b=(d+p)/4,T=(h+m)/4;return v>y&&v>_?v<a?(n=0,i=.707106781,r=.707106781):(i=E/(n=Math.sqrt(v)),r=b/n):y>_?y<a?(n=.707106781,i=0,r=.707106781):(n=E/(i=Math.sqrt(y)),r=T/i):_<a?(n=.707106781,i=.707106781,r=0):(n=b/(r=Math.sqrt(_)),i=T/r),this.set(n,i,r,t),this}var w=Math.sqrt((m-h)*(m-h)+(d-p)*(d-p)+(c-u)*(c-u));
vendor: 12,623 bytes, line 1
1return Math.abs(w)<.001&&(w=1),this.x=(m-h)/w,this.y=(d-p)/w,this.z=(c-u)/w,this.w=Math.acos((l+f+g-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(e,t){return void 0===Ot&&(Ot=new Xt,Dt=new Xt),Ot.set(e,e,e,e),Dt.set(t,t,t,t),this.clamp(Ot,Dt)},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),Qt.prototype=Object.assign(Object.create(i.prototype),{constructor:Qt,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Zt.prototype=Object.assign(Object.create(Qt.prototype),{constructor:Zt,isWebGLMultisampleRenderTarget:!0,copy:function(e){return Qt.prototype.copy.call(this,e),this.samples=e.samples,this}}),Jt.prototype=Object.create(Qt.prototype),Jt.prototype.constructor=Jt,Jt.prototype.isWebGLRenderTargetCube=!0,$t.prototype=Object.create(Kt.prototype),$t.prototype.constructor=$t,$t.prototype.isDataTexture=!0,Object.assign(en.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,n=1/0,i=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,l=e.length;s<l;s+=3){var u=e[s],d=e[s+1],c=e[s+2];u<t&&(t=u),d<n&&(n=d),c<i&&(i=c),u>r&&(r=u),d>a&&(a=d),c>o&&(o=c)}return this.min.set(t,n,i),this.max.set(r,a,o),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,i=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,l=e.count;s<l;s++){var u=e.getX(s),d=e.getY(s),c=e.getZ(s);u<t&&(t=u),d<n&&(n=d),c<i&&(i=c),u>r&&(r=u),d>a&&(a=d),c>o&&(o=c)}return this.min.set(t,n,i),this.max.set(r,a,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new It;return function(t,n){var i=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}}(),setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new It),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new It),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(){var e,t,n,i=new It;function r(r){var a=r.geometry;if(void 0!==a)if(a.isGeometry){var o=a.vertices;for(t=0,n=o.length;t<n;t++)i.copy(o[t]),i.applyMatrix4(r.matrixWorld),e.expandByPoint(i)}else if(a.isBufferGeometry){var s=a.attributes.position;if(void 0!==s)for(t=0,n=s.count;t<n;t++)i.fromBufferAttribute(s,t).applyMatrix4(r.matrixWorld),e.expandByPoint(i)}}return function(t){return e=this,t.updateMatrixWorld(!0),t.traverse(r),this}}(),containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new It),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:(Nt=new It,function(e){return this.clampPoint(e.center,Nt),Nt.distanceToSquared(e.center)<=e.radius*e.radius}),intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},intersectsTriangle:function(){var e=new It,t=new It,n=new It,i=new It,r=new It,a=new It,o=new It,s=new It,l=new It,u=new It;function d(i){var r,a;for(r=0,a=i.length-3;r<=a;r+=3){o.fromArray(i,r);var s=l.x*Math.abs(o.x)+l.y*Math.abs(o.y)+l.z*Math.abs(o.z),u=e.dot(o),d=t.dot(o),c=n.dot(o);if(Math.max(-Math.max(u,d,c),Math.min(u,d,c))>s)return!1}return!0}return function(o){if(this.isEmpty())return!1;this.getCenter(s),l.subVectors(this.max,s),e.subVectors(o.a,s),t.subVectors(o.b,s),n.subVectors(o.c,s),i.subVectors(t,e),r.subVectors(n,t),a.subVectors(e,n);var c=[0,-i.z,i.y,0,-r.z,r.y,0,-a.z,a.y,i.z,0,-i.x,r.z,0,-r.x,a.z,0,-a.x,-i.y,i.x,0,-r.y,r.x,0,-a.y,a.x,0];return!!d(c)&&(!!d(c=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(i,r),d(c=[u.x,u.y,u.z])))}}(),clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new It),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new It;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),getBoundingSphere:function(){var e=new It;return function(t){return void 0===t&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(t.center),t.radius=.5*this.getSize(e).length(),t}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:(Pt=[new It,new It,new It,new It,new It,new It,new It,new It],function(e){return this.isEmpty()||(Pt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Pt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Pt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Pt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Pt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Pt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Pt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Pt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Pt)),this}),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(tn.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:(kt=new en,function(e,t){var n=this.center;void 0!==t?n.copy(t):kt.setFromPoints(e).getCenter(n);for(var i=0,r=0,a=e.length;r<a;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new It),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new en),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(nn.prototype,{set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new It,t=new It;return function(n,i,r){var a=e.subVectors(r,i).cross(t.subVectors(n,i)).normalize();return this.setFromNormalAndCoplanarPoint(a,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new It),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(){var e=new It;return function(t,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new It);var i=t.delta(e),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(t.start)?n.copy(t.start):void 0;
vendor: 4,632 bytes, line 1
1var a=-(t.start.dot(this.normal)+this.constant)/r;return a<0||a>1?void 0:n.copy(i).multiplyScalar(a).add(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new It),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new It,t=new Lt;return function(n,i){var r=i||t.getNormalMatrix(n),a=this.coplanarPoint(e).applyMatrix4(n),o=this.normal.applyMatrix3(r).normalize();return this.constant=-a.dot(o),this}}(),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(rn.prototype,{set:function(e,t,n,i,r,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,i=n[0],r=n[1],a=n[2],o=n[3],s=n[4],l=n[5],u=n[6],d=n[7],c=n[8],f=n[9],h=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(o-i,d-s,p-c,y-m).normalize(),t[1].setComponents(o+i,d+s,p+c,y+m).normalize(),t[2].setComponents(o+r,d+l,p+f,y+g).normalize(),t[3].setComponents(o-r,d-l,p-f,y-g).normalize(),t[4].setComponents(o-a,d-u,p-h,y-v).normalize(),t[5].setComponents(o+a,d+u,p+h,y+v).normalize(),this},intersectsObject:(Bt=new tn,function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Bt.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Bt)}),intersectsSprite:function(){var e=new tn;return function(t){return e.center.set(0,0,0),e.radius=.7071067811865476,e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,n=e.center,i=-e.radius,r=0;r<6;r++){if(t[r].distanceToPoint(n)<i)return!1}return!0},intersectsBox:(Ft=new It,function(e){for(var t=this.planes,n=0;n<6;n++){var i=t[n];if(Ft.x=i.normal.x>0?e.max.x:e.min.x,Ft.y=i.normal.y>0?e.max.y:e.min.y,Ft.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Ft)<0)return!1}return!0}),containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}}),Object.assign(an.prototype,{isMatrix4:!0,set:function(e,t,n,i,r,a,o,s,l,u,d,c,f,h,p,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=i,g[1]=r,g[5]=a,g[9]=o,g[13]=s,g[2]=l,g[6]=u,g[10]=d,g[14]=c,g[3]=f,g[7]=h,g[11]=p,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new an).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:function(){var e=new It;return function(t){var n=this.elements,i=t.elements,r=1/e.setFromMatrixColumn(t,0).length(),a=1/e.setFromMatrixColumn(t,1).length(),o=1/e.setFromMatrixColumn(t,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*a,n[5]=i[5]*a,n[6]=i[6]*a,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}}(),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,i=e.y,r=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(i),l=Math.sin(i),u=Math.cos(r),d=Math.sin(r);if("XYZ"===e.order){var c=a*u,f=a*d,h=o*u,p=o*d;t[0]=s*u,t[4]=-s*d,t[8]=l,t[1]=f+h*l,t[5]=c-p*l,t[9]=-o*s,t[2]=p-c*l,t[6]=h+f*l,t[10]=a*s}else if("YXZ"===e.order){var m=s*u,g=s*d,v=l*u,y=l*d;t[0]=m+y*o,t[4]=v*o-g,t[8]=a*l,t[1]=a*d,t[5]=a*u,t[9]=-o,t[2]=g*o-v,t[6]=y+m*o,t[10]=a*s}else if("ZXY"===e.order){m=s*u,g=s*d,v=l*u,y=l*d;t[0]=m-y*o,t[4]=-a*d,t[8]=v+g*o,t[1]=g+v*o,t[5]=a*u,t[9]=y-m*o,t[2]=-a*l,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){c=a*u,f=a*d,h=o*u,p=o*d;
vendor: 7,194 bytes, line 1
1t[0]=s*u,t[4]=h*l-f,t[8]=c*l+p,t[1]=s*d,t[5]=p*l+c,t[9]=f*l-h,t[2]=-l,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){var _=a*s,E=a*l,b=o*s,T=o*l;t[0]=s*u,t[4]=T-_*d,t[8]=b*d+E,t[1]=d,t[5]=a*u,t[9]=-o*u,t[2]=-l*u,t[6]=E*d+b,t[10]=_-T*d}else if("XZY"===e.order){_=a*s,E=a*l,b=o*s,T=o*l;t[0]=s*u,t[4]=-d,t[8]=l*u,t[1]=_*d+T,t[5]=a*u,t[9]=E*d-b,t[2]=b*d-E,t[6]=o*u,t[10]=T*d+_}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:(zt=new It(0,0,0),Wt=new It(1,1,1),function(e){return this.compose(zt,e,Wt)}),lookAt:(Gt=new It,Vt=new It,Ht=new It,function(e,t,n){var i=this.elements;return Ht.subVectors(e,t),0===Ht.lengthSq()&&(Ht.z=1),Ht.normalize(),Gt.crossVectors(n,Ht),0===Gt.lengthSq()&&(1===Math.abs(n.z)?Ht.x+=1e-4:Ht.z+=1e-4,Ht.normalize(),Gt.crossVectors(n,Ht)),Gt.normalize(),Vt.crossVectors(Ht,Gt),i[0]=Gt.x,i[4]=Vt.x,i[8]=Ht.x,i[1]=Gt.y,i[5]=Vt.y,i[9]=Ht.y,i[2]=Gt.z,i[6]=Vt.z,i[10]=Ht.z,this}),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,i=t.elements,r=this.elements,a=n[0],o=n[4],s=n[8],l=n[12],u=n[1],d=n[5],c=n[9],f=n[13],h=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],E=n[15],b=i[0],T=i[4],w=i[8],A=i[12],S=i[1],x=i[5],M=i[9],R=i[13],C=i[2],I=i[6],L=i[10],O=i[14],D=i[3],P=i[7],N=i[11],k=i[15];return r[0]=a*b+o*S+s*C+l*D,r[4]=a*T+o*x+s*I+l*P,r[8]=a*w+o*M+s*L+l*N,r[12]=a*A+o*R+s*O+l*k,r[1]=u*b+d*S+c*C+f*D,r[5]=u*T+d*x+c*I+f*P,r[9]=u*w+d*M+c*L+f*N,r[13]=u*A+d*R+c*O+f*k,r[2]=h*b+p*S+m*C+g*D,r[6]=h*T+p*x+m*I+g*P,r[10]=h*w+p*M+m*L+g*N,r[14]=h*A+p*R+m*O+g*k,r[3]=v*b+y*S+_*C+E*D,r[7]=v*T+y*x+_*I+E*P,r[11]=v*w+y*M+_*L+E*N,r[15]=v*A+y*R+_*O+E*k,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:function(){var e=new It;return function(t){for(var n=0,i=t.count;n<i;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix4(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),determinant:function(){var e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],a=e[1],o=e[5],s=e[9],l=e[13],u=e[2],d=e[6],c=e[10],f=e[14];return e[3]*(+r*s*d-i*l*d-r*o*c+n*l*c+i*o*f-n*s*f)+e[7]*(+t*s*f-t*l*c+r*a*c-i*a*f+i*l*u-r*s*u)+e[11]*(+t*l*d-t*o*f-r*a*d+n*a*f+r*o*u-n*l*u)+e[15]*(-i*o*u-t*s*d+t*o*c+i*a*d-n*a*c+n*s*u)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e,t,n){var i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this},getInverse:function(e,t){var n=this.elements,i=e.elements,r=i[0],a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],d=i[6],c=i[7],f=i[8],h=i[9],p=i[10],m=i[11],g=i[12],v=i[13],y=i[14],_=i[15],E=h*y*c-v*p*c+v*d*m-u*y*m-h*d*_+u*p*_,b=g*p*c-f*y*c-g*d*m+l*y*m+f*d*_-l*p*_,T=f*v*c-g*h*c+g*u*m-l*v*m-f*u*_+l*h*_,w=g*h*d-f*v*d-g*u*p+l*v*p+f*u*y-l*h*y,A=r*E+a*b+o*T+s*w;if(0===A){var S="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(S);return console.warn(S),this.identity()}var x=1/A;return n[0]=E*x,n[1]=(v*p*s-h*y*s-v*o*m+a*y*m+h*o*_-a*p*_)*x,n[2]=(u*y*s-v*d*s+v*o*c-a*y*c-u*o*_+a*d*_)*x,n[3]=(h*d*s-u*p*s-h*o*c+a*p*c+u*o*m-a*d*m)*x,n[4]=b*x,n[5]=(f*y*s-g*p*s+g*o*m-r*y*m-f*o*_+r*p*_)*x,n[6]=(g*d*s-l*y*s-g*o*c+r*y*c+l*o*_-r*d*_)*x,n[7]=(l*p*s-f*d*s+f*o*c-r*p*c-l*o*m+r*d*m)*x,n[8]=T*x,n[9]=(g*h*s-f*v*s-g*a*m+r*v*m+f*a*_-r*h*_)*x,n[10]=(l*v*s-g*u*s+g*a*c-r*v*c-l*a*_+r*u*_)*x,n[11]=(f*u*s-l*h*s-f*a*c+r*h*c+l*a*m-r*u*m)*x,n[12]=w*x,n[13]=(f*v*o-g*h*o+g*a*p-r*v*p-f*a*y+r*h*y)*x,n[14]=(g*u*o-l*v*o-g*a*d+r*v*d+l*a*y-r*u*y)*x,n[15]=(l*h*o-f*u*o+f*a*d-r*h*d-l*a*p+r*u*p)*x,this},scale:function(e){var t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),i=Math.sin(t),r=1-n,a=e.x,o=e.y,s=e.z,l=r*a,u=r*o;return this.set(l*a+n,l*o-i*s,l*s+i*o,0,l*o+i*s,u*o+n,u*s-i*a,0,l*s-i*o,u*s+i*a,r*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,n){var i=this.elements,r=t._x,a=t._y,o=t._z,s=t._w,l=r+r,u=a+a,d=o+o,c=r*l,f=r*u,h=r*d,p=a*u,m=a*d,g=o*d,v=s*l,y=s*u,_=s*d,E=n.x,b=n.y,T=n.z;return i[0]=(1-(p+g))*E,i[1]=(f+_)*E,i[2]=(h-y)*E,i[3]=0,i[4]=(f-_)*b,i[5]=(1-(c+g))*b,i[6]=(m+v)*b,i[7]=0,i[8]=(h+y)*T,i[9]=(m-v)*T,i[10]=(1-(c+p))*T,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},decompose:(Ut=new It,jt=new an,function(e,t,n){var i=this.elements,r=Ut.set(i[0],i[1],i[2]).length(),a=Ut.set(i[4],i[5],i[6]).length(),o=Ut.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],jt.copy(this);var s=1/r,l=1/a,u=1/o;return jt.elements[0]*=s,jt.elements[1]*=s,jt.elements[2]*=s,jt.elements[4]*=l,jt.elements[5]*=l,jt.elements[6]*=l,jt.elements[8]*=u,jt.elements[9]*=u,jt.elements[10]*=u,t.setFromRotationMatrix(jt),n.x=r,n.y=a,n.z=o,this}),makePerspective:function(e,t,n,i,r,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*r/(t-e),l=2*r/(n-i),u=(t+e)/(t-e),d=(n+i)/(n-i),c=-(a+r)/(a-r),f=-2*a*r/(a-r);return o[0]=s,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=l,o[9]=d,o[13]=0,o[2]=0,o[6]=0,o[10]=c,o[14]=f,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(e,t,n,i,r,a){var o=this.elements,s=1/(t-e),l=1/(n-i),u=1/(a-r),d=(t+e)*s,c=(n+i)*l,f=(a+r)*u;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-d,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-c,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-f,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}});var o
vendor: 52,246 bytes, line 1
1n={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = normalMatrix * objectTangent;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif",lights_pars_begin:"uniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#endif\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\tfloat clearCoatInv = 1.0 - clearCoatDHR;\n\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec3 singleScattering = vec3( 0.0 );\n\t\tvec3 multiScattering = vec3( 0.0 );\n\t\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\t\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;\n\t\treflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;\n\t\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\t#else\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#endif\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, irradiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t#endif\n#endif",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalMatrix * normal );\n\t#else\n\t\t#ifdef USE_TANGENT\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy = normalScale * mapN.xy;\n\t\t\tnormal = normalize( vTBN * mapN );
vendor: 14,671 bytes, line 1
1\n\t\t#else\n\t\t\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n\t\t#endif\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dFdx( vUv.st );\n\t\t\tvec2 st1 = dFdy( vUv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( S, T, N );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *= normalScale;\n\t\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#if defined( DITHERING )\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;
vendor: 25,086 bytes, line 1
1\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n
1void main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"};function sn(e){var t={};for(var n in e)for(var i in t[n]={},e[n]){var r=e[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?t[n][i]=r.clone():Array.isArray(r)?t[n][i]=r.slice():t[n][i]=r}return t}function ln(e){for(var t={},n=0;n<e.length;n++){var i=sn(e[n]);for(var r in i)t[r]=i[r]}return t}var un,dn,cn,fn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpur
vendor: 4,142 bytes, line 1
1ple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function hn(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}Object.assign(hn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(){function e(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}return function(t,n,i){if(t=Mt.euclideanModulo(t,1),n=Mt.clamp(n,0,1),i=Mt.clamp(i,0,1),0===n)this.r=this.g=this.b=i;else{var r=i<=.5?i*(1+n):i+n-i*n,a=2*i-r;this.r=e(a,r,t+1/3),this.g=e(a,r,t),this.b=e(a,r,t-1/3)}return this}}(),setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var i,r=n[1],a=n[2];switch(r){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,t(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,t(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,l=parseInt(i[3],10)/100;return t(i[5]),this.setHSL(o,s,l)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var u,d=(u=n[1]).length;if(3===d)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}e&&e.length>0&&(void 0!==(u=fn[e])?this.setHex(u):console.warn("THREE.Color: Unknown color "+e));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},copySRGBToLinear:function(){function e(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(t){return this.r=e(t.r),this.g=e(t.g),this.b=e(t.b),this}}(),copyLinearToSRGB:function(){function e(e){return e<.0031308?12.92*e:1.055*M
vendor: 5,196 bytes, line 1
1ath.pow(e,.41666)-.055}return function(t){return this.r=e(t.r),this.g=e(t.g),this.b=e(t.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,i=this.r,r=this.g,a=this.b,o=Math.max(i,r,a),s=Math.min(i,r,a),l=(s+o)/2;if(s===o)t=0,n=0;else{var u=o-s;switch(n=l<=.5?u/(o+s):u/(2-o-s),o){case i:t=(r-a)/u+(r<a?6:0);break;case r:t=(a-i)/u+2;break;case a:t=(i-r)/u+4}t/=6}return e.h=t,e.s=n,e.l=l,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(cn={},function(e,t,n){return this.getHSL(cn),cn.h+=e,cn.s+=t,cn.l+=n,this.setHSL(cn.h,cn.s,cn.l),this}),add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},lerpHSL:(un={h:0,s:0,l:0},dn={h:0,s:0,l:0},function(e,t){this.getHSL(un),e.getHSL(dn);var n=Mt.lerp(un.h,dn.h,t),i=Mt.lerp(un.s,dn.s,t),r=Mt.lerp(un.l,dn.l,t);return this.setHSL(n,i,r),this}),equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}});var pn,mn={common:{diffuse:{value:new hn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Lt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Rt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new hn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new hn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Lt}},sprite:{diffuse:{value:new hn(15658734)},opacity:{value:1},center:{value:new Rt(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new Lt}}},gn={basic:{uniforms:ln([mn.common,mn.specularmap,mn.envmap,mn.aomap,mn.lightmap,mn.fog]),vertexShader:on.meshbasic_vert,fragmentShader:on.meshbasic_frag},lambert:{uniforms:ln([mn.common,mn.specularmap,mn.envmap,mn.aomap,mn.lightmap,mn.emissivemap,mn.fog,mn.lights,{emissive:{value:new hn(0)}}]),vertexShader:on.meshlambert_vert,fragmentShader:on.meshlambert_frag},phong:{uniforms:ln([mn.common,mn.specularmap,mn.envmap,mn.aomap,mn.lightmap,mn.emissivemap,mn.bumpmap,mn.normalmap,mn.displacementmap,mn.gradientmap,mn.fog,mn.lights,{emissive:{value:new hn(0)},specular:{value:new hn(1118481)},shininess:{value:30}}]),vertexShader:on.meshphong_vert,fragmentShader:on.meshphong_frag},standard:{uniforms:ln([mn.common,mn.envmap,mn.aomap,mn.lightmap,mn.emissivemap,mn.bumpmap,mn.normalmap,mn.displacementmap,mn.roughnessmap,mn.metalnessmap,mn.fog,mn.lights,{emissive:{value:new hn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:on.meshphysical_vert,fragmentShader:on.meshphysical_frag},matcap:{uniforms:ln([mn.common,mn.bumpmap,mn.normalmap,mn.displacementmap,mn.fog,{matc
vendor: 8,576 bytes, line 1
1ap:{value:null}}]),vertexShader:on.meshmatcap_vert,fragmentShader:on.meshmatcap_frag},points:{uniforms:ln([mn.points,mn.fog]),vertexShader:on.points_vert,fragmentShader:on.points_frag},dashed:{uniforms:ln([mn.common,mn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:on.linedashed_vert,fragmentShader:on.linedashed_frag},depth:{uniforms:ln([mn.common,mn.displacementmap]),vertexShader:on.depth_vert,fragmentShader:on.depth_frag},normal:{uniforms:ln([mn.common,mn.bumpmap,mn.normalmap,mn.displacementmap,{opacity:{value:1}}]),vertexShader:on.normal_vert,fragmentShader:on.normal_frag},sprite:{uniforms:ln([mn.sprite,mn.fog]),vertexShader:on.sprite_vert,fragmentShader:on.sprite_frag},background:{uniforms:{uvTransform:{value:new Lt},t2D:{value:null}},vertexShader:on.background_vert,fragmentShader:on.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:on.cube_vert,fragmentShader:on.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:on.equirect_vert,fragmentShader:on.equirect_frag},distanceRGBA:{uniforms:ln([mn.common,mn.displacementmap,{referencePosition:{value:new It},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:on.distanceRGBA_vert,fragmentShader:on.distanceRGBA_frag},shadow:{uniforms:ln([mn.lights,mn.fog,{color:{value:new hn(0)},opacity:{value:1}}]),vertexShader:on.shadow_vert,fragmentShader:on.shadow_frag}};function vn(){var e=null,t=!1,n=null;function i(r,a){!1!==t&&(n(r,a),e.requestAnimationFrame(i))}return{start:function(){!0!==t&&null!==n&&(e.requestAnimationFrame(i),t=!0)},stop:function(){t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function yn(e){var t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var i=t.get(n);i&&(e.deleteBuffer(i.buffer),t.delete(n))},update:function(n,i){n.isInterleavedBufferAttribute&&(n=n.data);var r=t.get(n);void 0===r?t.set(n,function(t,n){var i=t.array,r=t.dynamic?35048:35044,a=e.createBuffer();e.bindBuffer(n,a),e.bufferData(n,i,r),t.onUploadCallback();var o=5126;return i instanceof Float32Array?o=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?o=5123:i instanceof Int16Array?o=5122:i instanceof Uint32Array?o=5125:i instanceof Int32Array?o=5124:i instanceof Int8Array?o=5120:i instanceof Uint8Array&&(o=5121),{buffer:a,type:o,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(n,i)):r.version<n.version&&(!function(t,n,i){var r=n.array,a=n.updateRange;e.bindBuffer(i,t),!1===n.dynamic?e.bufferData(i,r,35044):-1===a.count?e.bufferSubData(i,0,r):0===a.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(e.bufferSubData(i,a.offset*r.BYTES_PER_ELEMENT,r.subarray(a.offset,a.offset+a.count)),a.count=-1)}(r.buffer,n,i),r.version=n.version)}}}function _n(e,t,n,i,r,a){this.a=e,this.b=t,this.c=n,this.normal=i&&i.isVector3?i:new It,this.vertexNormals=Array.isArray(i)?i:[],this.color=r&&r.isColor?r:new hn,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==a?a:0}function En(e,t,n,i){this._x=e||0,this._y=t||0,this._z=n||0,this._order=i||En.DefaultOrder}function bn(){this.mask=1}gn.physical={uniforms:ln([gn.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:on.meshphysical_vert,fragmentShader:on.meshphysical_frag},Object.assign(_n.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,n=e.vertexColors.length;t<n;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}}),En.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],En.DefaultOrder="XYZ",Object.defineProperties(En.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback()}}}),Object.assign(En.prototype,{isEuler:!0,set:function(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._order=i||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,n){var i=Mt.clamp,r=e.elements,a=r[0],o=r[4],s=r[8],l=r[1],u=r[5],d=r[9],c=r[2],f=r[6],h=r[10];return"XYZ"===(t=t||this._order)?(this._y=Math.asin(i(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(f,u),this._z=0)):"YXZ"===t?(this._x=Math.asin(-i(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(s,h),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-c,a),this._z=0)):"ZXY"===t?(this._x=Math.asin(i(f,-1,1)),Math.abs(f)<.99999?(this._y=Math.atan2(-c,h),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,a))):"ZYX"===t?(this._y=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(f,h),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,u))):"YZX"===t?(this._z=Math.asin(i(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-c,a)):(this._x=0,this._y=Math.atan2(s,h))):"XZY"===t?(this._z=Math.asin(-i(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(f,u),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-d,h),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var e=new an;return function(t,n,i){return e.makeRotationFromQuaternion(t),this.setFromRotationMatrix(e,n,i)}}(),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:(pn=new Ct,function(e){return pn.setFromEuler(this),this.setFromQuaternion(pn,e)}),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new It(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(bn.prototype,{set:function(e){this.mask=1<<e},enable:function(e){this.mask|=1<<e},toggle:function(e){this.mask^=1<<e},disable:function(e){this.mask&=~(1<<e)},test:function(e){return 0!==(this.mask&e.mask)}});var Tn,wn,An,Sn,xn,Mn=0;function Rn(){Object.defineProperty(this,"id",{value:Mn++}),this.uuid=Mt.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Rn.DefaultUp.clone();var e=new It,t=new En,n=new Ct,i=new It(1,1,1);t.onChange(function(){n.setFromEuler(t,!1)}),n.onChange(function(){t.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new an},normalMatrix:{value:new Lt}}),this.matrix=new an,this.matrixWorld=new an,this.matrixAutoUpdate=Rn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new bn,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}Rn.DefaultUp=new It(0,1,0),Rn.DefaultMatrixAutoUpdate=!0,Rn.prototype=Object.assign(Object.create(i.prototype),{constructor:Rn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)}
vendor: 4,440 bytes, line 1
1,setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:(xn=new Ct,function(e,t){return xn.setFromAxisAngle(e,t),this.quaternion.multiply(xn),this}),rotateOnWorldAxis:function(){var e=new Ct;return function(t,n){return e.setFromAxisAngle(t,n),this.quaternion.premultiply(e),this}}(),rotateX:function(){var e=new It(1,0,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateY:function(){var e=new It(0,1,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateZ:function(){var e=new It(0,0,1);return function(t){return this.rotateOnAxis(e,t)}}(),translateOnAxis:function(){var e=new It;return function(t,n){return e.copy(t).applyQuaternion(this.quaternion),this.position.add(e.multiplyScalar(n)),this}}(),translateX:function(){var e=new It(1,0,0);return function(t){return this.translateOnAxis(e,t)}}(),translateY:function(){var e=new It(0,1,0);return function(t){return this.translateOnAxis(e,t)}}(),translateZ:function(){var e=new It(0,0,1);return function(t){return this.translateOnAxis(e,t)}}(),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new an,function(e){return e.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var e=new Ct,t=new an,n=new It,i=new It;return function(r,a,o){r.isVector3?n.copy(r):n.set(r,a,o);var s=this.parent;this.updateWorldMatrix(!0,!1),i.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?t.lookAt(i,n,this.up):t.lookAt(n,i,this.up),this.quaternion.setFromRotationMatrix(t),s&&(t.extractRotation(s.matrixWorld),e.setFromRotationMatrix(t),this.quaternion.premultiply(e.inverse()))}}(),add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},attach:(An=new an,function(e){return this.updateWorldMatrix(!0,!1),An.getInverse(this.matrixWorld),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),An.multiply(e.parent.matrixWorld)),e.applyMatrix(An),e.updateWorldMatrix(!1,!1),this.add(e),this}),getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,i=this.children.length;n<i;n++){var r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new It),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new It,wn=new It,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new Ct),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,e,wn),e}),getWorldScale:function(){var e=new It,t=new Ct;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new It),this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,t,n),n}}(),getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new It),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,i=t.length;n<i;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix
vendor: 5,034 bytes, line 1
1):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)},updateWorldMatrix:function(e,t){var n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var i=this.children,r=0,a=i.length;r<a;r++)i[r].updateWorldMatrix(!1,!0)},toJSON:function(e){var t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var i={};function r(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isMesh&&this.drawMode!==pt&&(i.drawMode=this.drawMode),this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var o=a.shapes;if(Array.isArray(o))for(var s=0,l=o.length;s<l;s++){var u=o[s];r(e.shapes,u)}else r(e.shapes,o)}}if(void 0!==this.material)if(Array.isArray(this.material)){var d=[];for(s=0,l=this.material.length;s<l;s++)d.push(r(e.materials,this.material[s]));i.material=d}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(s=0;s<this.children.length;s++)i.children.push(this.children[s].toJSON(e).object)}if(t){var c=m(e.geometries),f=m(e.materials),h=m(e.textures),p=m(e.images);o=m(e.shapes);c.length>0&&(n.geometries=c),f.length>0&&(n.materials=f),h.length>0&&(n.textures=h),p.length>0&&(n.images=p),o.length>0&&(n.shapes=o)}return n.object=i,n;function m(e){var t=[];for(var n in e){var i=e[n];delete i.metadata,t.push(i)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var i=e.children[n];this.add(i.clone())}return this}});var Cn,In,Ln=0;function On(){Object.defineProperty(this,"id",{value:Ln+=2}),this.uuid=Mt.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Dn(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Pn(e,t,n){Dn.call(this,new Int8Array(e),t,n)}function Nn(e,t,n){Dn.call(this,new Uint8Array(e),t,n)}function kn(e,t,n){Dn.call(this,new Uint8ClampedArray(e),t,n)}function Fn(e,t,n){Dn.call(this,new Int16Array(e),t,n)}function Bn(e,t,n){Dn.call(this,new Uint16Array(e),t,n)}function Un(e,t,n){Dn.call(this,new Int32Array(e),t,n)}function jn(e,t,n){Dn.call(this,new Uint32Array(e),t,n)}function Gn(e,t,n){Dn.call(this,new Float32Array(e),t,n)}function Vn(e,t,n){Dn.call(this,new Float64Array(e),t,n)}function Hn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function zn(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,i=e.length;n<i;++n)e[n]>t&&(t=e[n]);return t}On.prototype=Object.assign(Object.create(i.prototype),{constructor:On,isGeometry:!0,applyMatrix:function(e){for(var t=(new Lt).getNormalMatrix(e),n=0,i=this.vertices.length;n<i;n++){this.vertices[n].applyMatrix4(e)}for(n=0,i=this.faces.length;n<i;n++){var r=this.faces[n];
vendor: 4,172 bytes, line 1
1r.normal.applyMatrix3(t).normalize();for(var a=0,o=r.vertexNormals.length;a<o;a++)r.vertexNormals[a].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var e=new an;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new an;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new an;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new an;return function(t,n,i){return e.makeTranslation(t,n,i),this.applyMatrix(e),this}}(),scale:function(){var e=new an;return function(t,n,i){return e.makeScale(t,n,i),this.applyMatrix(e),this}}(),lookAt:(In=new Rn,function(e){In.lookAt(e),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(e){var t=this,n=null!==e.index?e.index.array:void 0,i=e.attributes,r=i.position.array,a=void 0!==i.normal?i.normal.array:void 0,o=void 0!==i.color?i.color.array:void 0,s=void 0!==i.uv?i.uv.array:void 0,l=void 0!==i.uv2?i.uv2.array:void 0;void 0!==l&&(this.faceVertexUvs[1]=[]);for(var u=0;u<r.length;u+=3)t.vertices.push((new It).fromArray(r,u)),void 0!==o&&t.colors.push((new hn).fromArray(o,u));function d(e,n,i,r){var u=void 0===o?[]:[t.colors[e].clone(),t.colors[n].clone(),t.colors[i].clone()],d=new _n(e,n,i,void 0===a?[]:[(new It).fromArray(a,3*e),(new It).fromArray(a,3*n),(new It).fromArray(a,3*i)],u,r);t.faces.push(d),void 0!==s&&t.faceVertexUvs[0].push([(new Rt).fromArray(s,2*e),(new Rt).fromArray(s,2*n),(new Rt).fromArray(s,2*i)]),void 0!==l&&t.faceVertexUvs[1].push([(new Rt).fromArray(l,2*e),(new Rt).fromArray(l,2*n),(new Rt).fromArray(l,2*i)])}var c=e.groups;if(c.length>0)for(u=0;u<c.length;u++)for(var f=c[u],h=f.start,p=h,m=h+f.count;p<m;p+=3)void 0!==n?d(n[p],n[p+1],n[p+2],f.materialIndex):d(p,p+1,p+2,f.materialIndex);else if(void 0!==n)for(u=0;u<n.length;u+=3)d(n[u],n[u+1],n[u+2]);else for(u=0;u<r.length/3;u+=3)d(u,u+1,u+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:(Cn=new It,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Cn).negate(),this.translate(Cn.x,Cn.y,Cn.z),this}),normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,n=0===t?1:1/t,i=new an;return i.set(n,0,0,-n*e.x,0,n,0,-n*e.y,0,0,n,-n*e.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var e=new It,t=new It,n=0,i=this.faces.length;n<i;n++){var r=this.faces[n],a=this.vertices[r.a],o=this.vertices[r.b],s=this.vertices[r.c];e.subVectors(s,o),t.subVectors(a,o),e.cross(t),e.normalize(),r.normal.copy(e)}},computeVertexNormals:function(e){var t,n,i,r,a,o;for(void 0===e&&(e=!0),o=new Array(this.vertices.length),t=0,n=this.vertices.length;t<n;t++)o[t]=new It;if(e){var s,l,u,d=new It,c=new It;for(i=0,r=this.faces.length;i<r;i++)a=this.faces[i],s=this.vertices[a.a],l=this.vertices[a.b],u=this.vertices[a.c],d.subVectors(u,l),c.subVectors(s,l),d.cross(c),o[a.a].add(d),o[a.b].add(d),o[a.c].add(d)}else for(this.computeFaceNormals(),i=0,r=this.faces.length;i<r;i++)o[(a=this.faces[i]).a].add(a.normal),o[a.b].add(a.normal),o[a.c].add(a.normal);for(t=0,n=this.vertices.length;t<n;t++)o[t].normalize();for(i=0,r=this.faces.length;i<r;i++){var f=(a=this.faces[i]).vertexNormals;3===f.length?(f[0].copy(o[a.a]),f[1].copy(o[a.b]),f[2].copy(o[a.c])):(f[0]=o[a.a].clone(),f[1]=o[a.b].clone(),f[2]=o[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){var i=(n=this.faces[e]).vertexNormals;3===i.length?(i[0].copy(n.normal),i[1].copy(n.normal),i[2].copy(n.normal)):(i[0]=n.normal.clone(),i[1]=n.normal.clone(),i[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,i,r;for(n=0,i=this.faces.length;n<i;
vendor: 33,641 bytes, line 1
1n++)for((r=this.faces[n]).__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]),e=0,t=r.vertexNormals.length;e<t;e++)r.__originalVertexNormals[e]?r.__originalVertexNormals[e].copy(r.vertexNormals[e]):r.__originalVertexNormals[e]=r.vertexNormals[e].clone();var a=new On;for(a.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var o=this.morphNormals[e].faceNormals,s=this.morphNormals[e].vertexNormals;for(n=0,i=this.faces.length;n<i;n++)l=new It,u={a:new It,b:new It,c:new It},o.push(l),s.push(u)}var l,u,d=this.morphNormals[e];for(a.vertices=this.morphTargets[e].vertices,a.computeFaceNormals(),a.computeVertexNormals(),n=0,i=this.faces.length;n<i;n++)r=this.faces[n],l=d.faceNormals[n],u=d.vertexNormals[n],l.copy(r.normal),u.a.copy(r.vertexNormals[0]),u.b.copy(r.vertexNormals[1]),u.c.copy(r.vertexNormals[2])}for(n=0,i=this.faces.length;n<i;n++)(r=this.faces[n]).normal=r.__originalFaceNormal,r.vertexNormals=r.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new en),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new tn),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,n){if(e&&e.isGeometry){var i,r=this.vertices.length,a=this.vertices,o=e.vertices,s=this.faces,l=e.faces,u=this.faceVertexUvs[0],d=e.faceVertexUvs[0],c=this.colors,f=e.colors;void 0===n&&(n=0),void 0!==t&&(i=(new Lt).getNormalMatrix(t));for(var h=0,p=o.length;h<p;h++){var m=o[h].clone();void 0!==t&&m.applyMatrix4(t),a.push(m)}for(h=0,p=f.length;h<p;h++)c.push(f[h].clone());for(h=0,p=l.length;h<p;h++){var g,v,y,_=l[h],E=_.vertexNormals,b=_.vertexColors;(g=new _n(_.a+r,_.b+r,_.c+r)).normal.copy(_.normal),void 0!==i&&g.normal.applyMatrix3(i).normalize();for(var T=0,w=E.length;T<w;T++)v=E[T].clone(),void 0!==i&&v.applyMatrix3(i).normalize(),g.vertexNormals.push(v);g.color.copy(_.color);for(T=0,w=b.length;T<w;T++)y=b[T],g.vertexColors.push(y.clone());g.materialIndex=_.materialIndex+n,s.push(g)}for(h=0,p=d.length;h<p;h++){var A=d[h],S=[];if(void 0!==A){for(T=0,w=A.length;T<w;T++)S.push(A[T].clone());u.push(S)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){var e,t,n,i,r,a,o,s,l={},u=[],d=[],c=Math.pow(10,4);for(n=0,i=this.vertices.length;n<i;n++)e=this.vertices[n],void 0===l[t=Math.round(e.x*c)+"_"+Math.round(e.y*c)+"_"+Math.round(e.z*c)]?(l[t]=n,u.push(this.vertices[n]),d[n]=u.length-1):d[n]=d[l[t]];var f=[];for(n=0,i=this.faces.length;n<i;n++){(r=this.faces[n]).a=d[r.a],r.b=d[r.b],r.c=d[r.c],a=[r.a,r.b,r.c];for(var h=0;h<3;h++)if(a[h]===a[(h+1)%3]){f.push(n);break}}for(n=f.length-1;n>=0;n--){var p=f[n];for(this.faces.splice(p,1),o=0,s=this.faceVertexUvs.length;o<s;o++)this.faceVertexUvs[o].splice(p,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(e){this.vertices=[];for(var t=0,n=e.length;t<n;t++){var i=e[t];this.vertices.push(new It(i.x,i.y,i.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,n=0;n<t;n++)e[n]._id=n;e.sort(function(e,t){return e.materialIndex-t.materialIndex});var i,r,a=this.faceVertexUvs[0],o=this.faceVertexUvs[1];a&&a.length===t&&(i=[]),o&&o.length===t&&(r=[]);for(n=0;n<t;n++){var s=e[n]._id;i&&i.push(a[s]),r&&r.push(o[s])}i&&(this.faceVertexUvs[0]=i),r&&(this.faceVertexUvs[1]=r)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}for(var i=[],r=0;r<this.vertices.length;r++){var a=this.vertices[r];i.push(a.x,a.y,a.z)}var o=[],s=[],l={},u=[],d={},c=[],f={};for(r=0;r<this.faces.length;r++){var h=this.faces[r],p=void 0!==this.faceVertexUvs[0][r],m=h.normal.length()>0,g=h.vertexNormals.length>0,v=1!==h.color.r||1!==h.color.g||1!==h.color.b,y=h.vertexColors.length>0,_=0;if(_=w(_,0,0),_=w(_,1,!0),_=w(_,2,!1),_=w(_,3,p),_=w(_,4,m),_=w(_,5,g),_=w(_,6,v),_=w(_,7,y),o.push(_),o.push(h.a,h.b,h.c),o.push(h.materialIndex),p){var E=this.faceVertexUvs[0][r];o.push(x(E[0]),x(E[1]),x(E[2]))}if(m&&o.push(A(h.normal)),g){var b=h.vertexNormals;o.push(A(b[0]),A(b[1]),A(b[2]))}if(v&&o.push(S(h.color)),y){var T=h.vertexColors;o.push(S(T[0]),S(T[1]),S(T[2]))}}function w(e,t,n){return n?e|1<<t:e&~(1<<t)}function A(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==l[t]||(l[t]=s.length/3,s.push(e.x,e.y,e.z)),l[t]}function S(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==d[t]||(d[t]=u.length,u.push(e.getHex())),d[t]}function x(e){var t=e.x.toString()+e.y.toString();return void 0!==f[t]||(f[t]=c.length/2,c.push(e.x,e.y)),f[t]}return e.data={},e.data.vertices=i,e.data.normals=s,u.length>0&&(e.data.colors=u),c.length>0&&(e.data.uvs=[c]),e.data.faces=o,e},clone:function(){return(new On).copy(this)},copy:function(e){var t,n,i,r,a,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,n=s.length;t<n;t++)this.vertices.push(s[t].clone());var l=e.colors;for(t=0,n=l.length;t<n;t++)this.colors.push(l[t].clone());var u=e.faces;for(t=0,n=u.length;t<n;t++)this.faces.push(u[t].clone());for(t=0,n=e.faceVertexUvs.length;t<n;t++){var d=e.faceVertexUvs[t];for(void 0===this.faceVertexUvs[t]&&(this.faceVertexUvs[t]=[]),i=0,r=d.length;i<r;i++){var c=d[i],f=[];for(a=0,o=c.length;a<o;a++){var h=c[a];f.push(h.clone())}this.faceVertexUvs[t].push(f)}}var p=e.morphTargets;for(t=0,n=p.length;t<n;t++){var m={};if(m.name=p[t].name,void 0!==p[t].vertices)for(m.vertices=[],i=0,r=p[t].vertices.length;i<r;i++)m.vertices.push(p[t].vertices[i].clone());if(void 0!==p[t].normals)for(m.normals=[],i=0,r=p[t].normals.length;i<r;i++)m.normals.push(p[t].normals[i].clone());this.morphTargets.push(m)}var g=e.morphNormals;for(t=0,n=g.length;t<n;t++){var v={};if(void 0!==g[t].vertexNormals)for(v.vertexNormals=[],i=0,r=g[t].vertexNormals.length;i<r;i++){var y=g[t].vertexNormals[i],_={};_.a=y.a.clone(),_.b=y.b.clone(),_.c=y.c.clone(),v.vertexNormals.push(_)}if(void 0!==g[t].faceNormals)for(v.faceNormals=[],i=0,r=g[t].faceNormals.length;i<r;i++)v.faceNormals.push(g[t].faceNormals[i].clone());this.morphNormals.push(v)}var E=e.skinWeights;for(t=0,n=E.length;t<n;t++)this.skinWeights.push(E[t].clone());var b=e.skinIndices;for(t=0,n=b.length;t<n;t++)this.skinIndices.push(b[t].clone());var T=e.lineDistances;for(t=0,n=T.length;t<n;t++)this.lineDistances.push(T[t]);var w=e.boundingBox;null!==w&&(this.boundingBox=w.clone());var A=e.boundingSphere;return null!==A&&(this.boundingSphere=A.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Dn.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Dn.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.itemSize:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,i=0,r=e.length;i<r;i++){var a=e[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),a=new hn),t[n++]=a.r,t[n++]=a.g,t[n++]=a.b}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,i=0,r=e.length;i<r;i++){var a=e[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),a=new Rt),t[n++]=a.x,t[n++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,i=0,r=e.length;i<r;i++){var a=e[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),a=new It),t[n++]=a.x,t[n++]=a.y,t[n++]=a.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,i=0,r=e.length;i<r;i++){var a=e[i];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),a=new Xt),t[n++]=a.x,t[n++]=a.y,t[n++]=a.z,t[n++]=a.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this},setXYZW:function(e,t,n,i,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),Pn.prototype=Object.create(Dn.prototype),Pn.prototype.constructor=Pn,Nn.prototype=Object.create(Dn.prototype),Nn.prototype.constructor=Nn,kn.prototype=Object.create(Dn.prototype),kn.prototype.constructor=kn,Fn.prototype=Object.create(Dn.prototype),Fn.prototype.constructor=Fn,Bn.prototype=Object.create(Dn.prototype),Bn.prototype.constructor=Bn,Un.prototype=Object.create(Dn.prototype),Un.prototype.constructor=Un,jn.prototype=Object.create(Dn.prototype),jn.prototype.constructor=jn,Gn.prototype=Object.create(Dn.prototype),Gn.prototype.constructor=Gn,Vn.prototype=Object.create(Dn.prototype),Vn.prototype.constructor=Vn,Object.assign(Hn.prototype,{computeGroups:function(e){for(var t,n=[],i=void 0,r=e.faces,a=0;a<r.length;a++){var o=r[a];o.materialIndex!==i&&(i=o.materialIndex,void 0!==t&&(t.count=3*a-t.start,n.push(t)),t={start:3*a,materialIndex:i})}void 0!==t&&(t.count=3*a-t.start,n.push(t)),this.groups=n},fromGeometry:function(e){var t,n=e.faces,i=e.vertices,r=e.faceVertexUvs,a=r[0]&&r[0].length>0,o=r[1]&&r[1].length>0,s=e.morphTargets,l=s.length;if(l>0){t=[];for(var u=0;u<l;u++)t[u]={name:s[u].name,data:[]};this.morphTargets.position=t}var d,c=e.morphNormals,f=c.length;if(f>0){d=[];for(u=0;u<f;u++)d[u]={name:c[u].name,data:[]};this.morphTargets.normal=d}var h=e.skinIndices,p=e.skinWeights,m=h.length===i.length,g=p.length===i.length;i.length>0&&0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(u=0;u<n.length;u++){var v=n[u];this.vertices.push(i[v.a],i[v.b],i[v.c]);var y=v.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var _=v.normal;this.normals.push(_,_,_)}var E,b=v.vertexColors;if(3===b.length)this.colors.push(b[0],b[1],b[2]);else{var T=v.color;this.colors.push(T,T,T)}if(!0===a)void 0!==(E=r[0][u])?this.uvs.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new Rt,new Rt,new Rt));if(!0===o)void 0!==(E=r[1][u])?this.uvs2.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new Rt,new Rt,new Rt));for(var w=0;w<l;w++){var A=s[w].vertices;t[w].data.push(A[v.a],A[v.b],A[v.c])}for(w=0;w<f;w++){var S=c[w].vertexNormals[u];d[w].data.push(S.a,S.b,S.c)}m&&this.skinIndices.push(h[v.a],h[v.b],h[v.c]),g&&this.skinWeights.push(p[v.a],p[v.b],p[v.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this}});var Wn=1;function qn(){Object.defineProperty(this,"id",{value:Wn+=2}),this.uuid=Mt.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}function Yn(e,t,n,i,r,a){On.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a},this.fromBufferGeometry(new Kn(e,t,n,i,r,a)),this.mergeVertices()}function Kn(e,t,n,i,r,a){qn.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a};var o=this;e=e||1,t=t||1,n=n||1,i=Math.floor(i)||1,r=Math.floor(r)||1,a=Math.floor(a)||1;var s=[],l=[],u=[],d=[],c=0,f=0;function h(e,t,n,i,r,a,h,p,m,g,v){var y,_,E=a/m,b=h/g,T=a/2,w=h/2,A=p/2,S=m+1,x=g+1,M=0,R=0,C=new It;for(_=0;_<x;_++){var I=_*b-w;for(y=0;y<S;y++){var L=y*E-T;C[e]=L*i,C[t]=I*r,C[n]=A,l.push(C.x,C.y,C.z),C[e]=0,C[t]=0,C[n]=p>0?1:-1,u.push(C.x,C.y,C.z),d.push(y/m),d.push(1-_/g),M+=1}}for(_=0;_<g;_++)for(y=0;y<m;y++){var O=c+y+S*_,D=c+y+S*(_+1),P=c+(y+1)+S*(_+1),N=c+(y+1)+S*_;s.push(O,D,N),s.push(D,P,N),R+=6}o.addGroup(f,R,v),f+=R,c+=M}h("z","y","x",-1,-1,n,t,e,a,r,0),h("z","y","x",1,-1,n,t,-e,a,r,1),h("x","z","y",1,1,e,n,t,i,a,2),h("x","z","y",1,-1,e,n,-t,i,a,3),h("x","y","z",1,-1,e,t,n,i,r,4),h("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(s),this.addAttribute("position",new Gn(l,3)),this.addAttribute("normal",new Gn(u,3)),this.addAttribute("uv",new Gn(d,2))}function Xn(e,t,n,i){On.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i},this.fromBufferGeometry(new Qn(e,t,n,i)),this.mergeVertices()}function Qn(e,t,n,i){qn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};var r,a,o=(e=e||1)/2,s=(t=t||1)/2,l=Math.floor(n)||1,u=Math.floor(i)||1,d=l+1,c=u+1,f=e/l,h=t/u,p=[],m=[],g=[],v=[];for(a=0;a<c;a++){var y=a*h-s;for(r=0;r<d;r++){var _=r*f-o;m.push(_,-y,0),g.push(0,0,1),v.push(r/l),v.push(1-a/u)}}for(a=0;a<u;a++)for(r=0;r<l;r++){var E=r+d*a,b=r+d*(a+1),T=r+1+d*(a+1),w=r+1+d*a;p.push(E,b,w),p.push(b,T,w)}this.setIndex(p),this.addAttribute("position",new Gn(m,3)),this.addAttribute("normal",new Gn(g,3)),this.addAttribute("uv",new Gn(v,2))}qn.prototype=Object.assign(Object.create(i.prototype),{constructor:qn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(zn(e)>65535?jn:Bn)(e,1):this.index=e},addAttribute:function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):(this.attributes[e]=t,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(e,new Dn(arguments[1],arguments[2])))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Lt).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0);var i=this.attributes.tangent;void 0!==i&&((new Lt).getNormalMatrix(e).applyToBufferAttribute(i),i.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e=new an;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new an;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new an;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new an;return function(t,n,i){return e.makeTranslation(t,n,i),this.applyMatrix(e),this}}(),scale:function(){var e=new an;return function(t,n,i){return e.makeScale(t,n,i),this.applyMatrix(e),this}}(),lookAt:function(){var e=new Rn;return function(t){e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){var e=new It;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(e).negate(),this.translate(e.x,e.y,e.z),this}}(),setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new Gn(3*t.vertices.length,3),i=new Gn(3*t.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(t.vertices)),this.addAttribute("color",i.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var r=new Gn(t.lineDistances.length,1);this.addAttribute("lineDistance",r.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n];t.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new Gn(t,3)),this},updateFromObject:function(e){var t,n=e.geometry;if(e.isMesh){var i=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(i=void 0,n.elementsNeedUpdate=!1),void 0===i)return this.fromGeometry(n);i.verticesNeedUpdate=n.verticesNeedUpdate,i.normalsNeedUpdate=n.normalsNeedUpdate,i.colorsNeedUpdate=n.colorsNeedUpdate,i.uvsNeedUpdate=n.uvsNeedUpdate,i.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=i}return!0===n.verticesNeedUpdate&&(void 0!==(t=this.attributes.position)&&(t.copyVector3sArray(n.vertices),t.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(t=this.attributes.normal)&&(t.copyVector3sArray(n.normals),t.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(t=this.attributes.color)&&(t.copyColorsArray(n.colors),t.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(t=this.attributes.uv)&&(t.copyVector2sArray(n.uvs),t.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(t=this.attributes.lineDistance)&&(t.copyArray(n.lineDistances),t.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(e.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new Hn).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new Dn(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var n=new Float32Array(3*e.normals.length);this.addAttribute("normal",new Dn(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var i=new Float32Array(3*e.colors.length);this.addAttribute("color",new Dn(i,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var r=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new Dn(r,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var a=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new Dn(a,2).copyVector2sArray(e.uvs2))}for(var o in this.groups=e.groups,e.morphTargets){for(var s=[],l=e.morphTargets[o],u=0,d=l.length;u<d;u++){var c=l[u],f=new Gn(3*c.data.length,3);f.name=c.name,s.push(f.copyVector3sArray(c.data))}this.morphAttributes[o]=s}if(e.skinIndices.length>0){var h=new Gn(4*e.skinIndices.length,4);this.addAttribute("skinIndex",h.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var p=new Gn(4*e.skinWeights.length,4);this.addAttribute("skinWeight",p.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){var e=new en;return function(){null===this.boundingBox&&(this.boundingBox=new en);var t=this.attributes.position,n=this.morphAttributes.position;if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),n)for(var i=0,r=n.length;i<r;i++){var a=n[i];e.setFromBufferAttribute(a),this.boundingBox.expandByPoint(e.min),this.boundingBox.expandByPoint(e.max)}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}}(),computeBoundingSphere:function(){var e=new en,t=new en,n=new It;return function(){null===this.boundingSphere&&(this.boundingSphere=new tn);var i=this.attributes.position,r=this.morphAttributes.position;if(i){var a=this.boundingSphere.center;if(e.setFromBufferAttribute(i),r)for(var o=0,s=r.length;o<s;o++){var l=r[o];t.setFromBufferAttribute(l),e.expandByPoint(t.min),e.expandByPoint(t.max)}e.getCenter(a);var u=0;for(o=0,s=i.count;o<s;o++)n.fromBufferAttribute(i,o),u=Math.max(u,a.distanceToSquared(n));if(r)for(o=0,s=r.length;o<s;o++)for(var d=0,c=(l=r[o]).count;d<c;d++)n.fromBufferAttribute(l,d),u=Math.max(u,a.distanceToSquared(n));this.boundingSphere.radius=Math.sqrt(u),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes;if(t.position){var n=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new Dn(new Float32Array(n.length),3));else for(var i=t.normal.array,r=0,a=i.length;r<a;r++)i[r]=0;var o,s,l,u=t.normal.array,d=new It,c=new It,f=new It,h=new It,p=new It;if(e){var m=e.array;for(r=0,a=e.count;r<a;r+=3)o=3*m[r+0],s=3*m[r+1],l=3*m[r+2],d.fromArray(n,o),c.fromArray(n,s),f.fromArray(n,l),h.subVectors(f,c),p.subVectors(d,c),h.cross(p),u[o]+=h.x,u[o+1]+=h.y,u[o+2]+=h.z,u[s]+=h.x,u[s+1]+=h.y,u[s+2]+=h.z,u[l]+=h.x,u[l+1]+=h.y,u[l+2]+=h.z}else for(r=0,a=n.length;r<a;r+=9)d.fromArray(n,r),c.fromArray(n,r+3),f.fromArray(n,r+6),h.subVectors(f,c),p.subVectors(d,c),h.cross(p),u[r]=h.x,u[r+1]=h.y,u[r+2]=h.z,u[r+3]=h.x,u[r+4]=h.y,u[r+5]=h.z,u[r+6]=h.x,u[r+7]=h.y,u[r+8]=h.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var i in n)if(void 0!==e.attributes[i])for(var r=n[i].array,a=e.attributes[i],o=a.array,s=a.itemSize*t,l=Math.min(o.length,r.length-s),u=0,d=s;u<l;u++,d++)r[d]=o[u];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){var e=new It;return function(){for(var t=this.attributes.normal,n=0,i=t.count;n<i;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.normalize(),t.setXYZ(n,e.x,e.y,e.z)}}(),toNonIndexed:function(){function e(e,t){for(var n=e.array,i=e.itemSize,r=new n.constructor(t.length*i),a=0,o=0,s=0,l=t.length;s<l;s++){a=t[s]*i;for(var u=0;u<i;u++)r[o++]=n[a++]}return new Dn(r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new qn,n=this.index.array,i=this.attributes;for(var r in i){var a=e(i[r],n);t.addAttribute(r,a)}var o=this.morphAttributes;for(r in o){for(var s=[],l=o[r],u=0,d=l.length;u<d;u++){a=e(l[u],n);s.push(a)}t.morphAttributes[r]=s}for(var c=this.groups,f=(u=0,c.length);u<f;u++){var h=c[u];t.addGroup(h.start,h.count,h.materialIndex)}return t},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var i=this.index;null!==i&&(e.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});var r=this.attributes;for(var n in r){var a=(f=r[n]).toJSON();""!==f.name&&(a.name=f.name),e.data.attributes[n]=a}var o={},s=!1;for(var n in this.morphAttributes){for(var l=this.morphAttributes[n],u=[],d=0,c=l.length;d<c;d++){var f;a=(f=l[d]).toJSON();""!==f.name&&(a.name=f.name),u.push(a)}u.length>0&&(o[n]=u,s=!0)}s&&(e.data.morphAttributes=o);var h=this.groups;h.length>0&&(e.data.groups=JSON.parse(JSON.stringify(h)));var p=this.boundingSphere;return null!==p&&(e.data.boundingSphere={center:p.center.toArray(),radius:p.radius}),e},clone:function(){return(new qn).copy(this)},copy:function(e){var t,n,i;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var r=e.index;null!==r&&this.setIndex(r.clone());var a=e.attributes;for(t in a){var o=a[t];this.addAttribute(t,o.clone())}var s=e.morphAttributes;for(t in s){var l=[],u=s[t];for(n=0,i=u.length;n<i;n++)l.push(u[n].clone());this.morphAttributes[t]=l}var d=e.groups;for(n=0,i=d.length;n<i;n++){var c=d[n];this.addGroup(c.start,c.count,c.materialIndex)}var f=e.boundingBox;null!==f&&(this.boundingBox=f.clone());var h=e.boundingSphere;return null!==h&&(this.boundingSphere=h.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Yn.prototype=Object.create(On.prototype),Yn.prototype.constructor=Yn,Kn.prototype=Object.create(qn.prototype),Kn.prototype.constructor=Kn,Xn.prototype=Object.create(On.prototype),Xn.prototype.constructor=Xn,Qn.prototype=Object.create(qn.prototype),Qn.prototype.constructor=Qn;var Zn=0;function Jn(){Object.defineProperty(this,"id",{value:Zn++}),this.uuid=Mt.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=_,this.side=p,this.flatShading=!1,this.vertexTangents=!1,this.vertexColors=v,this.opacity=1,this.transparent=!1,this.blendSrc=D,this.blendDst=P,this.blendEquation=A,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=H,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}Jn.prototype=Object.assign(Object.create(i.prototype),{constructor:Jn,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var i=this[t];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(e){var t=[];for(var n in e){var i=e[n];delete i.metadata,t.push(i)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==_&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==p&&(n.side=this.side),this.vertexColors!==v&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var r=i(e.textures),a=i(e.images);r.length>0&&(n.textures=r),a.length>0&&(n.images=a)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.userData=JSON.parse(JSON.stringify(e.userData)),this.clipShadows=e.clipSh
vendor: 4,138 bytes, line 1
1adows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,n=null;if(null!==t){var i=t.length;n=new Array(i);for(var r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var $n,ei,ti,ni,ii,ri,ai,oi,si,li,ui,di,ci="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fi="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";function hi(e){Jn.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=ci,this.fragmentShader=fi,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function pi(e,t){this.origin=void 0!==e?e:new It,this.direction=void 0!==t?t:new It}function mi(e,t,n){this.a=void 0!==e?e:new It,this.b=void 0!==t?t:new It,this.c=void 0!==n?n:new It}function gi(e){Jn.call(this),this.type="MeshBasicMaterial",this.color=new hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function vi(e,t){Rn.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new qn,this.material=void 0!==t?t:new gi({color:16777215*Math.random()}),this.drawMode=pt,this.updateMorphTargets()}function yi(e,t,n,i){var r,a,o=new hn(0),s=0,l=null,u=0;function d(e,n){t.buffers.color.setClear(e.r,e.g,e.b,n,i)}return{getClearColor:function(){return o},setClearColor:function(e,t){o.set(e),d(o,s=void 0!==t?t:1)},getClearAlpha:function(){return s},setClearAlpha:function(e){d(o,s=e)},render:function(t,i,c,f){var h=i.background,g=e.vr,v=g.getSession&&g.getSession();if(v&&"additive"===v.environmentBlendMode&&(h=null),null===h?(d(o,s),l=null,u=0):h&&h.isColor&&(d(h,1),f=!0,l=null,u=0),(e.autoClear||f)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),h&&(h.isCubeTexture||h.isWebGLRenderTargetCube)){void 0===a&&((a=new vi(new Kn(1,1,1),new hi({type:"BackgroundCubeMaterial",uniforms:sn(gn.cube.uniforms),vertexShader:gn.cube.vertexShader,fragmentShader:gn.cube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.tCube.value}}),n.update(a));var y=h.isWebGLRenderTargetCube?h.texture:h;a.material.uniforms.tCube.value=y,a.material.uniforms.tFlip.value=h.isWebGLRenderTargetCube?1:-1,l===h&&u===y.version||(a.material.needsUpdate=!0,l=h,u=y.version),t.unshift(a,a.geometry,a.material,0,0,null)}else h&&h.isTexture&&(void 0===r&&((r=new vi(new Qn(2,2),new hi({type:"BackgroundMaterial",uniforms:sn(gn.background.uniforms),vertexShader:gn.background.vertexShader,fragmentShader:gn.background.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),Object.defineProperty(r.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(r)),r.material.uniforms.t2D.value=h,!0===h.matrixAutoUpdate&&h.updateMatrix(),r.material.uniforms.uvTransform.value.copy(h.matrix),l===h&&u===h.version||(r.material.needsUpdate=!0,l=h,u=h.version),t.unshift(r,r.geometry,r.material,0,0,null))}}}function _i(e,t,n,i){var r;this.setMode=function(e){r=e},this.render=function(t,i){e.drawArrays(r,t,i),n.update(i,r)},this.renderInstances=function(a,o,s){var l;
vendor: 9,897 bytes, line 1
1if(i.isWebGL2)l=e;else if(null===(l=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[i.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](r,o,s,a.maxInstancedCount),n.update(s,r,a.maxInstancedCount)}}function Ei(e,t,n){var i;function r(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,o=void 0!==n.precision?n.precision:"highp",s=r(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var l=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),d=e.getParameter(35660),c=e.getParameter(3379),f=e.getParameter(34076),h=e.getParameter(34921),p=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=d>0,y=a||!!t.get("OES_texture_float");return{isWebGL2:a,getMaxAnisotropy:function(){if(void 0!==i)return i;var n=t.get("EXT_texture_filter_anisotropic");return i=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:o,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:d,maxTextureSize:c,maxCubemapSize:f,maxAttributes:h,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:a?e.getParameter(36183):0}}function bi(){var e=this,t=null,n=0,i=!1,r=!1,a=new nn,o=new Lt,s={value:null,needsUpdate:!1};function l(){s.value!==t&&(s.value=t,s.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function u(t,n,i,r){var l=null!==t?t.length:0,u=null;if(0!==l){if(u=s.value,!0!==r||null===u){var d=i+4*l,c=n.matrixWorldInverse;o.getNormalMatrix(c),(null===u||u.length<d)&&(u=new Float32Array(d));for(var f=0,h=i;f!==l;++f,h+=4)a.copy(t[f]).applyMatrix4(c,o),a.normal.toArray(u,h),u[h+3]=a.constant}s.value=u,s.needsUpdate=!0}return e.numPlanes=l,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(e,r,a){var o=0!==e.length||r||0!==n||i;return i=r,t=u(e,a,0),n=e.length,o},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1,l()},this.setState=function(e,a,o,d,c,f){if(!i||null===e||0===e.length||r&&!o)r?u(null):l();else{var h=r?0:n,p=4*h,m=c.clippingState||null;s.value=m,m=u(e,d,p,f);for(var g=0;g!==p;++g)m[g]=t[g];c.clippingState=m,this.numIntersection=a?this.numPlanes:0,this.numPlanes+=h}}}function Ti(e){var t={};return{get:function(n){if(void 0!==t[n])return t[n];var i;switch(n){case"WEBGL_depth_texture":i=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=e.getExtension(n)}return null===i&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),t[n]=i,i}}}function wi(e,t,n){var i={},r={};function a(e){var o=e.target,s=i[o.id];for(var l in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[l]);o.removeEventListener("dispose",a),delete i[o.id];var u=r[s.id];u&&(t.remove(u),delete r[s.id]),n.memory.geometries--}return{get:function(e,t){var r=i[t.id];return r||(t.addEventListener("dispose",a),t.isBufferGeometry?r=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new qn).setFromObject(e)),r=t._bufferGeometry),i[t.id]=r,n.memory.geometries++,r)},update:function(e){var n=e.index,i=e.attributes;for(var r in null!==n&&t.update(n,34963),i)t.update(i[r],34962);var a=e.morphAttributes;for(var r in a)for(var o=a[r],s=0,l=o.length;s<l;s++)t.update(o[s],34962)},getWireframeAttribute:function(e){var n=r[e.id];if(n)return n;var i,a=[],o=e.index,s=e.attributes;if(null!==o)for(var l=0,u=(i=o.array).length;l<u;l+=3){var d=i[l+0],c=i[l+1],f=i[l+2];a.push(d,c,c,f,f,d)}else for(l=0,u=(i=s.position.array).length/3-1;l<u;l+=3){d=l+0,c=l+1,f=l+2;a.push(d,c,c,f,f,d)}return n=new(zn(a)>65535?jn:Bn)(a,1),t.update(n,34963),r[e.id]=n,n}}}function Ai(e,t,n,i){var r,a,o;this.setMode=function(e){r=e},this.setIndex=function(e){a=e.type,o=e.bytesPerElement},this.render=function(t,i){e.drawElements(r,i,a,t*o),n.update(i,r)},this.renderInstances=function(s,l,u){var d;if(i.isWebGL2)d=e;else if(null===(d=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");d[i.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](r,u,a,l*o,s.maxInstancedCount),n.update(u,r,s.maxInstancedCount)}}function Si(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,i){switch(i=i||1,t.calls++,n){case 4:t.triangles+=i*(e/3);break;case 5:case 6:t.triangles+=i*(e-2);break;case 1:t.lines+=i*(e/2);break;case 3:t.lines+=i*(e-1);break;case 2:t.lines+=i*e;break;case 0:t.points+=i*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function xi(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Mi(e){var t={},n=new Float32Array(8);return{update:function(i,r,a,o){var s=i.morphTargetInfluences,l=s.length,u=t[r.id];if(void 0===u){u=[];for(var d=0;d<l;d++)u[d]=[d,0];t[r.id]=u}var c=a.morphTargets&&r.morphAttributes.position,f=a.morphNormals&&r.morphAttributes.normal;for(d=0;d<l;d++){0!==(h=u[d])[1]&&(c&&r.removeAttribute("morphTarget"+d),f&&r.removeAttribute("morphNormal"+d))}for(d=0;d<l;d++){(h=u[d])[0]=d,h[1]=s[d]}for(u.sort(xi),d=0;d<8;d++){var h;if(h=u[d]){var p=h[0],m=h[1];if(m){c&&r.addAttribute("morphTarget"+d,c[p]),f&&r.addAttribute("morphNormal"+d,f[p]),n[d]=m;continue}}n[d]=0}o.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function Ri(e,t){var n={};return{update:function(i){var r=t.render.frame,a=i.geometry,o=e.get(i,a);return n[o.id]!==r&&(a.isGeometry&&o.updateFromObject(i),e.update(o),n[o.id]=r),o},dispose:function(){n={}}}}function Ci(e,t,n,i,r,a,o,s,l,u){e=void 0!==e?e:[],t=void 0!==t?t:ie,o=void 0!==o?o:Oe,Kt.call(this,e,t,n,i,r,a,o,s,l,u),this.flipY=!1}function Ii(e,t,n,i){Kt.call(this,null),this.image={data:e,width:t,height:n,depth:i},this.magFilter=he,this.minFilter=he,this.wrapR=ce,this.generateMipmaps=!1,this.flipY=!1}function Li(e,t,n,i){Kt.call(this,null),this.image={data:e,width:t,height:n,depth:i},this.magFilter=he,this.minFilter=he,this.wrapR=ce,this.generateMipmaps=!1,this.flipY=!1}hi.prototype=Object.create(Jn.prototype),hi.prototype.constructor=hi,hi.prototype.isShaderMaterial=!0,hi.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=sn(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},hi.prototype.toJSON=function(e){var t=Jn.prototype.toJSON.call(this,e);for(var n in t.uniforms={},this.uniforms){var i=this.uniforms[n].value;i&&i.isTexture?t.uniforms[n]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:"m4",value:i.toArray()}:t.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var r={};for(var a in this.extensions)!0===this.extensions[a]&&(r[a]=!0);return Object.keys(r).length>0&&(t.extensions=r),t},Object.assign(pi.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new It),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(){var e=new It;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new It),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new It;return function(t){var n=e.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(n).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:(ei=new It,ti=new It,ni=new It,function(e,t,n,i){ei.c
vendor: 15,844 bytes, line 1
1opy(e).add(t).multiplyScalar(.5),ti.copy(t).sub(e).normalize(),ni.copy(this.origin).sub(ei);var r,a,o,s,l=.5*e.distanceTo(t),u=-this.direction.dot(ti),d=ni.dot(this.direction),c=-ni.dot(ti),f=ni.lengthSq(),h=Math.abs(1-u*u);if(h>0)if(a=u*d-c,s=l*h,(r=u*c-d)>=0)if(a>=-s)if(a<=s){var p=1/h;o=(r*=p)*(r+u*(a*=p)+2*d)+a*(u*r+a+2*c)+f}else a=l,o=-(r=Math.max(0,-(u*a+d)))*r+a*(a+2*c)+f;else a=-l,o=-(r=Math.max(0,-(u*a+d)))*r+a*(a+2*c)+f;else a<=-s?o=-(r=Math.max(0,-(-u*l+d)))*r+(a=r>0?-l:Math.min(Math.max(-l,-c),l))*(a+2*c)+f:a<=s?(r=0,o=(a=Math.min(Math.max(-l,-c),l))*(a+2*c)+f):o=-(r=Math.max(0,-(u*l+d)))*r+(a=r>0?l:Math.min(Math.max(-l,-c),l))*(a+2*c)+f;else a=u>0?-l:l,o=-(r=Math.max(0,-(u*a+d)))*r+a*(a+2*c)+f;return n&&n.copy(this.direction).multiplyScalar(r).add(this.origin),i&&i.copy(ti).multiplyScalar(a).add(ei),o}),intersectSphere:function(){var e=new It;return function(t,n){e.subVectors(t.center,this.origin);var i=e.dot(this.direction),r=e.dot(e)-i*i,a=t.radius*t.radius;if(r>a)return null;var o=Math.sqrt(a-r),s=i-o,l=i+o;return s<0&&l<0?null:s<0?this.at(l,n):this.at(s,n)}}(),intersectsSphere:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,i,r,a,o,s,l=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,c=this.origin;return l>=0?(n=(e.min.x-c.x)*l,i=(e.max.x-c.x)*l):(n=(e.max.x-c.x)*l,i=(e.min.x-c.x)*l),u>=0?(r=(e.min.y-c.y)*u,a=(e.max.y-c.y)*u):(r=(e.max.y-c.y)*u,a=(e.min.y-c.y)*u),n>a||r>i?null:((r>n||n!=n)&&(n=r),(a<i||i!=i)&&(i=a),d>=0?(o=(e.min.z-c.z)*d,s=(e.max.z-c.z)*d):(o=(e.max.z-c.z)*d,s=(e.min.z-c.z)*d),n>s||o>i?null:((o>n||n!=n)&&(n=o),(s<i||i!=i)&&(i=s),i<0?null:this.at(n>=0?n:i,t)))},intersectsBox:($n=new It,function(e){return null!==this.intersectBox(e,$n)}),intersectTriangle:function(){var e=new It,t=new It,n=new It,i=new It;return function(r,a,o,s,l){t.subVectors(a,r),n.subVectors(o,r),i.crossVectors(t,n);var u,d=this.direction.dot(i);if(d>0){if(s)return null;u=1}else{if(!(d<0))return null;u=-1,d=-d}e.subVectors(this.origin,r);var c=u*this.direction.dot(n.crossVectors(e,n));if(c<0)return null;var f=u*this.direction.dot(t.cross(e));if(f<0)return null;if(c+f>d)return null;var h=-u*e.dot(i);return h<0?null:this.at(h/d,l)}}(),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(mi,{getNormal:(ri=new It,function(e,t,n,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new It),i.subVectors(n,t),ri.subVectors(e,t),i.cross(ri);var r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}),getBarycoord:function(){var e=new It,t=new It,n=new It;return function(i,r,a,o,s){e.subVectors(o,r),t.subVectors(a,r),n.subVectors(i,r);var l=e.dot(e),u=e.dot(t),d=e.dot(n),c=t.dot(t),f=t.dot(n),h=l*c-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new It),0===h)return s.set(-2,-1,-1);var p=1/h,m=(c*d-u*f)*p,g=(l*f-u*d)*p;return s.set(1-m-g,g,m)}}(),containsPoint:function(){var e=new It;return function(t,n,i,r){return mi.getBarycoord(t,n,i,r,e),e.x>=0&&e.y>=0&&e.x+e.y<=1}}(),getUV:(ii=new It,function(e,t,n,i,r,a,o,s){return this.getBarycoord(e,t,n,i,ii),s.set(0,0),s.addScaledVector(r,ii.x),s.addScaledVector(a,ii.y),s.addScaledVector(o,ii.z),s}),isFrontFacing:function(){var e=new It,t=new It;return function(n,i,r,a){return e.subVectors(r,i),t.subVectors(n,i),e.cross(t).dot(a)<0}}()}),Object.assign(mi.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){var e=new It,t=new It;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new It),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return mi.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new It),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return mi.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,n,i,r){return mi.getUV(e,this.a,this.b,this.c,t,n,i,r)},containsPoint:function(e){return mi.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return mi.isFrontFacing(this.a,this.b,this.c,e)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:(ai=new It,oi=new It,si=new It,li=new It,ui=new It,di=new It,function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new It);var n,i,r=this.a,a=this.b,o=this.c;ai.subVectors(a,r),oi.subVectors(o,r),li.subVectors(e,r);var s=ai.dot(li),l=oi.dot(li);if(s<=0&&l<=0)return t.copy(r);ui.subVectors(e,a);var u=ai.dot(ui),d=oi.dot(ui);if(u>=0&&d<=u)return t.copy(a);var c=s*d-u*l;if(c<=0&&s>=0&&u<=0)return n=s/(s-u),t.copy(r).addScaledVector(ai,n);di.subVectors(e,o);var f=ai.dot(di),h=oi.dot(di);if(h>=0&&f<=h)return t.copy(o);var p=f*l-s*h;if(p<=0&&l>=0&&h<=0)return i=l/(l-h),t.copy(r).addScaledVector(oi,i);var m=u*h-f*d;if(m<=0&&d-u>=0&&f-h>=0)return si.subVectors(o,a),i=(d-u)/(d-u+(f-h)),t.copy(a).addScaledVector(si,i);var g=1/(m+p+c);return n=p*g,i=c*g,t.copy(r).addScaledVector(ai,n).addScaledVector(oi,i)}),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}),gi.prototype=Object.create(Jn.prototype),gi.prototype.constructor=gi,gi.prototype.isMeshBasicMaterial=!0,gi.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},vi.prototype=Object.assign(Object.create(Rn.prototype),{constructor:vi,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return Rn.prototype.copy.call(this,e),this.drawMode=e.drawMode,void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,n,i=this.geometry;if(i.isBufferGeometry){var r=i.morphAttributes,a=Object.keys(r);if(a.length>0){var o=r[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e<t;e++)n=o[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}else{var s=i.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(){var e=new an,t=new pi,n=new tn,i=new It,r=new It,a=new It,o=new It,s=new It,l=new It,u=new It,d=new It,c=new It,f=new Rt,h=new Rt,p=new Rt,v=new It,y=new It;function _(e,t,n,i,r,a,o,s){if(null===(t.side===m?i.intersectTriangle(o,a,r,!0,s):i.intersectTriangle(r,a,o,t.side!==g,s)))return null;y.copy(s),y.applyMatrix4(e.matrixWorld);var l=n.ray.origin.distanceTo(y);return l<n.near||l>n.far?null:{distance:l,point:y.clone(),object:e}}function E(e,t,n,m,g,y,E,b,T,w){i.fromBufferAttribute(g,b),r.fromBufferAttribute(g,T),a.fromBufferAttribute(g,w);var A=e.morphTargetInfluences;if(t.morphTargets&&y&&A){u.set(0,0,0),d.set(0,0,0),c.set(0,0,0);for(var S=0,x=y.length;S<x;S++){var M=A[S],R=y[S];0!==M&&(o.fromBufferAttribute(R,b),s.fromBufferAttribute(R,T),l.fromBufferAttribute(R,w),u.addScaledVector(o.sub(i),M),d.addScaledVector(s.sub(r),M),c.addScaledVector(l.sub(a),M))}i.add(u),r.add(d),a.add(c)}var C=_(e,t,n,m,i,r,a,v);if(C){E&&(f.fromBufferAttribute(E,b),h.fromBufferAttribute(E,T),p.fromBufferAttribute(E,w),C.uv=mi.getUV(v,i,r,a,f,h,p,new Rt));var I=new _n(b,T,w);mi.getNormal(i,r,a,I.normal),C.face=I}return C}return function(i,r){var a,o=this.geometry,s=this.material,l=this.matrixWorld;if(void 0!==s&&(null===o.boundingSphere&&o.computeBoundingSphere(),n.copy(o.boundingSphere),n.applyMatrix4(l),!1!==i.ray.intersectsSphere(n)&&(e.getInverse(l),t.copy(i.ray).applyMatrix4(e),null===o.boundingBox||!1!==t.intersectsBox(o.boundingBox))))if(o.isBufferGeometry){var u,d,c,m,g,y,b,T,w,A=o.index,S=o.attributes.position,x=o.morphAttributes.position,M=o.attributes.uv,R=o.groups,C=o.drawRange;if(null!==A)if(Array.isArray(s))for(m=0,y=R.length;m<y;m++)for(w=s[(T=R[m]).materialIndex],g=Math.max(T.start,C.start),b=Math.min(T.start+T.count,C.start+C.count);g<b;g+=3)u=A.getX(g),d=A.getX(g+1),c=A.getX(g+2),(a=E(this,w,i,t,S,x,M,u,d,c))&&(a.faceIndex=Math.floor(g/3),a.face.materialIndex=T.materialIndex,r.push(a));else for(m=Math.max(0,C.start),y=Math.min(A.count,C.start+C.count);m<y;m+=3)u=A.getX(m),d=A.getX(m+1),c=A.getX(m+2),(a=E(this,s,i,t,S,x,M,u,d,c))&&(a.faceIndex=Math.floor(m/3),r.push(a));else if(void 0!==S)if(Array.isArray(s))for(m=0,y=R.length;m<y;m++)for(w=s[(T=R[m]).materialIndex],g=Math.max(T.start,C.start),b=Math.min(T.start+T.count,C.start+C.count);g<b;g+=3)(a=E(this,w,i,t,S,x,M,u=g,d=g+1,c=g+2))&&(a.faceIndex=Math.floor(g/3),a.face.materialIndex=T.materialIndex,r.push(a));else for(m=Math.max(0,C.start),y=Math.min(S.count,C.start+C.count);m<y;m+=3)(a=E(this,s,i,t,S,x,M,u=m,d=m+1,c=m+2))&&(a.faceIndex=Math.floor(m/3),r.push(a))}else if(o.isGeometry){var I,L,O,D,P=Array.isArray(s),N=o.vertices,k=o.faces,F=o.faceVertexUvs[0];F.length>0&&(D=F);for(var B=0,U=k.length;B<U;B++){var j=k[B],G=P?s[j.materialIndex]:s;if(void 0!==G&&(I=N[j.a],L=N[j.b],O=N[j.c],a=_(this,G,i,t,I,L,O,v))){if(D&&D[B]){var V=D[B];f.copy(V[0]),h.copy(V[1]),p.copy(V[2]),a.uv=mi.getUV(v,I,L,O,f,h,p,new Rt)}a.face=j,a.faceIndex=B,r.push(a)}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ci.prototype=Object.create(Kt.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isCubeTexture=!0,Object.defineProperty(Ci.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}}),Ii.prototype=Object.create(Kt.prototype),Ii.prototype.constructor=Ii,Ii.prototype.isDataTexture2DArray=!0,Li.prototype=Object.create(Kt.prototype),Li.prototype.constructor=Li,Li.prototype.isDataTexture3D=!0;var Oi=new Kt,Di=new Ii,Pi=new Li,Ni=new Ci,ki=[],Fi=[],Bi=new Float32Array(16),Ui=new Float32Array(9),ji=new Float32Array(4);function Gi(e,t,n){var i=e[0];if(i<=0||i>0)return e;var r=t*n,a=ki[r];if(void 0===a&&(a=new Float32Array(r),ki[r]=a),0!==t){i.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=n,e[o].toArray(a,s)}return a}function Vi(e,t){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Hi(e,t){for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}function zi(e,t){var n=Fi[t];void 0===n&&(n=new Int32Array(t),Fi[t]=n);for(var i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function Wi(e,t){var n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function qi(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Vi(n,t))return;e.uniform2fv(this.addr,t),Hi(n,t)}}function Yi(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(Vi(n,t))return;e.uniform3fv(this.addr,t),Hi(n,t)}}function Ki(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Vi(n,t))return;e.uniform4fv(this.addr,t),Hi(n,t)}}function Xi(e,t){var n=this.cache,i=t.elements;if(void 0===i){if(Vi(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Hi(n,t)}else{if(Vi(n,i))return;ji.set(i),e.uniformMatrix2fv(this.addr,!1,ji),Hi(n,i)}}function Qi(e,t){var n=this.cache,i=t.elements;if(void 0===i){if(Vi(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Hi(n,t)}else{if(Vi(n,i))return;Ui.set(i),e.uniformMatrix3fv(this.addr,!1,Ui),Hi(n,i)}}function Zi(e,t){var n=this.cache,i=t.elements;if(void 0===i){if(Vi(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Hi(n,t)}else{if(Vi(n,i))return;Bi.set(i),e.uniformMatrix4fv(this.addr,!1,Bi),Hi(n,i)}}function Ji(e,t,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.safeSetTexture2D(t||Oi,r)}function $i(e,t,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||Di,r)}function er(e,t,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||Pi,r)}function tr(e,t,n){var i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.safeSetTextureCube(t||Ni,r)}function nr(e,t){var n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function ir(e,t){var n=this.cache;Vi(n,t)||(e.uniform2iv(this.addr,t),Hi(n,t))}function rr(e,t){var n=this.cache;Vi(n,t)||(e.uniform3iv(this.addr,t),Hi(n,t))}function ar(e,t){var n=this.cache;Vi(n,t)||(e.uniform4iv(this.addr,t),Hi(n,t))}function or(e,t){e.uniform1fv(this.addr,t)}function sr(e,t){e.uniform1iv(this.addr,t)}function lr(e,t){e.uniform2iv(this.addr,t)}function ur(e,t){e.uniform3iv(this.addr,t)}function dr(e,t){e.uniform4iv(this.addr,t)}function cr(e,t){var n=Gi(t,this.size,2);e.uniform2fv(this.addr,n)}function fr(e,t){var n=Gi(t,this.size,3);e.uniform3fv(this.addr,n)}function hr(e,t){var n=Gi(t,this.size,4);e.uniform4fv(this.addr,n)}function pr(e,t){var n=Gi(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function mr(e,t){var n=Gi(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function gr(e,t){var n=Gi(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function vr(e,t,n){var i=t.length,r=zi(n,i);e.uniform1iv(this.addr,r);for(var a=0;a!==i;++a)n.safeSetTexture2D(t[a]||Oi,r[a])}function yr(e,t,n){var i=t.length,r=zi(n,i);e.uniform1iv(this.addr,r);for(var a=0;a!==i;++a)n.safeSetTextureCube(t[a]||Ni,r[a])}function _r(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Wi;case 35664:return qi;case 35665:return Yi;case 35666:return Ki;case 35674:return Xi;case 35675:return Qi;case 35676:return Zi;case 35678:case 36198:return Ji;case 35679:return er;case 35680:return tr;case 36289:return $i;case 5124:case 35670:return nr;case 35667:case 35671:return ir;case 35668:case 35672:return rr;case 35669:case 35673:return ar}}(t.type)}function Er(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return or;case 35664:return cr;case 35665:return fr;case 35666:return hr;case 35674:return pr;case 35675:return mr;case 35676:return gr;
vendor: 14,731 bytes, line 1
1case 35678:return vr;case 35680:return yr;case 5124:case 35670:return sr;case 35667:case 35671:return lr;case 35668:case 35672:return ur;case 35669:case 35673:return dr}}(t.type)}function br(e){this.id=e,this.seq=[],this.map={}}Er.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Hi(t,e)},br.prototype.setValue=function(e,t,n){for(var i=this.seq,r=0,a=i.length;r!==a;++r){var o=i[r];o.setValue(e,t[o.id],n)}};var Tr=/([\w\d_]+)(\])?(\[|\.)?/g;function wr(e,t){e.seq.push(t),e.map[t.id]=t}function Ar(e,t,n){var i=e.name,r=i.length;for(Tr.lastIndex=0;;){var a=Tr.exec(i),o=Tr.lastIndex,s=a[1],l="]"===a[2],u=a[3];if(l&&(s|=0),void 0===u||"["===u&&o+2===r){wr(n,void 0===u?new _r(s,e,t):new Er(s,e,t));break}var d=n.map[s];void 0===d&&wr(n,d=new br(s)),n=d}}function Sr(e,t){this.seq=[],this.map={};for(var n=e.getProgramParameter(t,35718),i=0;i<n;++i){var r=e.getActiveUniform(t,i);Ar(r,e.getUniformLocation(t,r.name),this)}}function xr(e,t,n,i){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),!0===i&&(!1===e.getShaderParameter(r,35713)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",35633===t?"vertex":"fragment",e.getShaderInfoLog(r),function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(n))),r}Sr.prototype.setValue=function(e,t,n,i){var r=this.map[t];void 0!==r&&r.setValue(e,n,i)},Sr.prototype.setOptional=function(e,t,n){var i=t[n];void 0!==i&&this.setValue(e,n,i)},Sr.upload=function(e,t,n,i){for(var r=0,a=t.length;r!==a;++r){var o=t[r],s=n[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,i)}},Sr.seqWithValue=function(e,t){for(var n=[],i=0,r=e.length;i!==r;++i){var a=e[i];a.id in t&&n.push(a)}return n};var Mr=0;function Rr(e){switch(e){case vt:return["Linear","( value )"];case yt:return["sRGB","( value )"];case Et:return["RGBE","( value )"];case bt:return["RGBM","( value, 7.0 )"];case Tt:return["RGBM","( value, 16.0 )"];case wt:return["RGBD","( value, 256.0 )"];case _t:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function Cr(e,t){var n=Rr(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Ir(e,t){var n;switch(t){case J:n="Linear";break;case $:n="Reinhard";break;case ee:n="Uncharted2";break;case te:n="OptimizedCineon";break;case ne:n="ACESFilmic";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Lr(e){return""!==e}function Or(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function Dr(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}function Pr(e){return e.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(e,t){var n=on[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Pr(n)})}function Nr(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(e,t,n,i){for(var r="",a=parseInt(t);a<parseInt(n);a++)r+=i.replace(/\[ i \]/g,"[ "+a+" ]");return r})}function kr(e,t,n,i,r,a,o,s){var l=e.context,u=i.defines,d=r.vertexShader,c=r.fragmentShader,p="SHADOWMAP_TYPE_BASIC";a.shadowMapType===f?p="SHADOWMAP_TYPE_PCF":a.shadowMapType===h&&(p="SHADOWMAP_TYPE_PCF_SOFT");var m="ENVMAP_TYPE_CUBE",g="ENVMAP_MODE_REFLECTION",v="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(i.envMap.mapping){case ie:case re:m="ENVMAP_TYPE_CUBE";break;case le:case ue:m="ENVMAP_TYPE_CUBE_UV";break;case ae:case oe:m="ENVMAP_TYPE_EQUIREC";break;case se:m="ENVMAP_TYPE_SPHERE"}switch(i.envMap.mapping){case re:case oe:g="ENVMAP_MODE_REFRACTION"}switch(i.combine){case K:v="ENVMAP_BLENDING_MULTIPLY";break;case X:v="ENVMAP_BLENDING_MIX";break;case Q:v="ENVMAP_BLENDING_ADD"}}var y,_,E,b,T,w=e.gammaFactor>0?e.gammaFactor:1,A=o.isWebGL2?"":function(e,t,n){return[(e=e||{}).derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap&&!t.objectSpaceNormalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Lr).join("\n")}(i.extensions,a,t),S=function(e){var t=[];for(var n in e){var i=e[n];!1!==i&&t.push("#define "+n+" "+i)}return t.join("\n")}(u),x=l.createProgram();if(i.isRawShaderMaterial?((y=[S].filter(Lr).join("\n")).length>0&&(y+="\n"),(_=[A,S].filter(Lr).join("\n")).length>0&&(_+="\n")):(y=["precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,S,a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+w,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+g:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+p:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(o.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Lr).join("\n"),_=[A,"precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,S,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+w,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+m:"",a.envMap?"#define "+g:"",a.envMap?"#define "+v:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+p:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(o.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",a.envMap&&(o.isWebGL2||t.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",a.toneMapping!==Z?"#define TONE_MAPPING":"",a.toneMapping!==Z?on.tonemapping_pars_fragment:"",a.toneMapping!==Z?Ir("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.matcapEncoding||a.envMapEncoding||a.emissiveMapEncoding?on.encodings_pars_fragment:"",a.mapEncoding?Cr("mapTexelToLinear",a.mapEncoding):"",a.matcapEncoding?Cr("matcapTexelToLinear",a.matcapEncoding):"",a.envMapEncoding?Cr("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?Cr("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(E="linearToOutputTexel",b=a.outputEncoding,T=Rr(b),"vec4 "+E+"( vec4 value ) { return LinearTo"+T[0]+T[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(Lr).join("\n")),d=Dr(d=Or(d=Pr(d),a),a),c=Dr(c=Or(c=Pr(c),a),a),d=Nr(d),c=Nr(c),o.isWebGL2&&!i.isRawShaderMaterial){var M=!1,R=/^\s*#version\s+300\s+es\s*\n/;i.isShaderMaterial&&null!==d.match(R)&&null!==c.match(R)&&(M=!0,d=d.replace(R,""),c=c.replace(R,"")),y=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,_=["#version 300 es\n","#define varying in",M?"":"out highp vec4 pc_fragColor;",M?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_}var C,I,L=_+c,O=xr(l,35633,y+d,e.debug.checkShaderErrors),D=xr(l,35632,L,e.debug.checkShaderErrors);if(l.attachShader(x,O),l.attachShader(x,D),void 0!==i.index0AttributeName?l.bindAttribLocation(x,0,i.index0AttributeName):!0===a.morphTargets&&l.bindAttribLocation(x,0,"position"),l.linkProgram(x),e.debug.checkShaderErrors){var P=l.getProgramInfoLog(x).trim(),N=l.getShaderInfoLog(O).trim(),k=l.getShaderInfoLog(D).trim(),F=!0,B=!0;!1===l.getProgramParameter(x,35714)?(F=!1,console.error("THREE.WebGLProgram: shader error: ",l.getError(),"35715",l.getProgramParameter(x,35715),"gl.getProgramInfoLog",P,N,k)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==k||(B=!1),B&&(this.diagnostics={runnable:F,material:i,programLog:P,vertexShader:{log:N,prefix:y},fragmentShader:{log:k,prefix:_}})}return l.deleteShader(O),l.deleteShader(D),this.getUniforms=function(){return void 0===C&&(C=new Sr(l,x,s)),C},this.getAttributes=function(){return void 0===I&&(I=function(e,t){for(var n={},i=e.getProgramParameter(t,35721),r=0;r<i;r++){var a=e.getActiveAttrib(t,r).name;n[a]=e.getAttribLocation(t,a)}return n}(l,x)),I},this.destroy=function(){l.deleteProgram(x),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=Mr++,this.code=n,this.usedTimes=1,this.program=x,this.vertexShader=O,this.fragmentShader=D,this}function Fr(e,t,n,i){var r=[],a={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},o=["precision","supportsVertexTextures","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function s(e,t){var n;return e?e.isTexture?n=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=e.texture.encoding):n=vt,n===vt&&t&&(n=_t),n}this.getParameters=function(t,i,r,o,l,u,d){var c=a[t.type],f=d.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(n.floatVertexTextures)return 1024;var i=n.maxVertexUniforms,r=Math.floor((i-20)/4),a=Math.min(r,t.length);return a<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+a+"."),0):a}(d):0,h=n.precision;null!==t.precision&&(h=n.getMaxPrecision(t.precision))!==t.precision&&console.warn("THREE.WebGLProgram.getParameters:",t.precision,"not supported, using",h,"instead.");var p=e.getRenderTarget();return{shaderID:c,precision:h,supportsVertexTextures:n.vertexTextures,outputEncoding:s(p?p.texture:null,e.gammaOutput),map:!!t.map,mapEncoding:s(t.map,e.gammaInput),matcap:!!t.matcap,matc
vendor: 5,394 bytes, line 1
1apEncoding:s(t.matcap,e.gammaInput),envMap:!!t.envMap,envMapMode:t.envMap&&t.envMap.mapping,envMapEncoding:s(t.envMap,e.gammaInput),envMapCubeUV:!!t.envMap&&(t.envMap.mapping===le||t.envMap.mapping===ue),lightMap:!!t.lightMap,aoMap:!!t.aoMap,emissiveMap:!!t.emissiveMap,emissiveMapEncoding:s(t.emissiveMap,e.gammaInput),bumpMap:!!t.bumpMap,normalMap:!!t.normalMap,objectSpaceNormalMap:t.normalMapType===xt,displacementMap:!!t.displacementMap,roughnessMap:!!t.roughnessMap,metalnessMap:!!t.metalnessMap,specularMap:!!t.specularMap,alphaMap:!!t.alphaMap,gradientMap:!!t.gradientMap,combine:t.combine,vertexTangents:t.normalMap&&t.vertexTangents,vertexColors:t.vertexColors,fog:!!o,useFog:t.fog,fogExp:o&&o.isFogExp2,flatShading:t.flatShading,sizeAttenuation:t.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:t.skinning&&f>0,maxBones:f,useVertexTexture:n.floatVertexTextures,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:i.directional.length,numPointLights:i.point.length,numSpotLights:i.spot.length,numRectAreaLights:i.rectArea.length,numHemiLights:i.hemi.length,numClippingPlanes:l,numClipIntersection:u,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&d.receiveShadow&&r.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:t.side===g,flipSided:t.side===m,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCode=function(t,n){var i=[];if(n.shaderID?i.push(n.shaderID):(i.push(t.fragmentShader),i.push(t.vertexShader)),void 0!==t.defines)for(var r in t.defines)i.push(r),i.push(t.defines[r]);for(var a=0;a<o.length;a++)i.push(n[o[a]]);return i.push(t.onBeforeCompile.toString()),i.push(e.gammaOutput),i.push(e.gammaFactor),i.join()},this.acquireProgram=function(a,o,s,l){for(var u,d=0,c=r.length;d<c;d++){var f=r[d];if(f.code===l){++(u=f).usedTimes;break}}return void 0===u&&(u=new kr(e,t,l,a,o,s,n,i),r.push(u)),u},this.releaseProgram=function(e){if(0===--e.usedTimes){var t=r.indexOf(e);r[t]=r[r.length-1],r.pop(),e.destroy()}},this.programs=r}function Br(){var e=new WeakMap;return{get:function(t){var n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,i){e.get(t)[n]=i},dispose:function(){e=new WeakMap}}}function Ur(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function jr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Gr(){var e=[],t=0,n=[],i=[],r={id:-1};function a(n,i,a,o,s,l){var u=e[t];return void 0===u?(u={id:n.id,object:n,geometry:i,material:a,program:a.program||r,groupOrder:o,renderOrder:n.renderOrder,z:s,group:l},e[t]=u):(u.id=n.id,u.object=n,u.geometry=i,u.material=a,u.program=a.program||r,u.groupOrder=o,u.renderOrder=n.renderOrder,u.z=s,u.group=l),t++,u}return{opaque:n,transparent:i,init:function(){t=0,n.length=0,i.length=0},push:function(e,t,r,o,s,l){var u=a(e,t,r,o,s,l);(!0===r.transparent?i:n).push(u)},unshift:function(e,t,r,o,s,l){var u=a(e,t,r,o,s,l);(!0===r.transparent?i:n).unshift(u)},sort:function(){n.length>1&&n.sort(Ur),i.length>1&&i.sort(jr)}}}function Vr(){var e={};function t(n){var i=n.target;i.removeEventListener("dispose",t),delete e[i.id]}return{get:function(n,i){var r,a=e[n.id];return void 0===a?(r=new Gr,e[n.id]={},e[n.id][i.id]=r,n.addEventListener("dispose",t)):void 0===(r=a[i.id])&&(r=new Gr,a[i.id]=r),r},dispose:function(){e={}}}}function Hr(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new It,color:new hn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"SpotLight":n={position:new It,direction:new It,color:new hn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"PointLight":n={position:new It,color:new hn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Rt,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new It,skyColor:new hn,groundColor:new hn};break;case"RectAreaLight":n={color:new hn,position:new It,halfWidth:new It,halfHeight:new It}}return e[t.id]=n,n}}}var zr=0;function Wr(){for(var e=new Hr,t={id:zr++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=0;n<9;n++)t.probe.push(new It);var i=new It,r=new an,a=new an;return{setup:function(n,o,s){for(var l=0,u=0,d=0,c=0;c<9;c++)t.probe[c].set(0,0,0);for(var f=0,h=0,p=0,m=0,g=0,v=s.matrixWorldInverse,y=(c=0,n.length);c<y;c++){var _=n[c],E=_.color,b=_.intensity,T=_.distance,w=_.shadow&&_.shadow.map?_.shadow.map.texture:null;if(_.isAmbientLight)l+=E.r*b,u+=E.g*b,d+=E.b*b;else if(_.isLightProbe)for(var A=0;A<9;
vendor: 4,539 bytes, line 1
1A++)t.probe[A].addScaledVector(_.sh.coefficients[A],b);else if(_.isDirectionalLight){if((x=e.get(_)).color.copy(_.color).multiplyScalar(_.intensity),x.direction.setFromMatrixPosition(_.matrixWorld),i.setFromMatrixPosition(_.target.matrixWorld),x.direction.sub(i),x.direction.transformDirection(v),x.shadow=_.castShadow,_.castShadow){var S=_.shadow;x.shadowBias=S.bias,x.shadowRadius=S.radius,x.shadowMapSize=S.mapSize}t.directionalShadowMap[f]=w,t.directionalShadowMatrix[f]=_.shadow.matrix,t.directional[f]=x,f++}else if(_.isSpotLight){if((x=e.get(_)).position.setFromMatrixPosition(_.matrixWorld),x.position.applyMatrix4(v),x.color.copy(E).multiplyScalar(b),x.distance=T,x.direction.setFromMatrixPosition(_.matrixWorld),i.setFromMatrixPosition(_.target.matrixWorld),x.direction.sub(i),x.direction.transformDirection(v),x.coneCos=Math.cos(_.angle),x.penumbraCos=Math.cos(_.angle*(1-_.penumbra)),x.decay=_.decay,x.shadow=_.castShadow,_.castShadow){S=_.shadow;x.shadowBias=S.bias,x.shadowRadius=S.radius,x.shadowMapSize=S.mapSize}t.spotShadowMap[p]=w,t.spotShadowMatrix[p]=_.shadow.matrix,t.spot[p]=x,p++}else if(_.isRectAreaLight){(x=e.get(_)).color.copy(E).multiplyScalar(b),x.position.setFromMatrixPosition(_.matrixWorld),x.position.applyMatrix4(v),a.identity(),r.copy(_.matrixWorld),r.premultiply(v),a.extractRotation(r),x.halfWidth.set(.5*_.width,0,0),x.halfHeight.set(0,.5*_.height,0),x.halfWidth.applyMatrix4(a),x.halfHeight.applyMatrix4(a),t.rectArea[m]=x,m++}else if(_.isPointLight){if((x=e.get(_)).position.setFromMatrixPosition(_.matrixWorld),x.position.applyMatrix4(v),x.color.copy(_.color).multiplyScalar(_.intensity),x.distance=_.distance,x.decay=_.decay,x.shadow=_.castShadow,_.castShadow){S=_.shadow;x.shadowBias=S.bias,x.shadowRadius=S.radius,x.shadowMapSize=S.mapSize,x.shadowCameraNear=S.camera.near,x.shadowCameraFar=S.camera.far}t.pointShadowMap[h]=w,t.pointShadowMatrix[h]=_.shadow.matrix,t.point[h]=x,h++}else if(_.isHemisphereLight){var x;(x=e.get(_)).direction.setFromMatrixPosition(_.matrixWorld),x.direction.transformDirection(v),x.direction.normalize(),x.skyColor.copy(_.color).multiplyScalar(b),x.groundColor.copy(_.groundColor).multiplyScalar(b),t.hemi[g]=x,g++}}t.ambient[0]=l,t.ambient[1]=u,t.ambient[2]=d,t.directional.length=f,t.spot.length=p,t.rectArea.length=m,t.point.length=h,t.hemi.length=g,t.hash.stateID=t.id,t.hash.directionalLength=f,t.hash.pointLength=h,t.hash.spotLength=p,t.hash.rectAreaLength=m,t.hash.hemiLength=g,t.hash.shadowsLength=o.length},state:t}}function qr(){var e=new Wr,t=[],n=[];return{init:function(){t.length=0,n.length=0},state:{lightsArray:t,shadowsArray:n,lights:e},setupLights:function(i){e.setup(t,n,i)},pushLight:function(e){t.push(e)},pushShadow:function(e){n.push(e)}}}function Yr(){var e={};function t(n){var i=n.target;i.removeEventListener("dispose",t),delete e[i.id]}return{get:function(n,i){var r;return void 0===e[n.id]?(r=new qr,e[n.id]={},e[n.id][i.id]=r,n.addEventListener("dispose",t)):void 0===e[n.id][i.id]?(r=new qr,e[n.id][i.id]=r):r=e[n.id][i.id],r},dispose:function(){e={}}}}function Kr(e){Jn.call(this),this.type="MeshDepthMaterial",this.depthPacking=At,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(e)}function Xr(e){Jn.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new It,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(e)}function Qr(e,t,n){for(var i=new rn,r=new an,a=new Rt,o=new Rt(n,n),s=new It,l=new It,u=new Array(4),d=new Array(4),c={},h={0:m,1:p,2:g},v=[new It(1,0,0),new It(-1,0,0),new It(0,0,1),new It(0,0,-1),new It(0,1,0),new It(0,-1,0)],_=[new It(0,1,0),new It(0,1,0),new It(0,1,0),new It(0,1,0),new It(0,0,1),new It(0,0,-1)],E=[new Xt,new Xt,new Xt,new Xt,new Xt,new Xt],b=0;4!==b;++b){var T=!!(1&b),w=!!(2&b),A=new Kr({depthPacking:St,morphTargets:T,skinning:w});u[b]=A;var S=new Xr({morphTargets:T,skinning:w});d[b]=S}var x=this;function M(t,n,i,r,a,o){var s=t.geometry,l=null,f=u,p=t.customDepthMaterial;if(i&&(f=d,p=t.customDistanceMaterial),p)l=p;else{var m=!1;n.morphTargets&&(s&&s.isBufferGeometry?m=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(m=s.morphTargets&&s.morphTargets.length>
vendor: 4,711 bytes, line 1
10)),t.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t);var g=0;m&&(g|=1),t.isSkinnedMesh&&n.skinning&&(g|=2),l=f[g]}if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var v=l.uuid,y=n.uuid,_=c[v];void 0===_&&(_={},c[v]=_);var E=_[y];void 0===E&&(E=l.clone(),_[y]=E),l=E}return l.visible=n.visible,l.wireframe=n.wireframe,l.side=null!=n.shadowSide?n.shadowSide:h[n.side],l.clipShadows=n.clipShadows,l.clippingPlanes=n.clippingPlanes,l.clipIntersection=n.clipIntersection,l.wireframeLinewidth=n.wireframeLinewidth,l.linewidth=n.linewidth,i&&l.isMeshDistanceMaterial&&(l.referencePosition.copy(r),l.nearDistance=a,l.farDistance=o),l}function R(n,r,a,o){if(!1!==n.visible){if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);var s=t.update(n),u=n.material;if(Array.isArray(u))for(var d=s.groups,c=0,f=d.length;c<f;c++){var h=d[c],p=u[h.materialIndex];if(p&&p.visible){var m=M(n,p,o,l,a.near,a.far);e.renderBufferDirect(a,null,s,m,n,h)}}else if(u.visible){m=M(n,u,o,l,a.near,a.far);e.renderBufferDirect(a,null,s,m,n,null)}}for(var g=n.children,v=0,y=g.length;v<y;v++)R(g[v],r,a,o)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=f,this.render=function(t,n,u){if(!1!==x.enabled&&(!1!==x.autoUpdate||!1!==x.needsUpdate)&&0!==t.length){var d,c=e.getRenderTarget(),f=e.getActiveCubeFace(),h=e.getActiveMipMapLevel(),p=e.state;p.setBlending(y),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var m=0,g=t.length;m<g;m++){var b=t[m],T=b.shadow,w=b&&b.isPointLight;if(void 0!==T){var A=T.camera;if(a.copy(T.mapSize),a.min(o),w){var S=a.x,M=a.y;E[0].set(2*S,M,S,M),E[1].set(0,M,S,M),E[2].set(3*S,M,S,M),E[3].set(S,M,S,M),E[4].set(3*S,0,S,M),E[5].set(S,0,S,M),a.x*=4,a.y*=2}if(null===T.map){var C={minFilter:he,magFilter:he,format:De};T.map=new Qt(a.x,a.y,C),T.map.texture.name=b.name+".shadowMap",A.updateProjectionMatrix()}T.isSpotLightShadow&&T.update(b);var I=T.map,L=T.matrix;l.setFromMatrixPosition(b.matrixWorld),A.position.copy(l),w?(d=6,L.makeTranslation(-l.x,-l.y,-l.z)):(d=1,s.setFromMatrixPosition(b.target.matrixWorld),A.lookAt(s),A.updateMatrixWorld(),L.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),L.multiply(A.projectionMatrix),L.multiply(A.matrixWorldInverse)),e.setRenderTarget(I),e.clear();for(var O=0;O<d;O++){if(w){s.copy(A.position),s.add(v[O]),A.up.copy(_[O]),A.lookAt(s),A.updateMatrixWorld();var D=E[O];p.viewport(D)}r.multiplyMatrices(A.projectionMatrix,A.matrixWorldInverse),i.setFromMatrix(r),R(n,u,A,w)}}else console.warn("THREE.WebGLShadowMap:",b,"has no shadow.")}x.needsUpdate=!1,e.setRenderTarget(c,f,h)}}}function Zr(e,t,n,i){var r=new function(){var t=!1,n=new Xt,i=null,r=new Xt(0,0,0,0);return{setMask:function(n){i===n||t||(e.colorMask(n,n,n,n),i=n)},setLocked:function(e){t=e},setClear:function(t,i,a,o,s){!0===s&&(t*=o,i*=o,a*=o),n.set(t,i,a,o),!1===r.equals(n)&&(e.clearColor(t,i,a,o),r.copy(n))},reset:function(){t=!1,i=null,r.set(-1,0,0,0)}}},a=new function(){var t=!1,n=null,i=null,r=null;return{setTest:function(e){e?ae(2929):oe(2929)},setMask:function(i){n===i||t||(e.depthMask(i),n=i)},setFunc:function(t){if(i!==t){if(t)switch(t){case j:e.depthFunc(512);break;case G:e.depthFunc(519);break;case V:e.depthFunc(513);break;case H:e.depthFunc(515);break;case z:e.depthFunc(514);break;case W:e.depthFunc(518);break;case q:e.depthFunc(516);break;case Y:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);i=t}},setLocked:function(e){t=e},setClear:function(t){r!==t&&(e.clearDepth(t),r=t)},reset:function(){t=!1,n=null,i=null,r=null}}},o=new function(){var t=!1,n=null,i=null,r=null,a=null,o=null,s=null,l=null,u=null;return{setTest:function(e){e?ae(2960):oe(2960)},setMask:function(i){n===i||t||(e.stencilMask(i),n=i)},setFunc:function(t,n,o){i===t&&r===n&&a===o||(e.stencilFunc(t,n,o),i=t,r=n,a=o)},setOp:function(t,n,i){o===t&&s===n&&l===i||(e.stencilOp(t,n,i),o=t,s=n,l=i)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,n=null,i=null,r=null,a=null,o=null,s=null,l=null,u=null}}},s=e.getParameter(34921),l=new Uint8Array(s),f=new Uint8Array(s),h=new Uint8Array(s),p={},v=null,S=null,x=null,M=null,R=null,C=null,I=null,L=null,O=null,D=null,P=!1,N=null,k=null,F=null,B=null,U=null,K=e.getParameter(35661),X=!1,Q=0,Z=e.getParameter(7938);-1!==Z.indexOf("WebGL")?(Q=parseFloat(/^WebGL\ ([0-9])/.exec(Z)[1]),X=Q>=1):-1!==Z.indexOf("OpenGL ES")&&(Q=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(Z)[1]),X=Q>=2);var J=null,$={}
vendor: 4,840 bytes, line 1
1,ee=new Xt,te=new Xt;function ne(t,n,i){var r=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var o=0;o<i;o++)e.texImage2D(n+o,0,6408,1,1,0,6408,5121,r);return a}var ie={};function re(n,r){(l[n]=1,0===f[n]&&(e.enableVertexAttribArray(n),f[n]=1),h[n]!==r)&&((i.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),h[n]=r)}function ae(t){!0!==p[t]&&(e.enable(t),p[t]=!0)}function oe(t){!1!==p[t]&&(e.disable(t),p[t]=!1)}function se(t,i,r,a,o,s,l,u){if(t!==y){if(x||(ae(3042),x=!0),t===w)o=o||i,s=s||r,l=l||a,i===R&&o===L||(e.blendEquationSeparate(n.convert(i),n.convert(o)),R=i,L=o),r===C&&a===I&&s===O&&l===D||(e.blendFuncSeparate(n.convert(r),n.convert(a),n.convert(s),n.convert(l)),C=r,I=a,O=s,D=l),M=t,P=null;else if(t!==M||u!==P){if(R===A&&L===A||(e.blendEquation(32774),R=A,L=A),u)switch(t){case _:e.blendFuncSeparate(1,771,1,771);break;case E:e.blendFunc(1,1);break;case b:e.blendFuncSeparate(0,0,769,771);break;case T:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case _:e.blendFuncSeparate(770,771,1,771);break;case E:e.blendFunc(770,1);break;case b:e.blendFunc(0,769);break;case T:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}C=null,I=null,O=null,D=null,M=t,P=u}}else x&&(oe(3042),x=!1)}function le(t){N!==t&&(t?e.frontFace(2304):e.frontFace(2305),N=t)}function ue(t){t!==u?(ae(2884),t!==k&&(t===d?e.cullFace(1029):t===c?e.cullFace(1028):e.cullFace(1032))):oe(2884),k=t}function de(t,n,i){t?(ae(32823),B===n&&U===i||(e.polygonOffset(n,i),B=n,U=i)):oe(32823)}function ce(t){void 0===t&&(t=33984+K-1),J!==t&&(e.activeTexture(t),J=t)}return ie[3553]=ne(3553,3553,1),ie[34067]=ne(34067,34069,6),r.setClear(0,0,0,1),a.setClear(1),o.setClear(0),ae(2929),a.setFunc(H),le(!1),ue(d),ae(2884),se(y),{buffers:{color:r,depth:a,stencil:o},initAttributes:function(){for(var e=0,t=l.length;e<t;e++)l[e]=0},enableAttribute:function(e){re(e,0)},enableAttributeAndDivisor:re,disableUnusedAttributes:function(){for(var t=0,n=f.length;t!==n;++t)f[t]!==l[t]&&(e.disableVertexAttribArray(t),f[t]=0)},enable:ae,disable:oe,getCompressedTextureFormats:function(){if(null===v&&(v=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")||t.get("WEBGL_compressed_texture_astc")))for(var n=e.getParameter(34467),i=0;i<n.length;i++)v.push(n[i]);return v},useProgram:function(t){return S!==t&&(e.useProgram(t),S=t,!0)},setBlending:se,setMaterial:function(e,t){e.side===g?oe(2884):ae(2884);var n=e.side===m;t&&(n=!n),le(n),e.blending===_&&!1===e.transparent?se(y):se(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),a.setFunc(e.depthFunc),a.setTest(e.depthTest),a.setMask(e.depthWrite),r.setMask(e.colorWrite),de(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:le,setCullFace:ue,setLineWidth:function(t){t!==F&&(X&&e.lineWidth(t),F=t)},setPolygonOffset:de,setScissorTest:function(e){e?ae(3089):oe(3089)},activeTexture:ce,bindTexture:function(t,n){null===J&&ce();var i=$[J];void 0===i&&(i={type:void 0,texture:void 0},$[J]=i),i.type===t&&i.texture===n||(e.bindTexture(t,n||ie[t]),i.type=t,i.texture=n)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===ee.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),ee.copy(t))},viewport:function(t){!1===te.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),te.copy(t))},reset:function(){for(var t=0;t<f.length;t++)1===f[t]&&(e.disableVertexAttribArray(t),f[t]=0);p={},v=null,J=null,$={},S=null,M=null,N=null,k=null,r.reset(),a.reset(),o.reset()}}}function Jr(e,t,n,i,r,a,o){var s,l={},u="undefined"!=typeof OffscreenCanvas;function d(e,t){return u?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function c(e,t,n,i){var r=1;if((e.width>i||e.height>i)&&(r=i/Math.max(e.width,e.height)),r<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){var a=t?Mt.floorPowerOfTwo:Math.floor,o=a(r*e.width),l=a(r*e.height);void 0===s&&(s=d(o,l));var u=n?d(o,l):s;return u.width=o,u.height=l,u.getContext("2d").drawImage(e,0,0,o,l),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+
vendor: 6,897 bytes, line 1
1o+"x"+l+")."),u}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function f(e){return Mt.isPowerOfTwo(e.width)&&Mt.isPowerOfTwo(e.height)}function h(e,t){return e.generateMipmaps&&t&&e.minFilter!==he&&e.minFilter!==ge}function p(t,n,r,a){e.generateMipmap(t),i.get(n).__maxMipLevel=Math.log(Math.max(r,a))*Math.LOG2E}function m(e,n){if(!r.isWebGL2)return e;var i=e;return 6403===e&&(5126===n&&(i=33326),5131===n&&(i=33325),5121===n&&(i=33321)),6407===e&&(5126===n&&(i=34837),5131===n&&(i=34843),5121===n&&(i=32849)),6408===e&&(5126===n&&(i=34836),5131===n&&(i=34842),5121===n&&(i=32856)),33325===i||33326===i||34842===i||34836===i?t.get("EXT_color_buffer_float"):34843!==i&&34837!==i||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),i}function g(e){return e===he||e===pe||e===me?9728:9729}function v(t){var n=t.target;n.removeEventListener("dispose",v),function(t){var n=i.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),i.remove(t)}(n),n.isVideoTexture&&delete l[n.id],o.memory.textures--}function y(t){var n=t.target;n.removeEventListener("dispose",y),function(t){var n=i.get(t),r=i.get(t.texture);if(!t)return;void 0!==r.__webglTexture&&e.deleteTexture(r.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLRenderTargetCube)for(var a=0;a<6;a++)e.deleteFramebuffer(n.__webglFramebuffer[a]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[a]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);i.remove(t.texture),i.remove(t)}(n),o.memory.textures--}var _=0;function E(e,t){var r=i.get(e);if(e.isVideoTexture&&function(e){var t=e.id,n=o.render.frame;l[t]!==n&&(l[t]=n,e.update())}(e),e.version>0&&r.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==a.complete)return void S(r,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,r.__webglTexture)}function b(t,o){var s=i.get(t);if(6===t.image.length)if(t.version>0&&s.__version!==t.version){A(s,t),n.activeTexture(33984+o),n.bindTexture(34067,s.__webglTexture),e.pixelStorei(37440,t.flipY);for(var l=t&&t.isCompressedTexture,u=t.image[0]&&t.image[0].isDataTexture,d=[],g=0;g<6;g++)d[g]=l||u?u?t.image[g].image:t.image[g]:c(t.image[g],!1,!0,r.maxCubemapSize);var v=d[0],y=f(v)||r.isWebGL2,_=a.convert(t.format),E=a.convert(t.type),b=m(_,E);w(34067,t,y);for(g=0;g<6;g++)if(l)for(var T,S=d[g].mipmaps,x=0,M=S.length;x<M;x++)T=S[x],t.format!==De&&t.format!==Oe?n.getCompressedTextureFormats().indexOf(_)>-1?n.compressedTexImage2D(34069+g,x,b,T.width,T.height,0,T.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+g,x,b,T.width,T.height,0,_,E,T.data);else u?n.texImage2D(34069+g,0,b,d[g].width,d[g].height,0,_,E,d[g].data):n.texImage2D(34069+g,0,b,_,E,d[g]);s.__maxMipLevel=l?S.length-1:0,h(t,y)&&p(34067,t,v.width,v.height),s.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(33984+o),n.bindTexture(34067,s.__webglTexture)}function T(e,t){n.activeTexture(33984+t),n.bindTexture(34067,i.get(e).__webglTexture)}function w(n,o,s){var l;if(s?(e.texParameteri(n,10242,a.convert(o.wrapS)),e.texParameteri(n,10243,a.convert(o.wrapT)),32879!==n&&35866!==n||e.texParameteri(n,32882,a.convert(o.wrapR)),e.texParameteri(n,10240,a.convert(o.magFilter)),e.texParameteri(n,10241,a.convert(o.minFilter))):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS===ce&&o.wrapT===ce||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,g(o.magFilter)),e.texParameteri(n,10241,g(o.minFilter)),o.minFilter!==he&&o.minFilter!==ge&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),l=t.get("EXT_texture_filter_anisotropic")){if(o.type===Se&&null===t.get("OES_texture_float_linear"))return;if(o.type===xe&&null===(r.isWebGL2||t.get("OES_texture_half_float_linear")))return;(o.anisotropy>1||i.get(o).__currentAnisotropy)&&(e.texParameterf(n,l.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,r.getMaxAnisotropy())),i.get(o).__currentAnisotropy=o.anisotropy)}}function A(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",v),t.__webglTexture=e.createTexture(),o.memory.textures++)}function S(t,i,o){var s=3553;i.isDataTexture2DArray&&(s=35866),i.isDataTexture3D&&(s=32879),A(t,i),n.activeTexture(33984+o),n.bindTexture(s,t.__webglTexture),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment);var l=function(e){return!r.isWebGL2&&(e.wrapS!==ce||e.wrapT!==ce||e.minFilter!==he&&e.minFilter!==ge)}(i)&&!1===f(i.image),u=c(i.image,l,!1,r.maxTextureSize),d=f(u)||r.isWebGL2,g=a.convert(i.format),v=a.convert(i.type),y=m(g,v);w(s,i,d);var _,E=i.mipmaps;if(i.isDepthTexture){if(y=6402,i.type===Se){if(!r.isWebGL2)throw new Error("Float Depth Texture only supported in WebGL2.0");y=36012}else r.isWebGL2&&(y=33189);i.format===ke&&6402===y&&i.type!==Te&&i.type!==Ae&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Te,v=a.convert(i.type)),i.format===Fe&&(y=34041,i.type!==Ie&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=Ie,v=a.convert(i.type))),n.texImage2D(3553,0,y,u.width,u.height,0,g,v,null)}else if(i.isDataTexture)if(E.length>0&&d){for(var b=0,T=E.length;b<T;b++)_=E[b],n.texImage2D(3553,b,y,_.width,_.height,0,g,v,_.data);i.generateMipmaps=!1,t.__maxMipLevel=E.length-1}else n.texImage2D(3553,0,y,u.width,u.height,0,g,v,u.data),t.__maxMipLevel=0;else if(i.isCompressedTexture){for(b=0,T=E.length;b<T;b++)_=E[b],i.format!==De&&i.format!==Oe?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(3553,b,y,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,b,y,_.width,_.height,0,g,v,_.data);t.__maxMipLevel=E.length-1}else if(i.isDataTexture2DArray)n.texImage3D(35866,0,y,u.width,u.height,u.depth,0,g,v,u.data),t.__maxMipLevel=0;else if(i.isDataTexture3D)n.texImage3D(32879,0,y,u.width,u.height,u.depth,0,g,v,u.data),t.__maxMipLevel=0;else if(E.length>0&&d){for(b=0,T=E.length;b<T;b++)_=E[b],n.texImage2D(3553,b,y,g,v,_);i.generateMipmaps=!1,t.__maxMipLevel=E.length-1}else n.texImage2D(3553,0,y,g,v,u),t.__maxMipLevel=0;
vendor: 5,870 bytes, line 1
1h(i,d)&&p(3553,i,u.width,u.height),t.__version=i.version,i.onUpdate&&i.onUpdate(i)}function x(t,r,o,s){var l=a.convert(r.texture.format),u=a.convert(r.texture.type),d=m(l,u);n.texImage2D(s,0,d,r.width,r.height,0,l,u,null),e.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,o,s,i.get(r.texture).__webglTexture,0),e.bindFramebuffer(36160,null)}function M(t,n,i){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){if(i){var r=C(n);e.renderbufferStorageMultisample(36161,r,33189,n.width,n.height)}else e.renderbufferStorage(36161,33189,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(i){r=C(n);e.renderbufferStorageMultisample(36161,r,34041,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{var o=m(a.convert(n.texture.format),a.convert(n.texture.type));if(i){r=C(n);e.renderbufferStorageMultisample(36161,r,o,n.width,n.height)}else e.renderbufferStorage(36161,o,n.width,n.height)}e.bindRenderbuffer(36161,null)}function R(t){var n=i.get(t),r=!0===t.isWebGLRenderTargetCube;if(t.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),E(n.depthTexture,0);var r=i.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===ke)e.framebufferTexture2D(36160,36096,3553,r,0);else{if(n.depthTexture.format!==Fe)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,r,0)}}(n.__webglFramebuffer,t)}else if(r){n.__webglDepthbuffer=[];for(var a=0;a<6;a++)e.bindFramebuffer(36160,n.__webglFramebuffer[a]),n.__webglDepthbuffer[a]=e.createRenderbuffer(),M(n.__webglDepthbuffer[a],t)}else e.bindFramebuffer(36160,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),M(n.__webglDepthbuffer,t);e.bindFramebuffer(36160,null)}function C(e){return r.isWebGL2&&e.isWebGLMultisampleRenderTarget?Math.min(r.maxSamples,e.samples):0}var I=!1,L=!1;this.allocateTextureUnit=function(){var e=_;return e>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+r.maxTextures),_+=1,e},this.resetTextureUnits=function(){_=0},this.setTexture2D=E,this.setTexture2DArray=function(e,t){var r=i.get(e);e.version>0&&r.__version!==e.version?S(r,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(e,t){var r=i.get(e);e.version>0&&r.__version!==e.version?S(r,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,r.__webglTexture))},this.setTextureCube=b,this.setTextureCubeDynamic=T,this.setupRenderTarget=function(t){var s=i.get(t),l=i.get(t.texture);t.addEventListener("dispose",y),l.__webglTexture=e.createTexture(),o.memory.textures++;var u=!0===t.isWebGLRenderTargetCube,d=!0===t.isWebGLMultisampleRenderTarget,c=f(t)||r.isWebGL2;if(u){s.__webglFramebuffer=[];for(var g=0;g<6;g++)s.__webglFramebuffer[g]=e.createFramebuffer()}else if(s.__webglFramebuffer=e.createFramebuffer(),d)if(r.isWebGL2){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,s.__webglColorRenderbuffer);var v=m(a.convert(t.texture.format),a.convert(t.texture.type)),_=C(t);e.renderbufferStorageMultisample(36161,_,v,t.width,t.height),e.bindFramebuffer(36160,s.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,s.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),M(s.__webglDepthRenderbuffer,t,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(u){n.bindTexture(34067,l.__webglTexture),w(34067,t.texture,c);for(g=0;g<6;g++)x(s.__webglFramebuffer[g],t,36064,34069+g);h(t.texture,c)&&p(34067,t.texture,t.width,t.height),n.bindTexture(34067,null)}else n.bindTexture(3553,l.__webglTexture),w(3553,t.texture,c),x(s.__webglFramebuffer,t,36064,3553),h(t.texture,c)&&p(3553,t.texture,t.width,t.height),n.bindTexture(3553,null);t.depthBuffer&&R(t)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(h(t,f(e)||r.isWebGL2)){var a=e.isWebGLRenderTargetCube?34067:3553,o=i.get(t).__webglTexture;n.bindTexture(a,o),p(a,t,e.width,e.height),n.bindTexture(a,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(r.isWebGL2){var n=i.get(t);e.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,n.__webglFramebuffer);var a=t.width,o=t.height,s=16384;t.depthBuffer&&(s|=256),t.stencilBuffer&&(s|=1024),e.blitFramebuffer(0,0,a,o,0,0,a,o,s,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===I&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),I=!0),e=e.texture),E(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLRenderTargetCube&&(!1===L&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),L=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?b(e,t):T(e,t)}}function $r(e,t,n){return{convert:function(e){var i;if(e===de)return 10497;
vendor: 5,297 bytes, line 1
1if(e===ce)return 33071;if(e===fe)return 33648;if(e===he)return 9728;if(e===pe)return 9984;if(e===me)return 9986;if(e===ge)return 9729;if(e===ve)return 9985;if(e===ye)return 9987;if(e===_e)return 5121;if(e===Me)return 32819;if(e===Re)return 32820;if(e===Ce)return 33635;if(e===Ee)return 5120;if(e===be)return 5122;if(e===Te)return 5123;if(e===we)return 5124;if(e===Ae)return 5125;if(e===Se)return 5126;if(e===xe){if(n.isWebGL2)return 5131;if(null!==(i=t.get("OES_texture_half_float")))return i.HALF_FLOAT_OES}if(e===Le)return 6406;if(e===Oe)return 6407;if(e===De)return 6408;if(e===Pe)return 6409;if(e===Ne)return 6410;if(e===ke)return 6402;if(e===Fe)return 34041;if(e===Be)return 6403;if(e===A)return 32774;if(e===S)return 32778;if(e===x)return 32779;if(e===C)return 0;if(e===I)return 1;if(e===L)return 768;if(e===O)return 769;if(e===D)return 770;if(e===P)return 771;if(e===N)return 772;if(e===k)return 773;if(e===F)return 774;if(e===B)return 775;if(e===U)return 776;if((e===Ue||e===je||e===Ge||e===Ve)&&null!==(i=t.get("WEBGL_compressed_texture_s3tc"))){if(e===Ue)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===je)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===Ge)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===Ve)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((e===He||e===ze||e===We||e===qe)&&null!==(i=t.get("WEBGL_compressed_texture_pvrtc"))){if(e===He)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===ze)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===We)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===qe)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===Ye&&null!==(i=t.get("WEBGL_compressed_texture_etc1")))return i.COMPRESSED_RGB_ETC1_WEBGL;if((e===Ke||e===Xe||e===Qe||e===Ze||e===Je||e===$e||e===et||e===tt||e===nt||e===it||e===rt||e===at||e===ot||e===st)&&null!==(i=t.get("WEBGL_compressed_texture_astc")))return e;if(e===M||e===R){if(n.isWebGL2){if(e===M)return 32775;if(e===R)return 32776}if(null!==(i=t.get("EXT_blend_minmax"))){if(e===M)return i.MIN_EXT;if(e===R)return i.MAX_EXT}}if(e===Ie){if(n.isWebGL2)return 34042;if(null!==(i=t.get("WEBGL_depth_texture")))return i.UNSIGNED_INT_24_8_WEBGL}return 0}}}function ea(){Rn.call(this),this.type="Group"}function ta(){Rn.call(this),this.type="Camera",this.matrixWorldInverse=new an,this.projectionMatrix=new an,this.projectionMatrixInverse=new an}function na(e,t,n,i){ta.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==i?i:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function ia(e){na.call(this),this.cameras=e||[]}Kr.prototype=Object.create(Jn.prototype),Kr.prototype.constructor=Kr,Kr.prototype.isMeshDepthMaterial=!0,Kr.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},Xr.prototype=Object.create(Jn.prototype),Xr.prototype.constructor=Xr,Xr.prototype.isMeshDistanceMaterial=!0,Xr.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},ea.prototype=Object.assign(Object.create(Rn.prototype),{constructor:ea,isGroup:!0}),ta.prototype=Object.assign(Object.create(Rn.prototype),{constructor:ta,isCamera:!0,copy:function(e,t){return Rn.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new It),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){Rn.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),na.prototype=Object.assign(Object.create(ta.prototype),{constructor:na,isPerspectiveCamera:!0,copy:function(e,t){return ta.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*Mt.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*Mt.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*Mt.RAD2DEG*Math.atan(Math.tan(.5*Mt.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)}
vendor: 14,929 bytes, line 1
1,setViewOffset:function(e,t,n,i,r,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*Mt.DEG2RAD*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;r+=a.offsetX*i/o,t-=a.offsetY*n/s,i*=a.width/o,n*=a.height/s}var l=this.filmOffset;0!==l&&(r+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=Rn.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),ia.prototype=Object.assign(Object.create(na.prototype),{constructor:ia,isArrayCamera:!0});var ra,aa,oa,sa,la,ua,da=new It,ca=new It;function fa(e,t,n){da.setFromMatrixPosition(t.matrixWorld),ca.setFromMatrixPosition(n.matrixWorld);var i=da.distanceTo(ca),r=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=r[14]/(r[10]-1),s=r[14]/(r[10]+1),l=(r[9]+1)/r[5],u=(r[9]-1)/r[5],d=(r[8]-1)/r[0],c=(a[8]+1)/a[0],f=o*d,h=o*c,p=i/(-d+c),m=p*-d;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var g=o+p,v=s+p,y=f-m,_=h+(i-m),E=l*s/v*g,b=u*s/v*g;e.projectionMatrix.makePerspective(y,_,E,b,g,v)}function ha(e){var t,n,i=this,r=null,a=null,o=null,s=[],l=new an,u=new an,d=1,c="local-floor";"undefined"!=typeof window&&"VRFrameData"in window&&(a=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",b,!1));var f=new an,h=new Ct,p=new It,m=new na;m.viewport=new Xt,m.layers.enable(1);var g=new na;g.viewport=new Xt,g.layers.enable(2);var v=new ia([m,g]);function y(){return null!==r&&!0===r.isPresenting}v.layers.enable(1),v.layers.enable(2);var _,E=new Rt;function b(){if(y()){var a=r.getEyeParameters("left");t=2*a.renderWidth*d,n=a.renderHeight*d,_=e.getPixelRatio(),e.getSize(E),e.setDrawingBufferSize(t,n,1),m.viewport.set(0,0,t/2,n),g.viewport.set(t/2,0,t/2,n),S.start()}else i.enabled&&e.setDrawingBufferSize(E.width,E.height,_),S.stop()}var T=[];function w(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),n=0,i=0,r=t.length;n<r;n++){var a=t[n];if(a&&("Daydream Controller"===a.id||"Gear VR Controller"===a.id||"Oculus Go Controller"===a.id||"OpenVR Gamepad"===a.id||a.id.startsWith("Oculus Touch")||a.id.startsWith("Spatial Controller"))){if(i===e)return a;i++}}}function A(e,i){null!==i&&4===i.length&&e.set(i[0]*t,i[1]*n,i[2]*t,i[3]*n)}this.enabled=!1,this.getController=function(e){var t=s[e];return void 0===t&&((t=new ea).matrixAutoUpdate=!1,t.visible=!1,s[e]=t),t},this.getDevice=function(){return r},this.setDevice=function(e){void 0!==e&&(r=e),S.setContext(e)},this.setFramebufferScaleFactor=function(e){d=e},this.setReferenceSpaceType=function(e){c=e},this.setPoseTarget=function(e){void 0!==e&&(o=e)},this.getCamera=function(e){var t="local-floor"===c?1.6:0;if(!1===y())return e.position.set(0,t,0),e.rotation.set(0,0,0),e;if(r.depthNear=e.near,r.depthFar=e.far,r.getFrameData(a),"local-floor"===c){var n=r.stageParameters;n?l.fromArray(n.sittingToStandingTransform):l.makeTranslation(0,t,0)}var i=a.pose,d=null!==o?o:e;d.matrix.copy(l),d.matrix.decompose(d.position,d.quaternion,d.scale),null!==i.orientation&&(h.fromArray(i.orientation),d.quaternion.multiply(h)),null!==i.position&&(h.setFromRotationMatrix(l),p.fromArray(i.position),p.applyQuaternion(h),d.position.add(p)),d.updateMatrixWorld(),m.near=e.near,g.near=e.near,m.far=e.far,g.far=e.far,m.matrixWorldInverse.fromArray(a.leftViewMatrix),g.matrixWorldInverse.fromArray(a.rightViewMatrix),u.getInverse(l),"local-floor"===c&&(m.matrixWorldInverse.multiply(u),g.matrixWorldInverse.multiply(u));var _=d.parent;null!==_&&(f.getInverse(_.matrixWorld),m.matrixWorldInverse.multiply(f),g.matrixWorldInverse.multiply(f)),m.matrixWorld.getInverse(m.matrixWorldInverse),g.matrixWorld.getInverse(g.matrixWorldInverse),m.projectionMatrix.fromArray(a.leftProjectionMatrix),g.projectionMatrix.fromArray(a.rightProjectionMatrix),fa(v,m,g);var E=r.getLayers();if(E.length){var b=E[0];A(m.viewport,b.leftBounds),A(g.viewport,b.rightBounds)}return function(){for(var e=0;e<s.length;e++){var t=s[e],n=w(e);if(void 0!==n&&void 0!==n.pose){if(null===n.pose)return;var i=n.pose;!1===i.hasPosition&&t.position.set(.2,-.6,-.05),null!==i.position&&t.position.fromArray(i.position),null!==i.orientation&&t.quaternion.fromArray(i.orientation),t.matrix.compose(t.position,t.quaternion,t.scale),t.matrix.premultiply(l),t.matrix.decompose(t.position,t.quaternion,t.scale),t.matrixWorldNeedsUpdate=!0,t.visible=!0;var r="Daydream Controller"===n.id?0:1;void 0===T[e]&&(T[e]=!1),T[e]!==n.buttons[r].pressed&&(T[e]=n.buttons[r].pressed,!0===T[e]?t.dispatchEvent({type:"selectstart"}):(t.dispatchEvent({type:"selectend"}),t.dispatchEvent({type:"select"})))}else t.visible=!1}}(),v},this.getStandingMatrix=function(){return l},this.isPresenting=y;var S=new vn;this.setAnimationLoop=function(e){S.setAnimationLoop(e),y()&&S.start()},this.submitFrame=function(){y()&&r.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",b)},this.setFrameOfReferenceType=function(){console.warn("THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.")}}function pa(e){var t=e.context,n=null,i=null,r="local-floor",a=null,o=[],s=[];function l(){return null!==n&&null!==i}var u=new na;u.layers.enable(1),u.viewport=new Xt;var d=new na;d.layers.enable(2),d.viewport=new Xt;var c=new ia([u,d]);function f(e){for(var t=0;t<o.length;t++)s[t]===e.inputSource&&o[t].dispatchEvent({type:e.type})}function h(){e.setFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),v.stop()}function p(e){i=e,v.setContext(n),v.start()}function m(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.getInverse(e.matrixWorld)}c.layers.enable(1),c.layers.enable(2),this.enabled=!1,this.getController=function(e){var t=o[e];return void 0===t&&((t=new ea).matrixAutoUpdate=!1,t.visible=!1,o[e]=t),t},this.setFramebufferScaleFactor=function(e){},this.setReferenceSpaceType=function(e){r=e},this.getSession=function(){return n},this.setSession=function(e){null!==(n=e)&&(n.addEventListener("select",f),n.addEventListener("selectstart",f),n.addEventListener("selectend",f),n.addEventListener("end",h),n.updateRenderState({baseLayer:new XRWebGLLayer(n,t)}),n.requestReferenceSpace(r).then(p),s=n.inputSources,n.addEventListener("inputsourceschange",function(){s=n.inputSources,console.log(s);for(var e=0;e<o.length;e++){o[e].userData.inputSource=s[e]}}))},this.getCamera=function(e){if(l()){var t=e.parent,n=c.cameras;m(c,t);for(var i=0;i<n.length;i++)m(n[i],t);e.matrixWorld.copy(c.matrixWorld);for(var r=e.children,a=(i=0,r.length);i<a;i++)r[i].updateMatrixWorld(!0);return fa(c,u,d),c}return e},this.isPresenting=l;var g=null;var v=new vn;v.setAnimationLoop(function(t,r){if(null!==(a=r.getViewerPose(i))){var l=a.views,u=n.renderState.baseLayer;e.setFramebuffer(u.framebuffer);for(var d=0;d<l.length;d++){var f=l[d],h=u.getViewport(f),p=f.transform.inverse.matrix,m=c.cameras[d];m.matrix.fromArray(p).getInverse(m.matrix),m.projectionMatrix.fromArray(f.projectionMatrix),m.viewport.set(h.x,h.y,h.width,h.height),0===d&&c.matrix.copy(m.matrix)}}for(d=0;d<o.length;d++){var v=o[d],y=s[d];if(y){var _=r.getPose(y.targetRaySpace,i);if(null!==_){v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.visible=!0;continue}}v.visible=!1}g&&g(t)}),this.setAnimationLoop=function(e){g=e},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new an},this.getDevice=function(){console.warn("THREE.WebXRManager: getDevice() has been deprecated.")},this.setDevice=function(){console.warn("THREE.WebXRManager: setDevice() has been deprecated.")},this.setFrameOfReferenceType=function(){console.warn("THREE.WebXRManager: setFrameOfReferenceType() has been deprecated.")},this.submitFrame=function(){}}function ma(e){console.log("THREE.WebGLRenderer",s);var t=void 0!==(e=e||{}).canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==e.context?e.context:null,i=void 0!==e.alpha&&e.alpha,r=void 0===e.depth||e.depth,a=void 0===e.stencil||e.stencil,o=void 0!==e.antialias&&e.antialias,l=void 0===e.premultipliedAlpha||e.premultipliedAlpha,u=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,d=void 0!==e.powerPreference?e.powerPreference:"default",c=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,f=null,h=null;this.domElement=t,this.context=null,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=J,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,g,v,y,_,E,b,T,w,A,S,x,M,R,C,I,L,O,D=this,P=!1,N=null,k=0,F=0,B=null,U=null,j=-1,G={geometry:null,program:null,wireframe:!1},V=null,H=null,z=new Xt,W=new Xt,q=null,Y=t.width,K=t.height,X=1,Q=new Xt(0,0,Y,K),Z=new Xt(0,0,Y,K),$=!1,ee=new rn,te=new bi,ne=!1,ie=!1,re=new an,ae=new It;function oe(){return null===B?X:1}try{var se={alpha:i,depth:r,stencil:a,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:d,failIfMajorPerformanceCaveat:c,xrCompatible:!0};if(t.addEventListener("webglcontextlost",ce,!1),t.addEventListener("webglcontextrestored",fe,!1),null===(p=n||t.getContext("webgl",se)||t.getContext("experimental-webgl",se)))throw null!==t.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function le(){g=new Ti(p),(v=new Ei(p,g,e)).isWebGL2||(g.get("WEBGL_depth_texture"),g.get("OES_texture_float"),g.get("OES_texture_half_float"),g.get("OES_texture_half_float_linear"),g.get("OES_standard_derivatives"),g.get("OES_element_index_uint"),g.get("ANGLE_instanced_arrays")),g.get("OES_texture_float_linear"),O=new $r(p,g,v),(y=new Zr(p,g,O,v)).scissor(W.copy(Z).multiplyScalar(X)),y.viewport(z.copy(Q).multiplyScalar(X)),_=new Si(p),E=new Br,b=new Jr(p,g,y,E,v,O,_),T=new yn(p),w=new wi(p,T,_),A=new Ri(w,_),C=new Mi(p),S=new Fr(D,g,v,b),x=new Vr,M=new Yr,R=new yi(D,y,A,l),I=new _i(p,g,_,v),L=new Ai(p,g,_,v),_.programs=S.programs,D.context=p,D.capabilities=v,D.extensions=g,D.properties=E,D.renderLists=x,D.state=y,D.info=_}le();var ue="undefined"!=typeof navigator&&"xr"in navigator&&"supportsSession"in navigator.xr?new pa(D):new ha(D);this.vr=ue;var de=new Qr(D,A,v.maxTextureSize);function ce(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),P=!0}function fe(){console.log("THREE.WebGLRenderer: Context Restored."),P=!1,le()}function he(e){var t=e.target;t.removeEventListener("dispose",he),function(e){pe(e),E.remove(e)}(t)}function pe(e){var t=E.get(e).program;e.program=void 0,void 0!==t&&S.releaseProgram(t)}this.shadowMap=de,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var e=g.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=g.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return X},this.setPixelRatio=function(e){void 0!==e&&(X=e,this.setSize(Y,K,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new Rt),e.set(Y,K)},this.setSize=function(e,n,i){ue.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Y=e,K=n,t.width=e*X,t.height=n*X,!1!==i&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new Rt),e.set(Y*X,K*X)},this.setDrawingBufferSize=function(e,n,i){Y=e,K=n,X=i,t.width=e*i,t.height=n*i,this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new Xt),e.copy(z)},this.getViewport=function(e){return e.copy(Q)},this.setViewport=function(e,t,n,i){e.isVector4?Q.set(e.x,e.y,e.z,e.w):Q.set(e,t,n,i),y.viewport(z.copy(Q).multiplyScalar(X))},this.getScissor=function(e){return e.copy(Z)},this.setScissor=function(e,t,n,i){e.isVector4?Z.set(e.x,e.y,e.z,e.w):Z.set(e,t,n,i),y.scissor(W.copy(Z).multiplyScalar(X))},this.getScissorTest=function(){return $},this.setScissorTest=function(e){y.setScissorTest($=e)},this.getClearColor=function(){return R.getClearColor()},this.setClearColor=function(){R.setClearColor.apply(R,arguments)},this.getClearAlpha=function(){return R.getClearAlpha()},this.setClearAlpha=function(){R.setClearAlpha.apply(R,arguments)},this.clear=function(e,t,n){var i=0;(void 0===e||e)&&(i|=16384),(void 0===t||t)&&(i|=256),(void 0===n||n)&&(i|=1024),p.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ce,!1),t.removeEventListener("webglcontextrestored",fe,!1),x.dispose(),M.dispose(),E.dispose(),A.dispose(),ue.dispose(),ge.stop()},this.renderBufferImmediate=function(e,t){y.initAttributes();var n=E.get(e);e.hasPositions&&!n.position&&(n.position=p.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=p.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=p.createBuffer()),e.hasColors&&!n.color&&(n.color=p.createBuffer());var i=t.getAttributes();e.hasPositions&&(p.bindBuffer(34962,n.position),p.bufferData(34962,e.positionArray,35048),y.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,5126,!1,0,0)),e.hasNormals&&
vendor: 4,176 bytes, line 1
1(p.bindBuffer(34962,n.normal),p.bufferData(34962,e.normalArray,35048),y.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,5126,!1,0,0)),e.hasUvs&&(p.bindBuffer(34962,n.uv),p.bufferData(34962,e.uvArray,35048),y.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,5126,!1,0,0)),e.hasColors&&(p.bindBuffer(34962,n.color),p.bufferData(34962,e.colorArray,35048),y.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,5126,!1,0,0)),y.disableUnusedAttributes(),p.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,i,r,a){var o=r.isMesh&&r.matrixWorld.determinant()<0;y.setMaterial(i,o);var s=Te(e,t,i,r),l=!1;G.geometry===n.id&&G.program===s.id&&G.wireframe===(!0===i.wireframe)||(G.geometry=n.id,G.program=s.id,G.wireframe=!0===i.wireframe,l=!0),r.morphTargetInfluences&&(C.update(r,n,i,s),l=!0);var u,d=n.index,c=n.attributes.position,f=1;!0===i.wireframe&&(d=w.getWireframeAttribute(n),f=2);var h=I;null!==d&&(u=T.get(d),(h=L).setIndex(u)),l&&(!function(e,t,n){if(n&&n.isInstancedBufferGeometry&&!v.isWebGL2&&null===g.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");y.initAttributes();var i=n.attributes,r=t.getAttributes(),a=e.defaultAttributeValues;for(var o in r){var s=r[o];if(s>=0){var l=i[o];if(void 0!==l){var u=l.normalized,d=l.itemSize,c=T.get(l);if(void 0===c)continue;var f=c.buffer,h=c.type,m=c.bytesPerElement;if(l.isInterleavedBufferAttribute){var _=l.data,E=_.stride,b=l.offset;_&&_.isInstancedInterleavedBuffer?(y.enableAttributeAndDivisor(s,_.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=_.meshPerAttribute*_.count)):y.enableAttribute(s),p.bindBuffer(34962,f),p.vertexAttribPointer(s,d,h,u,E*m,b*m)}else l.isInstancedBufferAttribute?(y.enableAttributeAndDivisor(s,l.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=l.meshPerAttribute*l.count)):y.enableAttribute(s),p.bindBuffer(34962,f),p.vertexAttribPointer(s,d,h,u,0,0)}else if(void 0!==a){var w=a[o];if(void 0!==w)switch(w.length){case 2:p.vertexAttrib2fv(s,w);break;case 3:p.vertexAttrib3fv(s,w);break;case 4:p.vertexAttrib4fv(s,w);break;default:p.vertexAttrib1fv(s,w)}}}}y.disableUnusedAttributes()}(i,s,n),null!==d&&p.bindBuffer(34963,u.buffer));var m=1/0;null!==d?m=d.count:void 0!==c&&(m=c.count);var _=n.drawRange.start*f,E=n.drawRange.count*f,b=null!==a?a.start*f:0,A=null!==a?a.count*f:1/0,S=Math.max(_,b),x=Math.min(m,_+E,b+A)-1,M=Math.max(0,x-S+1);if(0!==M){if(r.isMesh)if(!0===i.wireframe)y.setLineWidth(i.wireframeLinewidth*oe()),h.setMode(1);else switch(r.drawMode){case pt:h.setMode(4);break;case mt:h.setMode(5);break;case gt:h.setMode(6)}else if(r.isLine){var R=i.linewidth;void 0===R&&(R=1),y.setLineWidth(R*oe()),r.isLineSegments?h.setMode(1):r.isLineLoop?h.setMode(2):h.setMode(3)}else r.isPoints?h.setMode(0):r.isSprite&&h.setMode(4);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&h.renderInstances(n,S,M):h.render(S,M)}},this.compile=function(e,t){(h=M.get(e,t)).init(),e.traverse(function(e){e.isLight&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))}),h.setupLights(t),e.traverse(function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n<t.material.length;n++)be(t.material[n],e.fog,t);else be(t.material,e.fog,t)})};var me=null;var ge=new vn;function ve(e,t,n,i){if(!1!==e.visible){if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ee.intersectsSprite(e)){i&&ae.setFromMatrixPosition(e.matrixWorld).applyMatrix4(re);var r=A.update(e);(a=e.material).visible&&f.push(e,r,a,n,ae.z,null)}}else if(e.isImmediateRenderObject)i&&ae.setFromMatrixPosition(e.matrixWorld).applyMatrix4(re),f.push(e,null,e.material,n,ae.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||ee.intersectsObject(e))){i&&ae.setFromMatrixPosition(e.matrixWorld).applyMatrix4(re);r=A.update(e);var a=e.material;if(Array.isArray(a))for(var o=r.groups,s=0,l=o.length;s<l;s++){var u=o[s],d=a[u.materialIndex];
vendor: 6,354 bytes, line 1
1d&&d.visible&&f.push(e,r,d,n,ae.z,u)}else a.visible&&f.push(e,r,a,n,ae.z,null)}var c=e.children;for(s=0,l=c.length;s<l;s++)ve(c[s],t,n,i)}}function ye(e,t,n,i){for(var r=0,a=e.length;r<a;r++){var o=e[r],s=o.object,l=o.geometry,u=void 0===i?o.material:i,d=o.group;if(n.isArrayCamera){H=n;for(var c=n.cameras,f=0,p=c.length;f<p;f++){var m=c[f];s.layers.test(m.layers)&&(y.viewport(z.copy(m.viewport)),h.setupLights(m),Ee(s,t,m,l,u,d))}}else H=null,Ee(s,t,n,l,u,d)}}function Ee(e,t,n,i,r,a){if(e.onBeforeRender(D,t,n,i,r,a),h=M.get(t,H||n),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){y.setMaterial(r);var o=Te(n,t.fog,r,e);G.geometry=null,G.program=null,G.wireframe=!1,function(e,t){e.render(function(e){D.renderBufferImmediate(e,t)})}(e,o)}else D.renderBufferDirect(n,t.fog,i,r,e,a);e.onAfterRender(D,t,n,i,r,a),h=M.get(t,H||n)}function be(e,t,n){var i=E.get(e),r=h.state.lights,a=h.state.shadowsArray,o=i.lightsHash,s=r.state.hash,l=S.getParameters(e,r.state,a,t,te.numPlanes,te.numIntersection,n),u=S.getProgramCode(e,l),d=i.program,c=!0;if(void 0===d)e.addEventListener("dispose",he);else if(d.code!==u)pe(e);else if(o.stateID!==s.stateID||o.directionalLength!==s.directionalLength||o.pointLength!==s.pointLength||o.spotLength!==s.spotLength||o.rectAreaLength!==s.rectAreaLength||o.hemiLength!==s.hemiLength||o.shadowsLength!==s.shadowsLength)o.stateID=s.stateID,o.directionalLength=s.directionalLength,o.pointLength=s.pointLength,o.spotLength=s.spotLength,o.rectAreaLength=s.rectAreaLength,o.hemiLength=s.hemiLength,o.shadowsLength=s.shadowsLength,c=!1;else{if(void 0!==l.shaderID)return;c=!1}if(c){if(l.shaderID){var f=gn[l.shaderID];i.shader={name:e.type,uniforms:sn(f.uniforms),vertexShader:f.vertexShader,fragmentShader:f.fragmentShader}}else i.shader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.onBeforeCompile(i.shader,D),u=S.getProgramCode(e,l),d=S.acquireProgram(e,i.shader,l,u),i.program=d,e.program=d}var p=d.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var m=0;m<D.maxMorphTargets;m++)p["morphTarget"+m]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(m=0;m<D.maxMorphNormals;m++)p["morphNormal"+m]>=0&&e.numSupportedMorphNormals++}var g=i.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(i.numClippingPlanes=te.numPlanes,i.numIntersection=te.numIntersection,g.clippingPlanes=te.uniform),i.fog=t,void 0===o&&(i.lightsHash=o={}),o.stateID=s.stateID,o.directionalLength=s.directionalLength,o.pointLength=s.pointLength,o.spotLength=s.spotLength,o.rectAreaLength=s.rectAreaLength,o.hemiLength=s.hemiLength,o.shadowsLength=s.shadowsLength,e.lights&&(g.ambientLightColor.value=r.state.ambient,g.lightProbe.value=r.state.probe,g.directionalLights.value=r.state.directional,g.spotLights.value=r.state.spot,g.rectAreaLights.value=r.state.rectArea,g.pointLights.value=r.state.point,g.hemisphereLights.value=r.state.hemi,g.directionalShadowMap.value=r.state.directionalShadowMap,g.directionalShadowMatrix.value=r.state.directionalShadowMatrix,g.spotShadowMap.value=r.state.spotShadowMap,g.spotShadowMatrix.value=r.state.spotShadowMatrix,g.pointShadowMap.value=r.state.pointShadowMap,g.pointShadowMatrix.value=r.state.pointShadowMatrix);var v=i.program.getUniforms(),y=Sr.seqWithValue(v.seq,g);i.uniformsList=y}function Te(e,t,n,i){b.resetTextureUnits();var r=E.get(n),a=h.state.lights,o=r.lightsHash,s=a.state.hash;if(ne&&(ie||e!==V)){var l=e===V&&n.id===j;te.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,r,l)}!1===n.needsUpdate&&(void 0===r.program||n.fog&&r.fog!==t?n.needsUpdate=!0:(!n.lights||o.stateID===s.stateID&&o.directionalLength===s.directionalLength&&o.pointLength===s.pointLength&&o.spotLength===s.spotLength&&o.rectAreaLength===s.rectAreaLength&&o.hemiLength===s.hemiLength&&o.shadowsLength===s.shadowsLength)&&(void 0===r.numClippingPlanes||r.numClippingPlanes===te.numPlanes&&r.numIntersection===te.numIntersection)||(n.needsUpdate=!0)),n.needsUpdate&&(be(n,t,i),n.needsUpdate=!1);var u=!1,d=!1,c=!1,f=r.program,g=f.getUniforms(),_=r.shader.uniforms;if(y.useProgram(f.program)&&(u=!0,d=!0,c=!0),n.id!==j&&(j=n.id,d=!0),u||V!==e){if(g.setValue(p,"projectionMatrix",e.projectionMatrix),v.logarithmicDepthBuffer&&g.setValue(p,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),V!==e&&(V=e,d=!0,c=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var T=g.map.cameraPosition;void 0!==T&&T.setValue(p,ae.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&g.setValue(p,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){g.setOptional(p,i,"bindMatrix"),g.setOptional(p,i,"bindMatrixInverse");var w=i.skeleton;if(w){var A=w.bones;if(v.floatVertexTextures){if(void 0===w.boneTexture){var S=Math.sqrt(4*A.length);S=Mt.ceilPowerOfTwo(S),S=Math.max(S,4);var x=new Float32Array(S*S*4);x.set(w.boneMatrices);var M=new $t(x,S,S,De,Se);M.needsUpdate=!0,w.boneMatrices=x,w.boneTexture=M,w.boneTextureSize=S}g.setValue(p,"boneTexture",w.boneTexture,b),g.setValue(p,"boneTextureSize",w.boneTextureSize)}else g.setOptional(p,w,"boneMatrices")}}return d&&(g.setValue(p,"toneMappingExposure",D.toneMappingExposure),g.setValue(p,"toneMappingWhitePoint",D.toneMappingWhitePoint),n.lights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.pointLights.needsUpdate=t,e.spotLights.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(_,c),t&&n.fog&&function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}(_,t),n.isMeshBasicMaterial?we(_,n):n.isMeshLambertMaterial?(we(_,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(_,n)):n.isMeshPhongMaterial?(we(_,n),n.isMeshToonMaterial?function(e,t){Ae(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(_,n):Ae(_,n)):n.isMeshStandardMaterial?(we(_,n),n.isMeshPhysicalMaterial?function(e,t){Me(e,t),e.reflectivity.value=t.reflectivity,e.clearCoat.value=t.clearCoat,e.clearCoatRoughness.value=t.clearCoatRoughness}
vendor: 4,112 bytes, line 1
1(_,n):Me(_,n)):n.isMeshMatcapMaterial?(we(_,n),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isMeshDepthMaterial?(we(_,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isMeshDistanceMaterial?(we(_,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(_,n)):n.isMeshNormalMaterial?(we(_,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(_,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(_,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(_,n)):n.isPointsMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*X,e.scale.value=.5*K,e.map.value=t.map,null!==t.map&&(!0===t.map.matrixAutoUpdate&&t.map.updateMatrix(),e.uvTransform.value.copy(t.map.matrix))}(_,n):n.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,e.map.value=t.map,null!==t.map&&(!0===t.map.matrixAutoUpdate&&t.map.updateMatrix(),e.uvTransform.value.copy(t.map.matrix))}(_,n):n.isShadowMaterial&&(_.color.value.copy(n.color),_.opacity.value=n.opacity),void 0!==_.ltc_1&&(_.ltc_1.value=mn.LTC_1),void 0!==_.ltc_2&&(_.ltc_2.value=mn.LTC_2),Sr.upload(p,r.uniformsList,_,b)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Sr.upload(p,r.uniformsList,_,b),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&g.setValue(p,"center",i.center),g.setValue(p,"modelViewMatrix",i.modelViewMatrix),g.setValue(p,"normalMatrix",i.normalMatrix),g.setValue(p,"modelMatrix",i.matrixWorld),f}function we(e,t){var n;e.opacity.value=t.opacity,t.color&&e.diffuse.value.copy(t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=E.get(t.envMap).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function Ae(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate()),t.dis
vendor: 7,035 bytes, line 1
1placementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Me(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}ge.setAnimationLoop(function(e){ue.isPresenting()||me&&me(e)}),"undefined"!=typeof window&&ge.setContext(window),this.setAnimationLoop=function(e){me=e,ue.setAnimationLoop(e),ge.start()},this.render=function(e,t){var n,i;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),i=arguments[3]),t&&t.isCamera){if(!P){G.geometry=null,G.program=null,G.wireframe=!1,j=-1,V=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),ue.enabled&&(t=ue.getCamera(t)),(h=M.get(e,t)).init(),e.onBeforeRender(D,e,t,n||B),re.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ee.setFromMatrix(re),ie=this.localClippingEnabled,ne=te.init(this.clippingPlanes,ie,t),(f=x.get(e,t)).init(),ve(e,t,0,D.sortObjects),!0===D.sortObjects&&f.sort(),ne&&te.beginShadows();var r=h.state.shadowsArray;de.render(r,e,t),h.setupLights(t),ne&&te.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),R.render(f,e,t,i);var a=f.opaque,o=f.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;a.length&&ye(a,e,t,s),o.length&&ye(o,e,t,s)}else a.length&&ye(a,e,t),o.length&&ye(o,e,t);e.onAfterRender(D,e,t),null!==B&&(b.updateRenderTargetMipmap(B),b.updateMultisampleRenderTarget(B)),y.buffers.depth.setTest(!0),y.buffers.depth.setMask(!0),y.buffers.color.setMask(!0),y.setPolygonOffset(!1),ue.enabled&&ue.submitFrame(),f=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(e){N!==e&&p.bindFramebuffer(36160,e),N=e},this.getActiveCubeFace=function(){return k},this.getActiveMipMapLevel=function(){return F},this.getRenderTarget=function(){return B},this.setRenderTarget=function(e,t,n){B=e,k=t,F=n,e&&void 0===E.get(e).__webglFramebuffer&&b.setupRenderTarget(e);var i=N,r=!1;if(e){var a=E.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(i=a[t||0],r=!0):i=e.isWebGLMultisampleRenderTarget?E.get(e).__webglMultisampledFramebuffer:a,z.copy(e.viewport),W.copy(e.scissor),q=e.scissorTest}else z.copy(Q).multiplyScalar(X),W.copy(Z).multiplyScalar(X),q=$;if(U!==i&&(p.bindFramebuffer(36160,i),U=i),y.viewport(z),y.scissor(W),y.setScissorTest(q),r){var o=E.get(e.texture);p.framebufferTexture2D(36160,36064,34069+(t||0),o.__webglTexture,n||0)}},this.readRenderTargetPixels=function(e,t,n,i,r,a,o){if(e&&e.isWebGLRenderTarget){var s=E.get(e).__webglFramebuffer;if(e.isWebGLRenderTargetCube&&void 0!==o&&(s=s[o]),s){var l=!1;s!==U&&(p.bindFramebuffer(36160,s),l=!0);try{var u=e.texture,d=u.format,c=u.type;if(d!==De&&O.convert(d)!==p.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(c===_e||O.convert(c)===p.getParameter(35738)||c===Se&&(v.isWebGL2||g.get("OES_texture_float")||g.get("WEBGL_color_buffer_float"))||c===xe&&(v.isWebGL2?g.get("EXT_color_buffer_float"):g.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===p.checkFramebufferStatus(36160)?t>=0&&t<=e.width-i&&n>=0&&n<=e.height-r&&p.readPixels(t,n,i,r,O.convert(d),O.convert(c),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{l&&p.bindFramebuffer(36160,U)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){var i=t.image.width,r=t.image.height,a=O.convert(t.format);b.setTexture2D(t,0),p.copyTexImage2D(3553,n||0,a,e.x,e.y,i,r,0)},this.copyTextureToTexture=function(e,t,n,i){var r=t.image.width,a=t.image.height,o=O.convert(n.format),s=O.convert(n.type);b.setTexture2D(n,0),t.isDataTexture?p.texSubImage2D(3553,i||0,e.x,e.y,r,a,o,s,t.image.data):p.texSubImage2D(3553,i||0,e.x,e.y,o,s,t.image)}}function ga(e,t){this.name="",this.color=new hn(e),this.density=void 0!==t?t:25e-5}function va(e,t,n){this.name="",this.color=new hn(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function ya(){Rn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function _a(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Ea(e,t,n,i){this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===i}function ba(e){Jn.call(this),this.type="SpriteMaterial",this.color=new hn(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(e)}function Ta(e){if(Rn.call(this),this.type="Sprite",void 0===ra){ra=new qn;var t=new _a(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);ra.setIndex([0,1,2,0,2,3]),ra.addAttribute("position",new Ea(t,3,0,!1)),ra.addAttribute("uv",new Ea(t,2,3,!1))}this.geometry=ra,this.material=void 0!==e?e:new ba,this.center=new Rt(.5,.5)}function wa(){Rn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Aa(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),vi.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new an,this.bindMatrixInverse=new an}function Sa(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new an)}}function xa(){Rn.call(this),this.type="Bone"}function Ma(e){Jn.call(this),this.type="LineBasicMaterial",this.color=new hn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(e)}
vendor: 5,580 bytes, line 1
1function Ra(e,t,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),Rn.call(this),this.type="Line",this.geometry=void 0!==e?e:new qn,this.material=void 0!==t?t:new Ma({color:16777215*Math.random()})}function Ca(e,t){Ra.call(this,e,t),this.type="LineSegments"}function Ia(e,t){Ra.call(this,e,t),this.type="LineLoop"}function La(e){Jn.call(this),this.type="PointsMaterial",this.color=new hn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function Oa(e,t){Rn.call(this),this.type="Points",this.geometry=void 0!==e?e:new qn,this.material=void 0!==t?t:new La({color:16777215*Math.random()})}function Da(e,t,n,i,r,a,o,s,l){Kt.call(this,e,t,n,i,r,a,o,s,l),this.format=void 0!==o?o:Oe,this.minFilter=void 0!==a?a:ge,this.magFilter=void 0!==r?r:ge,this.generateMipmaps=!1}function Pa(e,t,n,i,r,a,o,s,l,u,d,c){Kt.call(this,null,a,o,s,l,u,i,r,d,c),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Na(e,t,n,i,r,a,o,s,l){Kt.call(this,e,t,n,i,r,a,o,s,l),this.needsUpdate=!0}function ka(e,t,n,i,r,a,o,s,l,u){if((u=void 0!==u?u:ke)!==ke&&u!==Fe)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===ke&&(n=Te),void 0===n&&u===Fe&&(n=Ie),Kt.call(this,null,i,r,a,o,s,u,n,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:he,this.minFilter=void 0!==s?s:he,this.flipY=!1,this.generateMipmaps=!1}function Fa(e){qn.call(this),this.type="WireframeGeometry";var t,n,i,r,a,o,s,l,u,d,c=[],f=[0,0],h={},p=["a","b","c"];if(e&&e.isGeometry){var m=e.faces;for(t=0,i=m.length;t<i;t++){var g=m[t];for(n=0;n<3;n++)s=g[p[n]],l=g[p[(n+1)%3]],f[0]=Math.min(s,l),f[1]=Math.max(s,l),void 0===h[u=f[0]+","+f[1]]&&(h[u]={index1:f[0],index2:f[1]})}for(u in h)o=h[u],d=e.vertices[o.index1],c.push(d.x,d.y,d.z),d=e.vertices[o.index2],c.push(d.x,d.y,d.z)}else if(e&&e.isBufferGeometry){var v,y,_,E,b,T,w;if(d=new It,null!==e.index){for(v=e.attributes.position,y=e.index,0===(_=e.groups).length&&(_=[{start:0,count:y.count,materialIndex:0}]),r=0,a=_.length;r<a;++r)for(t=b=(E=_[r]).start,i=b+E.count;t<i;t+=3)for(n=0;n<3;n++)s=y.getX(t+n),l=y.getX(t+(n+1)%3),f[0]=Math.min(s,l),f[1]=Math.max(s,l),void 0===h[u=f[0]+","+f[1]]&&(h[u]={index1:f[0],index2:f[1]});for(u in h)o=h[u],d.fromBufferAttribute(v,o.index1),c.push(d.x,d.y,d.z),d.fromBufferAttribute(v,o.index2),c.push(d.x,d.y,d.z)}else for(t=0,i=(v=e.attributes.position).count/3;t<i;t++)for(n=0;n<3;n++)T=3*t+n,d.fromBufferAttribute(v,T),c.push(d.x,d.y,d.z),w=3*t+(n+1)%3,d.fromBufferAttribute(v,w),c.push(d.x,d.y,d.z)}this.addAttribute("position",new Gn(c,3))}function Ba(e,t,n){On.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n},this.fromBufferGeometry(new Ua(e,t,n)),this.mergeVertices()}function Ua(e,t,n){qn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:n};var i,r,a=[],o=[],s=[],l=[],u=1e-5,d=new It,c=new It,f=new It,h=new It,p=new It;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var m=t+1;for(i=0;i<=n;i++){var g=i/n;for(r=0;r<=t;r++){var v=r/t;e(v,g,c),o.push(c.x,c.y,c.z),v-u>=0?(e(v-u,g,f),h.subVectors(c,f)):(e(v+u,g,f),h.subVectors(f,c)),g-u>=0?(e(v,g-u,f),p.subVectors(c,f)):(e(v,g+u,f),p.subVectors(f,c)),d.crossVectors(h,p).normalize(),s.push(d.x,d.y,d.z),l.push(v,g)}}for(i=0;i<n;i++)for(r=0;r<t;r++){var y=i*m+r,_=i*m+r+1,E=(i+1)*m+r+1,b=(i+1)*m+r;a.push(y,_,b),a.push(_,E,b)}this.setIndex(a),this.addAttribute("position",new Gn(o,3)),this.addAttribute("normal",new Gn(s,3)),this.addAttribute("uv",new Gn(l,2))}function ja(e,t,n,i){On.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:i},this.fromBufferGeometry(new Ga(e,t,n,i)),this.mergeVertices()}function Ga(e,t,n,i){qn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:i},n=n||1;var r=[],a=[];function o(e,t,n,i){var r,a,o=Math.pow(2,i),l=[];for(r=0;r<=o;r++){l[r]=[];var u=e.clone().lerp(n,r/o),d=t.clone().lerp(n,r/o),c=o-r;for(a=0;a<=c;a++)l[r][a]=0===a&&r===o?u:u.clone().lerp(d,a/c)}for(r=0;r<o;r++)for(a=0;a<2*(o-r)-1;a++){var f=Math.floor(a/2);a%2==0?(s(l[r][f+1]),s(l[r+1][f]),s(l[r][f])):(s(l[r][f+1]),s(l[r+1][f+1]),s(l[r+1][f]))}}function s(e){r.push(e.x,e.y,e.z)}function l(t,n){var i=3*t;n.x=e[i+0],n.y=e[i+1],n.z=e[i+2]}function u(e,t,n,i){i<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=i/2/Math.PI+.5)}function d(e){return Math.atan2(e.z,-e.x)}function c(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}!function(e){for(var n=new It,i=new It,r=new It,a=0;a<t.length;a+=3)l(t[a+0],n),l(t[a+1],i),l(t[a+2],r),o(n,i,r,e)}(i=i||0),function(e){for(var t=new It,n=0;n<r.length;n+=3)t.x=r[n+0],t.y=r[n+1],t.z=r[n+2],t.normalize().multiplyScalar(e),r[n+0]=t.x,r[n+1]=t.y,r[n+2]=t.z}(n),function(){for(var e=new It,t=0;t<r.length;t+=3){e.x=r[t+0],e.y=r[t+1],e.z=r[t+2];var n=d(e)/2/Math.PI+.5,i=c(e)/Math.PI+.5;a.push(n,1-i)}(function(){for(var e=new It,t=new It,n=new It,i=new It,o=new Rt,s=new Rt,l=new Rt,c=0,f=0;c<r.length;c+=9,f+=6){e.set(r[c+0],r[c+1],r[c+2]),t.set(r[c+3],r[c+4],r[c+5]),n.set(r[c+6],r[c+7],r[c+8]),o.set(a[f+0],a[f+1]),s.set(a[f+2],a[f+3]),l.set(a[f+4],a[f+5]),i.copy(e).add(t).add(n).divideScalar(3);var h=d(i);u(o,f+0,e,h),u(s,f+2,t,h),u(l,f+4,n,h)}})(),function(){for(var e=0;e<a.length;e+=6){var t=a[e+0],n=a[e+2],i=a[e+4],r=Math.max(t,n,i),o=Math.min(t,n,i);r>
vendor: 2,040 bytes, line 1
1.9&&o<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),i<.2&&(a[e+4]+=1))}}()}(),this.addAttribute("position",new Gn(r,3)),this.addAttribute("normal",new Gn(r.slice(),3)),this.addAttribute("uv",new Gn(a,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}function Va(e,t){On.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ha(e,t)),this.mergeVertices()}function Ha(e,t){Ga.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function za(e,t){On.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Wa(e,t)),this.mergeVertices()}function Wa(e,t){Ga.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function qa(e,t){On.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ya(e,t)),this.mergeVertices()}function Ya(e,t){var n=(1+Math.sqrt(5))/2,i=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];Ga.call(this,i,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Ka(e,t){On.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Xa(e,t)),this.mergeVertices()}function Xa(e,t){var n=(1+Math.sqrt(5))/2,i=1/n,r=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i];Ga.call(this,r,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,
vendor: 19,786 bytes, line 1
119,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Qa(e,t,n,i,r,a){On.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new Za(e,t,n,i,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function Za(e,t,n,i,r){qn.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r},t=t||64,n=n||1,i=i||8,r=r||!1;var a=e.computeFrenetFrames(t,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o,s,l=new It,u=new It,d=new Rt,c=new It,f=[],h=[],p=[],m=[];function g(r){c=e.getPointAt(r/t,c);var o=a.normals[r],d=a.binormals[r];for(s=0;s<=i;s++){var p=s/i*Math.PI*2,m=Math.sin(p),g=-Math.cos(p);u.x=g*o.x+m*d.x,u.y=g*o.y+m*d.y,u.z=g*o.z+m*d.z,u.normalize(),h.push(u.x,u.y,u.z),l.x=c.x+n*u.x,l.y=c.y+n*u.y,l.z=c.z+n*u.z,f.push(l.x,l.y,l.z)}}!function(){for(o=0;o<t;o++)g(o);g(!1===r?t:0),function(){for(o=0;o<=t;o++)for(s=0;s<=i;s++)d.x=o/t,d.y=s/i,p.push(d.x,d.y)}(),function(){for(s=1;s<=t;s++)for(o=1;o<=i;o++){var e=(i+1)*(s-1)+(o-1),n=(i+1)*s+(o-1),r=(i+1)*s+o,a=(i+1)*(s-1)+o;m.push(e,n,a),m.push(n,r,a)}}()}(),this.setIndex(m),this.addAttribute("position",new Gn(f,3)),this.addAttribute("normal",new Gn(h,3)),this.addAttribute("uv",new Gn(p,2))}function Ja(e,t,n,i,r,a,o){On.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:r,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new $a(e,t,n,i,r,a)),this.mergeVertices()}function $a(e,t,n,i,r,a){qn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:r,q:a},e=e||1,t=t||.4,n=Math.floor(n)||64,i=Math.floor(i)||8,r=r||2,a=a||3;var o,s,l=[],u=[],d=[],c=[],f=new It,h=new It,p=new It,m=new It,g=new It,v=new It,y=new It;for(o=0;o<=n;++o){var _=o/n*r*Math.PI*2;for(M(_,r,a,e,p),M(_+.01,r,a,e,m),v.subVectors(m,p),y.addVectors(m,p),g.crossVectors(v,y),y.crossVectors(g,v),g.normalize(),y.normalize(),s=0;s<=i;++s){var E=s/i*Math.PI*2,b=-t*Math.cos(E),T=t*Math.sin(E);f.x=p.x+(b*y.x+T*g.x),f.y=p.y+(b*y.y+T*g.y),f.z=p.z+(b*y.z+T*g.z),u.push(f.x,f.y,f.z),h.subVectors(f,p).normalize(),d.push(h.x,h.y,h.z),c.push(o/n),c.push(s/i)}}for(s=1;s<=n;s++)for(o=1;o<=i;o++){var w=(i+1)*(s-1)+(o-1),A=(i+1)*s+(o-1),S=(i+1)*s+o,x=(i+1)*(s-1)+o;l.push(w,A,x),l.push(A,S,x)}function M(e,t,n,i,r){var a=Math.cos(e),o=Math.sin(e),s=n/t*e,l=Math.cos(s);r.x=i*(2+l)*.5*a,r.y=i*(2+l)*o*.5,r.z=i*Math.sin(s)*.5}this.setIndex(l),this.addAttribute("position",new Gn(u,3)),this.addAttribute("normal",new Gn(d,3)),this.addAttribute("uv",new Gn(c,2))}function eo(e,t,n,i,r){On.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:r},this.fromBufferGeometry(new to(e,t,n,i,r)),this.mergeVertices()}function to(e,t,n,i,r){qn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:r},e=e||1,t=t||.4,n=Math.floor(n)||8,i=Math.floor(i)||6,r=r||2*Math.PI;var a,o,s=[],l=[],u=[],d=[],c=new It,f=new It,h=new It;for(a=0;a<=n;a++)for(o=0;o<=i;o++){var p=o/i*r,m=a/n*Math.PI*2;f.x=(e+t*Math.cos(m))*Math.cos(p),f.y=(e+t*Math.cos(m))*Math.sin(p),f.z=t*Math.sin(m),l.push(f.x,f.y,f.z),c.x=e*Math.cos(p),c.y=e*Math.sin(p),h.subVectors(f,c).normalize(),u.push(h.x,h.y,h.z),d.push(o/i),d.push(a/n)}for(a=1;a<=n;a++)for(o=1;o<=i;o++){var g=(i+1)*a+o-1,v=(i+1)*(a-1)+o-1,y=(i+1)*(a-1)+o,_=(i+1)*a+o;s.push(g,v,_),s.push(v,y,_)}this.setIndex(s),this.addAttribute("position",new Gn(l,3)),this.addAttribute("normal",new Gn(u,3)),this.addAttribute("uv",new Gn(d,2))}Object.assign(ga.prototype,{isFogExp2:!0,clone:function(){return new ga(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(va.prototype,{isFog:!0,clone:function(){return new va(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),ya.prototype=Object.assign(Object.create(Rn.prototype),{constructor:ya,isScene:!0,copy:function(e,t){return Rn.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=Rn.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(_a.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(_a.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.stride:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(e){return this.onUploadCallback=e,this}}),Object.defineProperties(Ea.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Ea.prototype,{isInterleavedBufferAttribute:!0,setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this},setXYZW:function(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}}),ba.prototype=Object.create(Jn.prototype),ba.prototype.constructor=ba,ba.prototype.isSpriteMaterial=!0,ba.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this},Ta.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Ta,isSprite:!0,raycast:function(){var e=new It,t=new It,n=new It,i=new Rt,r=new Rt,a=new an,o=new It,s=new It,l=new It,u=new Rt,d=new Rt,c=new Rt;function f(e,t,n,o,s,l){i.subVectors(e,n).addScalar(.5).multiply(o),void 0!==s?(r.x=l*i.x-s*i.y,r.y=s*i.x+l*i.y):r.copy(i),e.copy(t),e.x+=r.x,e.y+=r.y,e.applyMatrix4(a)}return function(i,r){t.setFromMatrixScale(this.matrixWorld),a.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var h,p,m=this.material.rotation;0!==m&&(p=Math.cos(m),h=Math.sin(m));var g=this.center;f(o.set(-.5,-.5,0),n,g,t,h,p),f(s.set(.5,-.5,0),n,g,t,h,p),f(l.set(.5,.5,0),n,g,t,h,p),u.set(0,0),d.set(1,0),c.set(1,1);var v=i.ray.intersectTriangle(o,s,l,!1,e);if(null!==v||(f(s.set(-.5,.5,0),n,g,t,h,p),d.set(0,1),null!==(v=i.ray.intersectTriangle(o,l,s,!1,e)))){var y=i.ray.origin.distanceTo(e);y<i.near||y>i.far||r.push({distance:y,point:e.clone(),uv:mi.getUV(e,o,s,l,u,d,c,new Rt),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return Rn.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),wa.prototype=Object.assign(Object.create(Rn.prototype),{constructor:wa,isLOD:!0,copy:function(e){Rn.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,i=t.length;n<i;n++){var r=t[n];this.addLevel(r.object.clone(),r.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var n=this.levels,i=0;i<n.length&&!(t<n[i].distance);i++);return n.splice(i,0,{distance:t,object:e}),this.add(e),this},getObjectForDistance:function(e){for(var t=this.levels,n=1,i=t.length;n<i&&!(e<t[n].distance);n++);return t[n-1].object},raycast:(aa=new It,function(e,t){aa.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(aa);this.getObjectForDistance(n).raycast(e,t)}),update:function(){var e=new It,t=new It;return function(n){var i=this.levels;if(i.length>1){e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var r=e.distanceTo(t);i[0].object.visible=!0;for(var a=1,o=i.length;a<o&&r>=i[a].distance;a++)i[a-1].object.visible=!1,i[a].object.visible=!0;for(;a<o;a++)i[a].object.visible=!1}}}(),toJSON:function(e){var t=Rn.prototype.toJSON.call(this,e);t.object.levels=[];for(var n=this.levels,i=0,r=n.length;i<r;i++){var a=n[i];t.object.levels.push({object:a.object.uuid,distance:a.distance})}return t}}),Aa.prototype=Object.assign(Object.create(vi.prototype),{constructor:Aa,isSkinnedMesh:!0,bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new Xt,t=this.geometry.attributes.skinWeight,n=0,i=t.count;n<i;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);var r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){vi.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Object.assign(Sa.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var n=new an;this.bones[e]&&n.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(n)}},pose:function(){var e,t,n;for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:(oa=new an,sa=new an,function(){for(var e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture,r=0,a=e.length;r<a;r++){var o=e[r]?e[r].matrixWorld:sa;oa.multiplyMatrices(o,t[r]),oa.toArray(n,16*r)}void 0!==i&&(i.needsUpdate=!0)}),clone:function(){return new Sa(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var i=this.bones[t];if(i.name===e)return i}}}),xa.prototype=Object.assign(Object.create(Rn.prototype),{constructor:xa,isBone:!0}),Ma.prototype=Object.create(Jn.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineBasicMaterial=!0,Ma.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},Ra.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Ra,isLine:!0,computeLineDistances:(la=new It,ua=new It,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],i=1,r=t.count;i<r;i++)la.fromBufferAttribute(t,i-1),ua.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=la.distanceTo(ua);e.addAttribute("lineDistance",new Gn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices;for((n=e.lineDistances)[0]=0,i=1,r=a.length;i<r;i++)n[i]=n[i-1],n[i]+=a[i-1].distanceTo(a[i])}return this}),raycast:function(){var e=new an,t=new pi,n=new tn;return function(i,r){var a=i.linePrecision,o=this.geometry,s=this.matrixWorld;if(null===o.boundingSphere&&o.computeBoundingSphere(),n.copy(o.boundingSphere),n.applyMatrix4(s),n.radius+=a,!1!==i.ray.intersectsSphere(n)){e.getInverse(s),t.copy(i.ray).applyMatrix4(e);var l=a/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,d=new It,c=new It,f=new It,h=new It,p=this&&this.isLineSegments?2:1;if(o.isBufferGeometry){var m=o.index,g=o.attributes.position.array;if(null!==m)for(var v=m.array,y=0,_=v.length-1;y<_;y+=p){var E=v[y],b=v[y+1];if(d.fromArray(g,3*E),c.fromArray(g,3*b),!(t.distanceSqToSegment(d,c,h,f)>u))h.applyMatrix4(this.matrixWorld),(A=i.ray.origin.distanceTo(h))<i.near||A>i.far||r.push({distance:A,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(y=0,_=g.length/3-1;y<_;y+=p){if(d.fromArray(g,3*y),c.fromArray(g,3*y+3),!(t.distanceSqToSegment(d,c,h,f)>u))h.applyMatrix4(this.matrixWorld),(A=i.ray.origin.distanceTo(h))<i.near||A>i.far||r.push({distance:A,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else if(o.isGeometry){var T=o.vertices,w=T.length;for(y=0;y<w-1;y+=p){var A;if(!(t.distanceSqToSegment(T[y],T[y+1],h,f)>u))h.applyMatrix4(this.matrixWorld),(A=i.ray.origin.distanceTo(h))<i.near||A>i.far||r.push({distance:A,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ca.prototype=Object.assign(Object.create(Ra.prototype),{constructor:Ca,isLineSegments:!0,computeLineDistances:function(){var e=new It,t=new It;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var i=n.attributes.position,r=[],a=0,o=i.count;a<o;a+=2)e.fromBufferAttribute(i,a),t.fromBufferAttribute(i,a+1),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+e.distanceTo(t);n.addAttribute("lineDistance",new Gn(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(r=n.lineDistances,a=0,o=s.length;a<o;a+=2)e.copy(s[a]),t.copy(s[a+1]),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+e.distanceTo(t)}return this}}()}),Ia.prototype=Object.assign(Object.create(Ra.prototype),{constructor:Ia,isLineLoop:!0}),La.prototype=Object.create(Jn.prototype),La.prototype.constructor=La,La.prototype.isPointsMaterial=!0,La.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this},Oa.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Oa,isPoints:!0,raycast:function(){var e=new an,t=new pi,n=new tn;return function(i,r){var a=this,o=this.geometry,s=this.matrixWorld,l=i.params.Points.threshold;if(null===o.boundingSphere&&o.computeBoundingSphere(),n.copy(o.boundingSphere),n.applyMatrix4(s),n.radius+=l,!1!==i.ray.intersectsSphere(n)){e.getInverse(s),t.copy(i.ray).applyMatrix4(e);var u=l/((this.scale.x+this.scale.y+this.scale.z)/3),d=u*u,c=new It,f=new It;if(o.isBufferGeometry){var h=o.index,p=o.attributes.position.array;if(null!==h)for(var m=h.array,g=0,v=m.length;g<v;g++){var y=m[g];c.fromArray(p,3*y),b(c,y)}else{g=0;for(var _=p.length/3;g<_;g++)c.fromArray(p,3*g),b(c,g)}}else{var E=o.vertices;for(g=0,_=E.length;g<_;g++)b(E[g],g)}}function b(e,n){var o=t.distanceSqToPoint(e);if(o<d){t.closestPointToPoint(e,f),f.applyMatrix4(s);var l=i.ray.origin.distanceTo(f);if(l<i.near||l>i.far)return;r.push({distance:l,distanceToRay:Math.sqrt(o),point:f.clone(),index:n,face:null,object:a})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Da.prototype=Object.assign(Object.create(Kt.prototype),{constructor:Da,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Pa.prototype=Object.create(Kt.prototype),Pa.prototype.constructor=Pa,Pa.prototype.isCompressedTexture=!0,Na.prototype=Object.create(Kt.prototype),Na.prototype.constructor=Na,Na.prototype.isCanvasTexture=!0,ka.prototype=Object.create(Kt.prototype),ka.prototype.constructor=ka,ka.prototype.isDepthTexture=!0,Fa.prototype=Object.create(qn.prototype),Fa.prototype.constructor=Fa,Ba.prototype=Object.create(On.prototype),Ba.prototype.constructor=Ba,Ua.prototype=Object.create(qn.prototype),Ua.prototype.constructor=Ua,ja.prototype=Object.create(On.prototype),ja.prototype.constructor=ja,Ga.prototype=Object.create(qn.prototype),Ga.prototype.constructor=Ga,Va.prototype=Object.create(On.prototype),Va.prototype.constructor=Va,Ha.prototype=Object.create(Ga.prototype),Ha.prototype.constructor=Ha,za.prototype=Object.create(On.prototype),za.prototype.constructor=za,Wa.prototype=Object.create(Ga.prototype),Wa.prototype.constructor=Wa,qa.prototype=Object.create(On.prototype),qa.prototype.constructor=qa,Ya.prototype=Object.create(Ga.prototype),Ya.prototype.constructor=Ya,Ka.prototype=Object.create(On.prototype),Ka.prototype.constructor=Ka,Xa.prototype=Object.create(Ga.prototype),Xa.prototype.constructor=Xa,Qa.prototype=Object.create(On.prototype),Qa.prototype.constructor=Qa,Za.prototype=Object.create(qn.prototype),Za.prototype.constructor=Za,Za.prototype.toJSON=function(){var e=qn.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},Ja.prototype=Object.create(On.prototype),Ja.prototype.constructor=Ja,$a.prototype=Object.create(qn.prototype),$a.prototype.constructor=$a,eo.prototype=Object.create(On.prototype),eo.prototype.constructor=eo,to.prototype=Object.create(qn.prototype),to.prototype.constructor=to;var no=function(e,t,n){n=n||2;var i,r,a,o,s,l,u,d=t&&t.length,c=d?t[0]*n:e.length,f=io(e,0,c,n,!0),h=[];if(!f)return h;if(d&&(f=function(e,t,n,i){var r,a,o,s=[];for(r=0,a=t.length;r<a;r++)(o=io(e,t[r]*i,r<a-1?t[r+1]*i:e.length,i,!1))===o.next&&(o.steiner=!0),s.push(po(o));for(s.sort(co),r=0;r<s.length;r++)fo(s[r],n),n=ro(n,n.next);return n}(e,t,f,n)),e.length>80*n){i=a=e[0],r=o=e[1];for(var p=n;p<c;p+=n)(s=e[p])<i&&(i=s),(l=e[p+1])<r&&(r=l),s>a&&(a=s),l>o&&(o=l);u=0!==(u=Math.max(a-i,o-r))?1/u:0}return ao(f,h,n,i,r,u),h};function io(e,t,n,i,r){var a,o;if(r===function(e,t,n,i){for(var r=0,a=t,o=n-i;a<n;a+=i)r+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return r}(e,t,n,i)>0)for(a=t;a<n;a+=i)o=To(a,e[a],e[a+1],o);else for(a=n-i;a>=t;a-=i)o=To(a,e[a],e[a+1],o);return o&&yo(o,o.next)&&(wo(o),o=o.next),o}function ro(e,t){if(!e)return e;t||(t=e);var n,i=e;do{if(n=!1,i.steiner||!yo(i,i.next)&&0!==vo(i.prev,i,i.next))i=i.next;else{if(wo(i),(i=t=i.prev)===i.next)break;n=!0}}while(n||i!==t);return t}function ao(e,t,n,i,r,a,o){if(e){!o&&a&&function(e,t,n,i){var r=e;do{null===r.z&&(r.z=ho(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}
vendor: 4,190 bytes, line 1
1while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,function(e){var t,n,i,r,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,i=n,s=0,t=0;t<u&&(s++,i=i.nextZ);t++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;n=i}a.nextZ=null,u*=2}while(o>1)}(r)}(e,i,r,a);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?so(e,i,r,a):oo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),wo(e),e=l.next,u=l.next;else if((e=l)===u){o?1===o?ao(e=lo(e,t,n),t,n,i,r,a,2):2===o&&uo(e,t,n,i,r,a):ao(ro(e),t,n,i,r,a,1);break}}}function oo(e){var t=e.prev,n=e,i=e.next;if(vo(t,n,i)>=0)return!1;for(var r=e.next.next;r!==e.prev;){if(mo(t.x,t.y,n.x,n.y,i.x,i.y,r.x,r.y)&&vo(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function so(e,t,n,i){var r=e.prev,a=e,o=e.next;if(vo(r,a,o)>=0)return!1;for(var s=r.x<a.x?r.x<o.x?r.x:o.x:a.x<o.x?a.x:o.x,l=r.y<a.y?r.y<o.y?r.y:o.y:a.y<o.y?a.y:o.y,u=r.x>a.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,d=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,c=ho(s,l,t,n,i),f=ho(u,d,t,n,i),h=e.nextZ;h&&h.z<=f;){if(h!==e.prev&&h!==e.next&&mo(r.x,r.y,a.x,a.y,o.x,o.y,h.x,h.y)&&vo(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(h=e.prevZ;h&&h.z>=c;){if(h!==e.prev&&h!==e.next&&mo(r.x,r.y,a.x,a.y,o.x,o.y,h.x,h.y)&&vo(h.prev,h,h.next)>=0)return!1;h=h.prevZ}return!0}function lo(e,t,n){var i=e;do{var r=i.prev,a=i.next.next;!yo(r,a)&&_o(r,i,i.next,a)&&Eo(r,a)&&Eo(a,r)&&(t.push(r.i/n),t.push(i.i/n),t.push(a.i/n),wo(i),wo(i.next),i=e=a),i=i.next}while(i!==e);return i}function uo(e,t,n,i,r,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&go(o,s)){var l=bo(o,s);return o=ro(o,o.next),l=ro(l,l.next),ao(o,t,n,i,r,a),void ao(l,t,n,i,r,a)}s=s.next}o=o.next}while(o!==e)}function co(e,t){return e.x-t.x}function fo(e,t){if(t=function(e,t){var n,i=t,r=e.x,a=e.y,o=-1/0;do{if(a<=i.y&&a>=i.next.y&&i.next.y!==i.y){var s=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>o){if(o=s,s===r){if(a===i.y)return i;if(a===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!n)return null;if(r===o)return n.prev;var l,u=n,d=n.x,c=n.y,f=1/0;i=n.next;for(;i!==u;)r>=i.x&&i.x>=d&&r!==i.x&&mo(a<c?r:o,a,d,c,a<c?o:r,a,i.x,i.y)&&((l=Math.abs(a-i.y)/(r-i.x))<f||l===f&&i.x>n.x)&&Eo(i,e)&&(n=i,f=l),i=i.next;return n}(e,t),t){var n=bo(t,e);ro(n,n.next)}}function ho(e,t,n,i,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function po(e){var t=e,n=e;do{t.x<n.x&&(n=t),t=t.next}while(t!==e);return n}function mo(e,t,n,i,r,a,o,s){return(r-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(i-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(r-o)*(i-s)>=0}function go(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&_o(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&Eo(e,t)&&Eo(t,e)&&function(e,t){var n=e,i=!1,r=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&r<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==e);return i}(e,t)}function vo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function yo(e,t){return e.x===t.x&&e.y===t.y}function _o(e,t,n,i){return!!(yo(e,t)&&yo(n,i)||yo(e,i)&&yo(n,t))||vo(e,t,n)>0!=vo(e,t,i)>0&&vo(n,i,e)>0!=vo(n,i,t)>0}function Eo(e,t){return vo(e.prev,e,e.next)<0?vo(e,t,e.next)>=0&&vo(e,e.prev,t)>=0:vo(e,t,e.prev)<0||vo(e,e.next,t)<0}function bo(e,t){var n=new Ao(e.i,e.x,e.y),i=new Ao(t.i,t.x,t.y),r=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,a.next=i,i.prev=a,i}function To(e,t,n,i){var r=new Ao(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function wo(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ao(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var So={area:function(e){for(var t=e.length,n=0,i=t-1,r=0;r<t;i=r++)n+=e[i].x*e[r].y-e[r].x*e[i].y;return.5*n},isClockWise:function(e){return So.area(e)<0}
vendor: 6,305 bytes, line 1
1,triangulateShape:function(e,t){var n=[],i=[],r=[];xo(e),Mo(n,e);var a=e.length;t.forEach(xo);for(var o=0;o<t.length;o++)i.push(a),a+=t[o].length,Mo(n,t[o]);var s=no(n,i);for(o=0;o<s.length;o+=3)r.push(s.slice(o,o+3));return r}};function xo(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Mo(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}function Ro(e,t){On.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Co(e,t)),this.mergeVertices()}function Co(e,t){qn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];for(var n=this,i=[],r=[],a=0,o=e.length;a<o;a++){s(e[a])}function s(e){var a=[],o=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:100,u=void 0===t.bevelEnabled||t.bevelEnabled,d=void 0!==t.bevelThickness?t.bevelThickness:6,c=void 0!==t.bevelSize?t.bevelSize:d-2,f=void 0!==t.bevelOffset?t.bevelOffset:0,h=void 0!==t.bevelSegments?t.bevelSegments:3,p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Io;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);var g,v,y,_,E,b,T,w,A=!1;p&&(g=p.getSpacedPoints(s),A=!0,u=!1,v=p.computeFrenetFrames(s,!1),y=new It,_=new It,E=new It),u||(h=0,d=0,c=0,f=0);var S=e.extractPoints(o),x=S.shape,M=S.holes;if(!So.isClockWise(x))for(x=x.reverse(),T=0,w=M.length;T<w;T++)b=M[T],So.isClockWise(b)&&(M[T]=b.reverse());var R=So.triangulateShape(x,M),C=x;for(T=0,w=M.length;T<w;T++)b=M[T],x=x.concat(b);function I(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var L,O,D,P,N,k,F=x.length,B=R.length;function U(e,t,n){var i,r,a,o=e.x-t.x,s=e.y-t.y,l=n.x-e.x,u=n.y-e.y,d=o*o+s*s,c=o*u-s*l;if(Math.abs(c)>Number.EPSILON){var f=Math.sqrt(d),h=Math.sqrt(l*l+u*u),p=t.x-s/f,m=t.y+o/f,g=((n.x-u/h-p)*u-(n.y+l/h-m)*l)/(o*u-s*l),v=(i=p+o*g-e.x)*i+(r=m+s*g-e.y)*r;if(v<=2)return new Rt(i,r);a=Math.sqrt(v/2)}else{var y=!1;o>Number.EPSILON?l>Number.EPSILON&&(y=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(i=-s,r=o,a=Math.sqrt(d)):(i=o,r=s,a=Math.sqrt(d/2))}return new Rt(i/a,r/a)}for(var j=[],G=0,V=C.length,H=V-1,z=G+1;G<V;G++,H++,z++)H===V&&(H=0),z===V&&(z=0),j[G]=U(C[G],C[H],C[z]);var W,q,Y=[],K=j.concat();for(T=0,w=M.length;T<w;T++){for(b=M[T],W=[],G=0,H=(V=b.length)-1,z=G+1;G<V;G++,H++,z++)H===V&&(H=0),z===V&&(z=0),W[G]=U(b[G],b[H],b[z]);Y.push(W),K=K.concat(W)}for(L=0;L<h;L++){for(D=L/h,P=d*Math.cos(D*Math.PI/2),O=c*Math.sin(D*Math.PI/2)+f,G=0,V=C.length;G<V;G++)Q((N=I(C[G],j[G],O)).x,N.y,-P);for(T=0,w=M.length;T<w;T++)for(b=M[T],W=Y[T],G=0,V=b.length;G<V;G++)Q((N=I(b[G],W[G],O)).x,N.y,-P)}for(O=c+f,G=0;G<F;G++)N=u?I(x[G],K[G],O):x[G],A?(_.copy(v.normals[0]).multiplyScalar(N.x),y.copy(v.binormals[0]).multiplyScalar(N.y),E.copy(g[0]).add(_).add(y),Q(E.x,E.y,E.z)):Q(N.x,N.y,0);for(q=1;q<=s;q++)for(G=0;G<F;G++)N=u?I(x[G],K[G],O):x[G],A?(_.copy(v.normals[q]).multiplyScalar(N.x),y.copy(v.binormals[q]).multiplyScalar(N.y),E.copy(g[q]).add(_).add(y),Q(E.x,E.y,E.z)):Q(N.x,N.y,l/s*q);for(L=h-1;L>=0;L--){for(D=L/h,P=d*Math.cos(D*Math.PI/2),O=c*Math.sin(D*Math.PI/2)+f,G=0,V=C.length;G<V;G++)Q((N=I(C[G],j[G],O)).x,N.y,l+P);for(T=0,w=M.length;T<w;T++)for(b=M[T],W=Y[T],G=0,V=b.length;G<V;G++)N=I(b[G],W[G],O),A?Q(N.x,N.y+g[s-1].y,g[s-1].x+P):Q(N.x,N.y,l+P)}function X(e,t){var n,i;for(G=e.length;--G>=0;){n=G,(i=G-1)<0&&(i=e.length-1);var r=0,a=s+2*h;for(r=0;r<a;r++){var o=F*r,l=F*(r+1);J(t+n+o,t+i+o,t+i+l,t+n+l)}}}function Q(e,t,n){a.push(e),a.push(t),a.push(n)}function Z(e,t,r){$(e),$(t),$(r);var a=i.length/3,o=m.generateTopUV(n,i,a-3,a-2,a-1);ee(o[0]),ee(o[1]),ee(o[2])}function J(e,t,r,a){$(e),$(t),$(a),$(t),$(r),$(a);var o=i.length/3,s=m.generateSideWallUV(n,i,o-6,o-3,o-2,o-1);ee(s[0]),ee(s[1]),ee(s[3]),ee(s[1]),ee(s[2]),ee(s[3])}function $(e){i.push(a[3*e+0]),i.push(a[3*e+1]),i.push(a[3*e+2])}function ee(e){r.push(e.x),r.push(e.y)}!function(){var e=i.length/3;if(u){var t=0,r=F*t;for(G=0;G<B;G++)Z((k=R[G])[2]+r,k[1]+r,k[0]+r);for(r=F*(t=s+2*h),G=0;G<B;G++)Z((k=R[G])[0]+r,k[1]+r,k[2]+r)}else{for(G=0;G<B;G++)Z((k=R[G])[2],k[1],k[0]);for(G=0;G<B;G++)Z((k=R[G])[0]+F*s,k[1]+F*s,k[2]+F*s)}n.addGroup(e,i.length/3-e,0)}(),function(){var e=i.length/3,t=0;for(X(C,t),t+=C.length,T=0,w=M.length;T<w;T++)X(b=M[T],t),t+=b.length;n.addGroup(e,i.length/3-e,1)}()}this.addAttribute("position",new Gn(i,3)),this.addAttribute("uv",new Gn(r,2)),this.computeVertexNormals()}Ro.prototype=Object.create(On.prototype),Ro.prototype.constructor=Ro,Ro.prototype.toJSON=function(){var e=On.prototype.toJSON.call(this);return Lo(this.parameters.shapes,this.parameters.options,e)},Co.prototype=Object.create(qn.prototype),Co.prototype.constructor=Co,Co.prototype.toJSON=function(){var e=qn.prototype.toJSON.call(this);return Lo(this.parameters.shapes,this.parameters.options,e)};var Io={generateTopUV:function(e,t,n,i,r){var a=t[3*n],o=t[3*n+1],s=t[3*i],l=t[3*i+1],u=t[3*r],d=t[3*r+1];return[new Rt(a,o),new Rt(s,l),new Rt(u,d)]},generateSideWallUV:function(e,t,n,i,r,a){var o=t[3*n],s=t[3*n+1],l=t[3*n+2],u=t[3*i],d=t[3*i+1],c=t[3*i+2],f=t[3*r],h=t[3*r+1],p=t[3*r+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(s-d)<.01?[new Rt(o,1-l),new Rt(u,1-c),new Rt(f,1-p),new Rt(m,1-v)]:[new Rt(s,1-l),new Rt(d,1-c),new Rt(h,1-p),new Rt(g,1-v)]}};function Lo(e,t,n){if(n.shapes=[],Array.isArray(e))for(var i=0,r=e.length;i<r;i++){var a=e[i];n.shapes.push(a.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}function Oo(e,t){On.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new Do(e,t)),this.mergeVertices()}function Do(e,t){var n=(t=t||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new On;var i=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Co.call(this,i,t),this.type="TextBufferGeometry"}function Po(e,t,n,i,r,a,o){On.call(this),this.type="SphereGeometry",this.parameters={radiu
vendor: 5,384 bytes, line 1
1s:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new No(e,t,n,i,r,a,o)),this.mergeVertices()}function No(e,t,n,i,r,a,o){qn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:a,thetaLength:o},e=e||1,t=Math.max(3,Math.floor(t)||8),n=Math.max(2,Math.floor(n)||6),i=void 0!==i?i:0,r=void 0!==r?r:2*Math.PI,a=void 0!==a?a:0,o=void 0!==o?o:Math.PI;var s,l,u=Math.min(a+o,Math.PI),d=0,c=[],f=new It,h=new It,p=[],m=[],g=[],v=[];for(l=0;l<=n;l++){var y=[],_=l/n,E=0;for(0==l&&0==a?E=.5/t:l==n&&u==Math.PI&&(E=-.5/t),s=0;s<=t;s++){var b=s/t;f.x=-e*Math.cos(i+b*r)*Math.sin(a+_*o),f.y=e*Math.cos(a+_*o),f.z=e*Math.sin(i+b*r)*Math.sin(a+_*o),m.push(f.x,f.y,f.z),h.copy(f).normalize(),g.push(h.x,h.y,h.z),v.push(b+E,1-_),y.push(d++)}c.push(y)}for(l=0;l<n;l++)for(s=0;s<t;s++){var T=c[l][s+1],w=c[l][s],A=c[l+1][s],S=c[l+1][s+1];(0!==l||a>0)&&p.push(T,w,S),(l!==n-1||u<Math.PI)&&p.push(w,A,S)}this.setIndex(p),this.addAttribute("position",new Gn(m,3)),this.addAttribute("normal",new Gn(g,3)),this.addAttribute("uv",new Gn(v,2))}function ko(e,t,n,i,r,a){On.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:a},this.fromBufferGeometry(new Fo(e,t,n,i,r,a)),this.mergeVertices()}function Fo(e,t,n,i,r,a){qn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:a},e=e||.5,t=t||1,r=void 0!==r?r:0,a=void 0!==a?a:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var o,s,l,u=[],d=[],c=[],f=[],h=e,p=(t-e)/(i=void 0!==i?Math.max(1,i):1),m=new It,g=new Rt;for(s=0;s<=i;s++){for(l=0;l<=n;l++)o=r+l/n*a,m.x=h*Math.cos(o),m.y=h*Math.sin(o),d.push(m.x,m.y,m.z),c.push(0,0,1),g.x=(m.x/t+1)/2,g.y=(m.y/t+1)/2,f.push(g.x,g.y);h+=p}for(s=0;s<i;s++){var v=s*(n+1);for(l=0;l<n;l++){var y=o=l+v,_=o+n+1,E=o+n+2,b=o+1;u.push(y,_,b),u.push(_,E,b)}}this.setIndex(u),this.addAttribute("position",new Gn(d,3)),this.addAttribute("normal",new Gn(c,3)),this.addAttribute("uv",new Gn(f,2))}function Bo(e,t,n,i){On.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},this.fromBufferGeometry(new Uo(e,t,n,i)),this.mergeVertices()}function Uo(e,t,n,i){qn.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},t=Math.floor(t)||12,n=n||0,i=i||2*Math.PI,i=Mt.clamp(i,0,2*Math.PI);var r,a,o,s=[],l=[],u=[],d=1/t,c=new It,f=new Rt;for(a=0;a<=t;a++){var h=n+a*d*i,p=Math.sin(h),m=Math.cos(h);for(o=0;o<=e.length-1;o++)c.x=e[o].x*p,c.y=e[o].y,c.z=e[o].x*m,l.push(c.x,c.y,c.z),f.x=a/t,f.y=o/(e.length-1),u.push(f.x,f.y)}for(a=0;a<t;a++)for(o=0;o<e.length-1;o++){var g=r=o+a*e.length,v=r+e.length,y=r+e.length+1,_=r+1;s.push(g,v,_),s.push(v,y,_)}if(this.setIndex(s),this.addAttribute("position",new Gn(l,3)),this.addAttribute("uv",new Gn(u,2)),this.computeVertexNormals(),i===2*Math.PI){var E=this.attributes.normal.array,b=new It,T=new It,w=new It;for(r=t*e.length*3,a=0,o=0;a<e.length;a++,o+=3)b.x=E[o+0],b.y=E[o+1],b.z=E[o+2],T.x=E[r+o+0],T.y=E[r+o+1],T.z=E[r+o+2],w.addVectors(b,T).normalize(),E[o+0]=E[r+o+0]=w.x,E[o+1]=E[r+o+1]=w.y,E[o+2]=E[r+o+2]=w.z}}function jo(e,t){On.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new Go(e,t)),this.mergeVertices()}function Go(e,t){qn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:t},t=t||12;var n=[],i=[],r=[],a=[],o=0,s=0;if(!1===Array.isArray(e))u(e);else for(var l=0;l<e.length;l++)u(e[l]),this.addGroup(o,s,l),o+=s,s=0;function u(e){var o,l,u,d=i.length/3,c=e.extractPoints(t),f=c.shape,h=c.holes;for(!1===So.isClockWise(f)&&(f=f.reverse()),o=0,l=h.length;o<l;o++)u=h[o],!0===So.isClockWise(u)&&(h[o]=u.reverse());var p=So.triangulateShape(f,h);for(o=0,l=h.length;o<l;o++)u=h[o],f=f.concat(u);for(o=0,l=f.length;o<l;o++){var m=f[o];i.push(m.x,m.y,0),r.push(0,0,1),a.push(m.x,m.y)}for(o=0,l=p.length;o<l;o++){var g=p[o],v=g[0]+d,y=g[1]+d,_=g[2]+d;n.push(v,y,_),s+=3}}this.setIndex(n),this.addAttribute("position",new Gn(i,3)),this.addAttribute("normal",new Gn(r,3)),this.addAttribute("uv",new Gn(a,2))}function Vo(e,t){if(t.shapes=[],Array.isArray(e))for(var n=0,i=e.length;n<i;n++){var r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}function Ho(e,t){qn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var n,i,r,a,o=[],s=Math.cos(Mt.DEG2RAD*t),l=[0,0],u={},d=["a","b","c"];e.isBufferGeometry?(a=new On).fromBufferGeometry(e):a=e.clone(),a.mergeVertices(),a.computeFaceNormals();for(var c=a.vertices,f=a.faces,h=0,p=f.length;h<p;h++)for(var m=f[h],g=0;g<3;g++)n=m[d[g]],i=m[d[(g+1)%3]],l[0]=Math.min(n,i),l[1]=Math.max(n,i),void 0===u[r=l[0]+","+l[1]]?u[r]={index1:l[0],index2:l[1],face1:h,face2:void 0}:u[r].face2=h;for(r in u){var v=u[r];if(void 0===v.face2||f[v.face1].normal.dot(f[v.face2].normal)<=s){var y=c[v.index1];o.push(y.x,y.y,y.z),y=c[v.index2],o.push(y.x,y.y,y.z)}}this.addAttribute("position",new Gn(o,3))}function zo(e,t,n,i,r,a,o,s){On.call(this),this.type="CylinderGeometry",this.parameters={radiu
vendor: 1,659 bytes, line 1
1sTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Wo(e,t,n,i,r,a,o,s)),this.mergeVertices()}function Wo(e,t,n,i,r,a,o,s){qn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s};var l=this;e=void 0!==e?e:1,t=void 0!==t?t:1,n=n||1,i=Math.floor(i)||8,r=Math.floor(r)||1,a=void 0!==a&&a,o=void 0!==o?o:0,s=void 0!==s?s:2*Math.PI;var u=[],d=[],c=[],f=[],h=0,p=[],m=n/2,g=0;function v(n){var r,a,p,v=new Rt,y=new It,_=0,E=!0===n?e:t,b=!0===n?1:-1;for(a=h,r=1;r<=i;r++)d.push(0,m*b,0),c.push(0,b,0),f.push(.5,.5),h++;for(p=h,r=0;r<=i;r++){var T=r/i*s+o,w=Math.cos(T),A=Math.sin(T);y.x=E*A,y.y=m*b,y.z=E*w,d.push(y.x,y.y,y.z),c.push(0,b,0),v.x=.5*w+.5,v.y=.5*A*b+.5,f.push(v.x,v.y),h++}for(r=0;r<i;r++){var S=a+r,x=p+r;!0===n?u.push(x,x+1,S):u.push(x+1,x,S),_+=3}l.addGroup(g,_,!0===n?1:2),g+=_}!function(){var a,v,y=new It,_=new It,E=0,b=(t-e)/n;for(v=0;v<=r;v++){var T=[],w=v/r,A=w*(t-e)+e;for(a=0;a<=i;a++){var S=a/i,x=S*s+o,M=Math.sin(x),R=Math.cos(x);_.x=A*M,_.y=-w*n+m,_.z=A*R,d.push(_.x,_.y,_.z),y.set(M,b,R).normalize(),c.push(y.x,y.y,y.z),f.push(S,1-w),T.push(h++)}p.push(T)}for(a=0;a<i;a++)for(v=0;v<r;v++){var C=p[v][a],I=p[v+1][a],L=p[v+1][a+1],O=p[v][a+1];u.push(C,I,O),u.push(I,L,O),E+=6}l.addGroup(g,E,0),g+=E}(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.addAttribute("position",new Gn(d,3)),this.addAttribute("normal",new Gn(c,3)),this.addAttribute("uv",new Gn(f,2))}function qo(e,t,n,i,r,a,o){zo.call(this,0,e,t,n,i,r,a,o),this.type="C
1oneGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:a,thetaLength:o}}function Yo(e,t,n,i,r,a,o){Wo.call(this,0,e,t,n,i,r,a,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:a,thetaLength:o}}function Ko(e,t,n,i){On.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},this.fromBufferGeometry(new Xo(e,t,n,i)),this.mergeVertices()}function Xo(e,t,n,i){qn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,i=void 0!==i?i:2*Math.PI;var r,a,o=[],s=[],l=[],u=[],d=new It,c=new Rt;for(s.push(0,0,0),l.push(0,0,1),u.push(.5,.5),a=0,r=3;a<=t;a++,r+=3){var f=n+a/t*i;d.x=e*Math.cos(f),d.y=e*Math.sin(f),s.push(d.x,d.y,d.z),l.push(0,0,1),c.x=(s[r]/e+1)/2,c.y=(s[r+1]/e+1)/2,u.push(c.x,c.y)}for(r=1;r<=t;r++)o.push(r,r+1,0);this.setIndex(o),this.addAttribute("position",new Gn(s,3)),this.addAttribute("normal",new Gn(l,3)),this.addAttribute("uv",new Gn(u,2))}Oo.prototype=Object.create(On.prototype),Oo.prototype.constructor=Oo,Do.prototype=Object.create(Co.prototype),Do.prototype.constructor=Do,Po.prototype=Object.create(On.prototype),Po.prototype.constructor=Po,No.prototype=Object.create(qn.prototype),No.prototype.constructor=No,ko.prototype=Object.create(On.prototype),ko.prototype.constructor=ko,Fo.prototype=Object.create(qn.prototype),Fo.prototype.constructor=Fo,Bo.prototype=Object.create(On.prototype),Bo.prototype.constructor=Bo,Uo.prototype=Object.create(qn.prototype),Uo.prototype.constructor=Uo,jo.prototype=Object.create(On.prototype),jo.prototype.constructor=jo,jo.prototype.toJSON=function(){var e=On.prototype.toJSON.call(this);return Vo(this.parameters.shapes,e)},Go.prototype=Object.create(qn.prototype),Go.prototype.constructor=Go,Go.prototype.toJSON=function(){var e=qn.prototype.toJSON.call(this);return Vo(this.parameters.shapes,e)},Ho.prototype=Object.create(qn.prototype),Ho.prototype.constructor=Ho,zo.prototype=Object.create(On.prototype),zo.prototype.constructor=zo,Wo.prototype=Object.create(qn.prototype),Wo.prototype.constructor=Wo,qo.prototype=Object.create(zo.prototype),qo.prototype.constructor=qo,Yo.prototype=Object.create(Wo.prototype),Yo.prototype.constructor=Yo,Ko.prototype=Object.create(On.prototype),Ko.prototype.constructor=Ko,Xo.prototype=Object.create(qn.prototype),Xo.prototype.constructor=Xo;var Qo=Object.freeze({WireframeGeometry:Fa,ParametricGeometry:Ba,ParametricBufferGeometry:Ua,TetrahedronGeometry:Va,TetrahedronBufferGeometry:Ha,OctahedronGeometry:za,OctahedronBufferGeometry:Wa,IcosahedronGeometry:qa,IcosahedronBufferGeometry:Ya,DodecahedronGeometry:Ka,DodecahedronBufferGeometry:Xa,PolyhedronGeometry:ja,PolyhedronBufferGeometry:Ga,TubeGeometry:Qa,TubeBufferGeometry:Za,TorusKnotGeometry:Ja,TorusKnotBufferGeometry:$a,TorusGeometry:eo,TorusBufferGeometry:to,TextGeometry:Oo,TextBufferGeometry:Do,SphereGeometry:Po,SphereBufferGeometry:No,RingGeometry:ko,RingBufferGeometry:Fo,PlaneGeometry:Xn,PlaneBufferGeometry:Qn,LatheGeometry:Bo,LatheBufferGeometry:Uo,ShapeGeometry:jo,ShapeBufferGeometry:Go,ExtrudeGeometry:Ro,ExtrudeBufferGeometry:Co,EdgesGeometry:Ho,ConeGeometry:qo,ConeBufferGeometry:Yo,CylinderGeometry:zo,CylinderBufferGeometry:Wo,CircleGeometry:Ko,CircleBufferGeometry:Xo,BoxGeometry:Yn,BoxBufferGeometry:Kn});function Zo(e){Jn.call(this),this.type="ShadowMaterial",this.color=new hn(0),this.transparent=!0,this.setValues(e)}function Jo(e){hi.call(this,e),this.type="RawShaderMaterial"}function $o(e){Jn.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new hn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function es(e){$o.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function ts(e){Jn.call(this),this.type="MeshPhongMaterial",this.color=new hn(16777215),this.specular=new hn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ns(e){ts.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function is(e){Jn.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function rs(e){Jn.call(this),this.type="MeshLambertMaterial",this.color=new hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function as(e){Jn.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new hn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.lights=!1,this.setValues(e)}function os(e){Ma.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Zo.prototype=Object.create(Jn.prototype),Zo.prototype.constructor=Zo,Zo.prototype.isShadowMaterial=!0,Zo.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this},Jo.prototype=Object.create(hi.prototype),Jo.prototype.constructor=Jo,Jo.prototype.isRawShaderMaterial=!0,$o.prototype=Object.create(Jn.prototype),$o.prototype.constructor=$o,$o.prototype.isMeshStandardMaterial=!0,$o.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},es.prototype=Object.create($o.prototype),es.prototype.constructor=es,es.prototype.isMeshPhysicalMaterial=!0,es.prototype.copy=function(e){return $o.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},ts.prototype=Object.create(Jn.prototype),ts.prototype.constructor=ts,ts.prototype.isMeshPhongMaterial=!0,ts.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ns.prototype=Object.create(ts.prototype),ns.prototype.constructor=ns,ns.prototype.isMeshToonMaterial=!0,ns.prototype.copy=function(e){return ts.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},is.prototype=Object.create(Jn.prototype),is.prototype.constructor=is,is.prototype.isMeshNormalMaterial=!0,is.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},rs.prototype=Object.create(Jn.prototype),rs.prototype.constructor=rs,rs.prototype.isMeshLambertMaterial=!0,rs.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},as.prototype=Object.create(Jn.prototype),as.prototype.constructor=as,as.prototype.isMeshMat
vendor: 8,684 bytes, lines 1-3
1capMaterial=!0,as.prototype.copy=function(e){return Jn.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},os.prototype=Object.create(Ma.prototype),os.prototype.constructor=os,os.prototype.isLineDashedMaterial=!0,os.prototype.copy=function(e){return Ma.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var ss=Object.freeze({ShadowMaterial:Zo,SpriteMaterial:ba,RawShaderMaterial:Jo,ShaderMaterial:hi,PointsMaterial:La,MeshPhysicalMaterial:es,MeshStandardMaterial:$o,MeshPhongMaterial:ts,MeshToonMaterial:ns,MeshNormalMaterial:is,MeshLambertMaterial:rs,MeshDepthMaterial:Kr,MeshDistanceMaterial:Xr,MeshBasicMaterial:gi,MeshMatcapMaterial:as,LineDashedMaterial:os,LineBasicMaterial:Ma,Material:Jn}),ls={arraySlice:function(e,t,n){return ls.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),i=0;i!==t;++i)n[i]=i;return n.sort(function(t,n){return e[t]-e[n]}),n},sortedArray:function(e,t,n){for(var i=e.length,r=new e.constructor(i),a=0,o=0;o!==i;++a)for(var s=n[a]*t,l=0;l!==t;++l)r[o++]=e[s+l];return r},flattenJSON:function(e,t,n,i){for(var r=1,a=e[0];void 0!==a&&void 0===a[i];)a=e[r++];if(void 0!==a){var o=a[i];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[i])&&(t.push(a.time),n.push.apply(n,o)),a=e[r++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[i])&&(t.push(a.time),o.toArray(n,n.length)),a=e[r++]}while(void 0!==a);else do{void 0!==(o=a[i])&&(t.push(a.time),n.push(o)),a=e[r++]}while(void 0!==a)}}};function us(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function ds(e,t,n,i){us.call(this,e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function cs(e,t,n,i){us.call(this,e,t,n,i)}function fs(e,t,n,i){us.call(this,e,t,n,i)}function hs(e,t,n,i){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ls.convertArray(t,this.TimeBufferType),this.values=ls.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}function ps(e,t,n){hs.call(this,e,t,n)}function ms(e,t,n,i){hs.call(this,e,t,n,i)}function gs(e,t,n,i){hs.call(this,e,t,n,i)}function vs(e,t,n,i){us.call(this,e,t,n,i)}function ys(e,t,n,i){hs.call(this,e,t,n,i)}function _s(e,t,n,i){hs.call(this,e,t,n,i)}function Es(e,t,n,i){hs.call(this,e,t,n,i)}function bs(e,t,n){this.name=e,this.tracks=n,this.duration=void 0!==t?t:-1,this.uuid=Mt.generateUUID(),this.duration<0&&this.resetDuration()}function Ts(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return gs;case"vector":case"vector2":case"vector3":case"vector4":return Es;case"color":return ms;case"quaternion":return ys;case"bool":case"boolean":return ps;case"string":return _s}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){var n=[],i=[];ls.flattenJSON(e.keys,n,i,"value"),e.times=n,e.values=i}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}Object.assign(us.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,i=t[n],r=t[n-1];e:{t:{var a;n:{i:if(!(e<i)){for(var o=n+2;;){if(void 0===i){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,r)}if(n===o)break;if(r=i,e<(i=t[++n]))break t}a=t.length;break n}if(e>=r)break e;var s=t[1];e<s&&(n=2,r=s);for(o=n-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,e,i);if(n===o)break;if(i=r,e>=(r=t[--n-1]))break t}a=n,n=0}for(;n<a;){var l=n+a>>>1;e<t[l]?a=l:n=l+1}if(i=t[n],void 0===(r=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,i);if(void 0===i)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,r,e)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i,a=0;a!==i;++a)t[a]=n[r+a];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),
2//!\ DECLARE ALIAS AFTER assign prototype !
3Object.assign(us.prototype,{beforeStart_:us.prototype.copySampleValue_,afterEnd_:us.prototype.copySampleValue_}),ds.prototype=Object.assign(Object.create(us.prototype),{constructor:ds,DefaultSettings_:{endingStart:ct,endingEnd:ct},intervalChanged_:function(e,t,n){var i=this.parameterPositions,r=e-2,a=e+1,o=i[r],s=i[a];if(void 0===o)switch(this.getSettings_().endingStart){case ft:r=e,o=2*t-n;break;case ht:o=t+i[r=i.length-2]-i[r+1];break;default:r=e,o=n}if(void 0===s)switch(this.getSettings_().endingEnd){case ft:a=e,s=2*n-t;break;case ht:a=1,s=n+i[1]-i[0];break;default:a=e-1,s=t}var l=.5*(n-t),u=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(s-n),this._offsetPrev=r*u,this._offsetNext=a*u},interpolate_:function(e,t,n,i){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,u=this._offsetPrev,d=this._offsetNext,c=this._weightPrev,f=this._weightNext,h=(n-t)/(i-t),p=h*h,m=p*h,g=-c*m+2*c*p-c*h,v=(1+c)*m+(-1.5-2*c)*p+(-.5+c)*h+1,y=(-1-f)*m+(1.5+f)*p+.5*h,_=f*m-f*p,E=0;E!==o;++E)r[E]=g*a[u+E]+v*a[l+E]+y*a[s+E]+_*a[d+E];return r}}),cs.prototype=Object.assign(Object.create(us.prototype),{constructor:cs,interpolate_:function(e,t,n,i){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,u=(n-t)/(i-t),d=1-u,c=0;c!==o;++c)r[c]=a[l+c]*d+a[s+c]*u;return r}}),fs.prototype=Object.assign(Object.create(us.prototype),{constructor:fs,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(hs,{toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:ls.convertArray(e.times,Array),values:ls.convertArray(e.values,Array)};var i=e.getInterpolation();i!==e.DefaultInterpolation&&(t.interpolation=i)}return t.type=e.ValueTypeName,t}}),Object.assign(hs.prototype,{constructor:hs,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:ut,InterpolantFactoryMethodDiscrete:function(e){return new fs(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new cs(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new ds(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case lt:t=this.InterpolantFactoryMethodDiscrete;break;case ut:t=this.InterpolantFactoryMethodLinear;break;case dt:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return lt;case this.InterpolantFactoryMethodLinear:return ut;case this.InterpolantFactoryMethodSmooth:return dt}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,i=t.length;n!==i;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,i=t.length;n!==i;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,i=n.length,r=0,a=i-1;r!==i&&n[r]<e;)++r;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==r||a!==i){r>=a&&(r=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=ls.arraySlice(n,r,a),this.values=ls.arraySlice(this.values,r*o,a*o
vendor: 5,540 bytes, line 3
3)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==r;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==i&&ls.isTypedArray(i)){o=0;for(var l=i.length;o!==l;++o){var u=i[o];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,u),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),i=this.getInterpolation()===dt,r=1,a=e.length-1,o=1;o<a;++o){var s=!1,l=e[o];if(l!==e[o+1]&&(1!==o||l!==l[0]))if(i)s=!0;else for(var u=o*n,d=u-n,c=u+n,f=0;f!==n;++f){var h=t[u+f];if(h!==t[d+f]||h!==t[c+f]){s=!0;break}}if(s){if(o!==r){e[r]=e[o];var p=o*n,m=r*n;for(f=0;f!==n;++f)t[m+f]=t[p+f]}++r}}if(a>0){e[r]=e[a];for(p=a*n,m=r*n,f=0;f!==n;++f)t[m+f]=t[p+f];++r}return r!==e.length&&(this.times=ls.arraySlice(e,0,r),this.values=ls.arraySlice(t,0,r*n)),this},clone:function(){var e=ls.arraySlice(this.times,0),t=ls.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),ps.prototype=Object.assign(Object.create(hs.prototype),{constructor:ps,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:lt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ms.prototype=Object.assign(Object.create(hs.prototype),{constructor:ms,ValueTypeName:"color"}),gs.prototype=Object.assign(Object.create(hs.prototype),{constructor:gs,ValueTypeName:"number"}),vs.prototype=Object.assign(Object.create(us.prototype),{constructor:vs,interpolate_:function(e,t,n,i){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=(n-t)/(i-t),u=s+o;s!==u;s+=4)Ct.slerpFlat(r,0,a,s-o,a,s,l);return r}}),ys.prototype=Object.assign(Object.create(hs.prototype),{constructor:ys,ValueTypeName:"quaternion",DefaultInterpolation:ut,InterpolantFactoryMethodLinear:function(e){return new vs(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),_s.prototype=Object.assign(Object.create(hs.prototype),{constructor:_s,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:lt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Es.prototype=Object.assign(Object.create(hs.prototype),{constructor:Es,ValueTypeName:"vector"}),Object.assign(bs,{parse:function(e){for(var t=[],n=e.tracks,i=1/(e.fps||1),r=0,a=n.length;r!==a;++r)t.push(Ts(n[r]).scale(i));return new bs(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},r=0,a=n.length;r!==a;++r)t.push(hs.toJSON(n[r]));return i},CreateFromMorphTargetSequence:function(e,t,n,i){for(var r=t.length,a=[],o=0;o<r;o++){var s=[],l=[];s.push((o+r-1)%r,o,(o+1)%r),l.push(0,1,0);var u=ls.getKeyframeOrder(s);s=ls.sortedArray(s,1,u),l=ls.sortedArray(l,1,u),i||0!==s[0]||(s.push(r),l.push(l[0])),a.push(new gs(".morphTargetInfluences["+t[o].name+"]",s,l).scale(1/n))}return new bs(e,-1,a)},findByName:function(e,t){var n=e;if(!Array.isArray(e)){var i=e;n=i.geometry&&i.geometry.animations||i.animations}for(var r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var i={},r=/^([\w-]*?)([\d]+)$/,a=0,o=e.length;a<o;a++){var s=e[a],l=s.name.match(r);if(l&&l.length>1){var u=i[c=l[1]];u||(i[c]=u=[]),u.push(s)}}var d=[];for(var c in i)d.push(bs.CreateFromMorphTargetSequence(c,i[c],t,n));return d},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,i,r){if(0!==n.length){var a=[],o=[];ls.flattenJSON(n,a,o,i),0!==a.length&&r.push(new e(t,a,o))}},i=[],r=e.name||"default",a=e.length||-1,o=e.fps||30,s=e.hierarchy||[],l=0;l<s.length;l++){var u=s[l].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var d={},c=0;c<u.length;c++)if(u[c].morphTargets)for(var f=0;f<u[c].morphTargets.length;f++)d[u[c].morphTargets[f]]=-1;for(var h in d){var p=[],m=[];for(f=0;f!==u[c].morphTargets.length;++f){var g=u[c];p.push(g.time),m.push(g.morphTarget===h?1:0)}i.push(new gs(".morphTargetInfluence["+h+"]",p,m))}a=d.length*(o||1)}else{var v=".bones["+t[l].name+"]";n(Es,v+".position",u,"pos",i),n(ys,v+".quaternion",u,"rot",i),n(Es,v+".scale",u,"scl",i)}}return 0===i.length?null:new bs(r,a,i)}}),Object.assign(bs.prototype,{resetDuration:function(){for(var e=0,t=0,n=this.tracks.length;t!==n;++t){var i=this.tracks[t];e=Math.max(e,i.times[i.times.length-1])}return this.duration=e,this},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new bs(this.name,this.duration,e)}});var ws={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};
vendor: 10,431 bytes, line 3
3function As(e,t,n){var i=this,r=!1,a=0,o=0,s=void 0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){o++,!1===r&&void 0!==i.onStart&&i.onStart(e,a,o),r=!0},this.itemEnd=function(e){a++,void 0!==i.onProgress&&i.onProgress(e,a,o),a===o&&(r=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(e){void 0!==i.onError&&i.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this}}var Ss=new As,xs={};function Ms(e){this.manager=void 0!==e?e:Ss}function Rs(e){this.manager=void 0!==e?e:Ss,this._parser=null}function Cs(e){this.manager=void 0!==e?e:Ss}function Is(e){this.manager=void 0!==e?e:Ss}function Ls(e){this.manager=void 0!==e?e:Ss}function Os(){this.type="Curve",this.arcLengthDivisions=200}function Ds(e,t,n,i,r,a,o,s){Os.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=i||1,this.aStartAngle=r||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function Ps(e,t,n,i,r,a){Ds.call(this,e,t,n,n,i,r,a),this.type="ArcCurve"}function Ns(){var e=0,t=0,n=0,i=0;function r(r,a,o,s){e=r,t=o,n=-3*r+3*a-2*o-s,i=2*r-2*a+o+s}return{initCatmullRom:function(e,t,n,i,a){r(t,n,a*(n-e),a*(i-t))},initNonuniformCatmullRom:function(e,t,n,i,a,o,s){var l=(t-e)/a-(n-e)/(a+o)+(n-t)/o,u=(n-t)/o-(i-t)/(o+s)+(i-n)/s;r(t,n,l*=o,u*=o)},calc:function(r){var a=r*r;return e+t*r+n*a+i*(a*r)}}}Object.assign(Ms.prototype,{load:function(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var r=this,a=ws.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;if(void 0===xs[e]){var o=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){var s=o[1],l=!!o[2],u=o[3];u=decodeURIComponent(u),l&&(u=atob(u));try{var d,c=(this.responseType||"").toLowerCase();switch(c){case"arraybuffer":case"blob":for(var f=new Uint8Array(u.length),h=0;h<u.length;h++)f[h]=u.charCodeAt(h);d="blob"===c?new Blob([f.buffer],{type:s}):f.buffer;break;case"document":var p=new DOMParser;d=p.parseFromString(u,s);break;case"json":d=JSON.parse(u);break;default:d=u}setTimeout(function(){t&&t(d),r.manager.itemEnd(e)},0)}catch(t){setTimeout(function(){i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)},0)}}else{xs[e]=[],xs[e].push({onLoad:t,onProgress:n,onError:i});var m=new XMLHttpRequest;for(var g in m.open("GET",e,!0),m.addEventListener("load",function(t){var n=this.response;ws.add(e,n);var i=xs[e];if(delete xs[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var a=0,o=i.length;a<o;a++){(s=i[a]).onLoad&&s.onLoad(n)}r.manager.itemEnd(e)}else{for(a=0,o=i.length;a<o;a++){var s;(s=i[a]).onError&&s.onError(t)}r.manager.itemError(e),r.manager.itemEnd(e)}},!1),m.addEventListener("progress",function(t){for(var n=xs[e],i=0,r=n.length;i<r;i++){var a=n[i];a.onProgress&&a.onProgress(t)}},!1),m.addEventListener("error",function(t){var n=xs[e];delete xs[e];for(var i=0,a=n.length;i<a;i++){var o=n[i];o.onError&&o.onError(t)}r.manager.itemError(e),r.manager.itemEnd(e)},!1),m.addEventListener("abort",function(t){var n=xs[e];delete xs[e];for(var i=0,a=n.length;i<a;i++){var o=n[i];o.onError&&o.onError(t)}r.manager.itemError(e),r.manager.itemEnd(e)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(g,this.requestHeader[g]);m.send(null)}return r.manager.itemStart(e),m}xs[e].push({onLoad:t,onProgress:n,onError:i})},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:Ss}.prototype,{load:function(e,t,n,i){var r=this,a=new Ms(r.manager);a.setPath(r.path),a.load(e,function(e){t(r.parse(JSON.parse(e)))},n,i)},parse:function(e){for(var t=[],n=0;n<e.length;n++){var i=bs.parse(e[n]);t.push(i)}return t},setPath:function(e){return this.path=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:Ss,this._parser=null}.prototype,{load:function(e,t,n,i){var r=this,a=[],o=new Pa;o.image=a;var s=new Ms(this.manager);function l(l){s.load(e[l],function(e){var n=r._parser(e,!0);a[l]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(o.minFilter=ge),o.format=n.format,o.needsUpdate=!0,t&&t(o))},n,i)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(e))for(var u=0,d=0,c=e.length;d<c;++d)l(d);else s.load(e,function(e){var n=r._parser(e,!0);if(n.isCubemap)for(var i=n.mipmaps.length/n.mipmapCount,s=0;s<i;s++){a[s]={mipmaps:[]};for(var l=0;l<n.mipmapCount;l++)a[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+l]),a[s].format=n.format,a[s].width=n.width,a[s].height=n.height}else o.image.width=n.width,o.image.height=n.height,o.mipmaps=n.mipmaps;1===n.mipmapCount&&(o.minFilter=ge),o.format=n.format,o.needsUpdate=!0,t&&t(o)},n,i);return o},setPath:function(e){return this.path=e,this}}),Object.assign(Rs.prototype,{load:function(e,t,n,i){var r=this,a=new $t,o=new Ms(this.manager);return o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(e,function(e){var n=r._parser(e);n&&(void 0!==n.image?a.image=n.image:void 0!==n.data&&(a.image.width=n.width,a.image.height=n.height,a.image.data=n.data),a.wrapS=void 0!==n.wrapS?n.wrapS:ce,a.wrapT=void 0!==n.wrapT?n.wrapT:ce,a.magFilter=void 0!==n.magFilter?n.magFilter:ge,a.minFilter=void 0!==n.minFilter?n.minFilter:ye,a.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(a.format=n.format),void 0!==n.type&&(a.type=n.type),void 0!==n.mipmaps&&(a.mipmaps=n.mipmaps),1===n.mipmapCount&&(a.minFilter=ge),a.needsUpdate=!0,t&&t(a,n))},n,i),a},setPath:function(e){return this.path=e,this}}),Object.assign(Cs.prototype,{crossOrigin:"anonymous",load:function(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var r=this,a=ws.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;var o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1),ws.add(e,this),t&&t(this),r.manager.itemEnd(e)}function l(t){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1),i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)}return o.addEventListener("load",s,!1),o.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(e),o.src=e,o},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Is.prototype,{crossOrigin:"anonymous",load:function(e,t,n,i){var r=new Ci,a=new Cs(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var o=0;function s(n){a.load(e[n],function(e){r.images[n]=e,6===++o&&(r.needsUpdate=!0,t&&t(r))},void 0,i)}for(var l=0;l<e.length;++l)s(l);return r},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Ls.prototype,{crossOrigin:"anonymous",load:function(e,t,n,i){var r=new Kt,a=new Cs(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(n){r.image=n;var i=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);r.format=i?Oe:De,r.needsUpdate=!0,void 0!==t&&t(r)},n,i),r},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Os.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,i=[],r=this.getPoint(0),a=0;for(i.push(0),n=1;n<=e;n++)a+=(t=this.getPoint(n/e)).distanceTo(r),i.push(a),r=t;return this.cacheArcLengths=i,i},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,i=this.getLengths(),r=0,a=i.length;n=t||e*i[a-1];for(var o,s=0,l=a-1;s<=l;)if((o=i[r=Math.floor(s+(l-s)/2)]-n)<0)s=r+1;else{if(!(o>0)){l=r;break}l=r-1}if(i[r=l]===n)return r/(a-1);var u=i[r];return(r+(n-u)/(i[r+1]-u))/(a-1)},getTangent:function(e){var t=1e-4,n=e-t,i=e+t;n<0&&(n=0),i>1&&(i=1);var r=this.getPoint(n);return this.getPoint(i).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,i,r,a=new It,o=[],s=[],l=[],u=new It,d=new an;for(n=0;n<=e;n++)i=n/e,o[n]=this.getTangentAt(i),o[n].normalize();s[0]=new It,l[0]=new It;var c=Number.MAX_VALUE,f=Math.abs(o[0].x),h=Math.abs(o[0].y),p=Math.abs(o[0].z);for(f<=c&&(c=f,a.set(1,0,0)),h<=c&&(c=h,a.set(0,1,0)),p<=c&&a.set(0,0,1),u.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],u),l[0].crossVectors(o[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),l[n]=l[n-1].clone(),u.crossVectors(o[n-1],o[n]),u.length()>Number.EPSILON&&(u.normalize(),r=Math.acos(Mt.clamp(o[n-1].dot(o[n]),-1,1)),s[n].applyMatrix4(d.makeRotationAxis(u,r))),l[n].crossVectors(o[n],s[n]);if(!0===t)for(r=Math.acos(Mt.clamp(s[0].dot(s[e]),-1,1)),r/=e,o[0].dot(u.crossVectors(s[0],s[e]))>0&&(r=-r),n=1;n<=e;n++)s[n].applyMatrix4(d.makeRotationAxis(o[n],r*n)),l[n].crossVectors(o[n],s[n]);return{tangents:o,normals:s,binormals:l}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.t
vendor: 11,723 bytes, line 3
3ype,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),Ds.prototype=Object.create(Os.prototype),Ds.prototype.constructor=Ds,Ds.prototype.isEllipseCurve=!0,Ds.prototype.getPoint=function(e,t){for(var n=t||new Rt,i=2*Math.PI,r=this.aEndAngle-this.aStartAngle,a=Math.abs(r)<Number.EPSILON;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(r=a?0:i),!0!==this.aClockwise||a||(r===i?r=-i:r-=i);var o=this.aStartAngle+e*r,s=this.aX+this.xRadius*Math.cos(o),l=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var u=Math.cos(this.aRotation),d=Math.sin(this.aRotation),c=s-this.aX,f=l-this.aY;s=c*u-f*d+this.aX,l=c*d+f*u+this.aY}return n.set(s,l)},Ds.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Ds.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},Ds.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Ps.prototype=Object.create(Ds.prototype),Ps.prototype.constructor=Ps,Ps.prototype.isArcCurve=!0;var ks=new It,Fs=new Ns,Bs=new Ns,Us=new Ns;function js(e,t,n,i){Os.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=i||.5}function Gs(e,t,n,i,r){var a=.5*(i-t),o=.5*(r-n),s=e*e;return(2*n-2*i+a+o)*(e*s)+(-3*n+3*i-2*a-o)*s+a*e+n}function Vs(e,t,n,i){return function(e,t){var n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,i)}function Hs(e,t,n,i,r){return function(e,t){var n=1-e;return n*n*n*t}(e,t)+function(e,t){var n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,i)+function(e,t){return e*e*e*t}(e,r)}function zs(e,t,n,i){Os.call(this),this.type="CubicBezierCurve",this.v0=e||new Rt,this.v1=t||new Rt,this.v2=n||new Rt,this.v3=i||new Rt}function Ws(e,t,n,i){Os.call(this),this.type="CubicBezierCurve3",this.v0=e||new It,this.v1=t||new It,this.v2=n||new It,this.v3=i||new It}function qs(e,t){Os.call(this),this.type="LineCurve",this.v1=e||new Rt,this.v2=t||new Rt}function Ys(e,t){Os.call(this),this.type="LineCurve3",this.v1=e||new It,this.v2=t||new It}function Ks(e,t,n){Os.call(this),this.type="QuadraticBezierCurve",this.v0=e||new Rt,this.v1=t||new Rt,this.v2=n||new Rt}function Xs(e,t,n){Os.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new It,this.v1=t||new It,this.v2=n||new It}function Qs(e){Os.call(this),this.type="SplineCurve",this.points=e||[]}js.prototype=Object.create(Os.prototype),js.prototype.constructor=js,js.prototype.isCatmullRomCurve3=!0,js.prototype.getPoint=function(e,t){var n,i,r,a,o=t||new It,s=this.points,l=s.length,u=(l-(this.closed?0:1))*e,d=Math.floor(u),c=u-d;if(this.closed?d+=d>0?0:(Math.floor(Math.abs(d)/l)+1)*l:0===c&&d===l-1&&(d=l-2,c=1),this.closed||d>0?n=s[(d-1)%l]:(ks.subVectors(s[0],s[1]).add(s[0]),n=ks),i=s[d%l],r=s[(d+1)%l],this.closed||d+2<l?a=s[(d+2)%l]:(ks.subVectors(s[l-1],s[l-2]).add(s[l-1]),a=ks),"centripetal"===this.curveType||"chordal"===this.curveType){var f="chordal"===this.curveType?.5:.25,h=Math.pow(n.distanceToSquared(i),f),p=Math.pow(i.distanceToSquared(r),f),m=Math.pow(r.distanceToSquared(a),f);p<1e-4&&(p=1),h<1e-4&&(h=p),m<1e-4&&(m=p),Fs.initNonuniformCatmullRom(n.x,i.x,r.x,a.x,h,p,m),Bs.initNonuniformCatmullRom(n.y,i.y,r.y,a.y,h,p,m),Us.initNonuniformCatmullRom(n.z,i.z,r.z,a.z,h,p,m)}else"catmullrom"===this.curveType&&(Fs.initCatmullRom(n.x,i.x,r.x,a.x,this.tension),Bs.initCatmullRom(n.y,i.y,r.y,a.y,this.tension),Us.initCatmullRom(n.z,i.z,r.z,a.z,this.tension));return o.set(Fs.calc(c),Bs.calc(c),Us.calc(c)),o},js.prototype.copy=function(e){Os.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},js.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},js.prototype.fromJSON=function(e){Os.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var i=e.points[t];this.points.push((new It).fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},zs.prototype=Object.create(Os.prototype),zs.prototype.constructor=zs,zs.prototype.isCubicBezierCurve=!0,zs.prototype.getPoint=function(e,t){var n=t||new Rt,i=this.v0,r=this.v1,a=this.v2,o=this.v3;return n.set(Hs(e,i.x,r.x,a.x,o.x),Hs(e,i.y,r.y,a.y,o.y)),n},zs.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},zs.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},zs.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Ws.prototype=Object.create(Os.prototype),Ws.prototype.constructor=Ws,Ws.prototype.isCubicBezierCurve3=!0,Ws.prototype.getPoint=function(e,t){var n=t||new It,i=this.v0,r=this.v1,a=this.v2,o=this.v3;return n.set(Hs(e,i.x,r.x,a.x,o.x),Hs(e,i.y,r.y,a.y,o.y),Hs(e,i.z,r.z,a.z,o.z)),n},Ws.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Ws.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Ws.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},qs.prototype=Object.create(Os.prototype),qs.prototype.constructor=qs,qs.prototype.isLineCurve=!0,qs.prototype.getPoint=function(e,t){var n=t||new Rt;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},qs.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},qs.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},qs.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},qs.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},qs.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ys.prototype=Object.create(Os.prototype),Ys.prototype.constructor=Ys,Ys.prototype.isLineCurve3=!0,Ys.prototype.getPoint=function(e,t){var n=t||new It;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},Ys.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Ys.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ys.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ys.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ks.prototype=Object.create(Os.prototype),Ks.prototype.constructor=Ks,Ks.prototype.isQuadraticBezierCurve=!0,Ks.prototype.getPoint=function(e,t){var n=t||new Rt,i=this.v0,r=this.v1,a=this.v2;return n.set(Vs(e,i.x,r.x,a.x),Vs(e,i.y,r.y,a.y)),n},Ks.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ks.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ks.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Xs.prototype=Object.create(Os.prototype),Xs.prototype.constructor=Xs,Xs.prototype.isQuadraticBezierCurve3=!0,Xs.prototype.getPoint=function(e,t){var n=t||new It,i=this.v0,r=this.v1,a=this.v2;return n.set(Vs(e,i.x,r.x,a.x),Vs(e,i.y,r.y,a.y),Vs(e,i.z,r.z,a.z)),n},Xs.prototype.copy=function(e){return Os.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Xs.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Xs.prototype.fromJSON=function(e){return Os.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Qs.prototype=Object.create(Os.prototype),Qs.prototype.constructor=Qs,Qs.prototype.isSplineCurve=!0,Qs.prototype.getPoint=function(e,t){var n=t||new Rt,i=this.points,r=(i.length-1)*e,a=Math.floor(r),o=r-a,s=i[0===a?a:a-1],l=i[a],u=i[a>i.length-2?i.length-1:a+1],d=i[a>i.length-3?i.length-1:a+2];return n.set(Gs(o,s.x,l.x,u.x,d.x),Gs(o,s.y,l.y,u.y,d.y)),n},Qs.prototype.copy=function(e){Os.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var i=e.points[t];this.points.push(i.clone())}return this},Qs.prototype.toJSON=function(){var e=Os.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var i=this.points[t];e.points.push(i.toArray())}return e},Qs.prototype.fromJSON=function(e){Os.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var i=e.points[t];this.points.push((new Rt).fromArray(i))}return this};var Zs=Object.freeze({ArcCurve:Ps,CatmullRomCurve3:js,CubicBezierCurve:zs,CubicBezierCurve3:Ws,EllipseCurve:Ds,LineCurve:qs,LineCurve3:Ys,QuadraticBezierCurve:Ks,QuadraticBezierCurve3:Xs,SplineCurve:Qs});function Js(){Os.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function $s(e){Js.call(this),this.type="Path",this.currentPoint=new Rt,e&&this.setFromPoints(e)}function el(e){$s.call(this,e),this.uuid=Mt.generateUUID(),this.type="Shape",this.holes=[]}function tl(e,t){Rn.call(this),this.type="Light",this.color=new hn(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function nl(e,t,n){tl.call(this,e,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Rn.DefaultUp),this.updateMatrix(),this.groundColor=new hn(t)}function il(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new Rt(512,512),this.map=null,this.matrix=new an}function rl(){il.call(this,new na(50,1,.5,500))}function al(e,t,n,i,r,a){tl.call(this,e,t),this.type="SpotLight",this.position.copy(Rn.DefaultUp),this.updateMatrix(),this.target=new Rn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==a?a:1,this.shadow=new rl}function ol(e,t,n,i){tl.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==i?i:1,this.shadow=new il(new na(90,1,.5,500))}
vendor: 6,331 bytes, line 3
3function sl(e,t,n,i,r,a){ta.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=void 0!==e?e:-1,this.right=void 0!==t?t:1,this.top=void 0!==n?n:1,this.bottom=void 0!==i?i:-1,this.near=void 0!==r?r:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function ll(){il.call(this,new sl(-5,5,5,-5,.5,500))}function ul(e,t){tl.call(this,e,t),this.type="DirectionalLight",this.position.copy(Rn.DefaultUp),this.updateMatrix(),this.target=new Rn,this.shadow=new ll}function dl(e,t){tl.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function cl(e,t,n,i){tl.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==i?i:10}function fl(e){this.manager=void 0!==e?e:Ss,this.textures={}}Js.prototype=Object.assign(Object.create(Os.prototype),{constructor:Js,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new qs(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),i=0;i<n.length;){if(n[i]>=t){var r=n[i]-t,a=this.curves[i],o=a.getLength(),s=0===o?0:1-r/o;return a.getPointAt(s)}i++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,n=[],i=0,r=this.curves;i<r.length;i++)for(var a=r[i],o=a&&a.isEllipseCurve?2*e:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?e*a.points.length:e,s=a.getPoints(o),l=0;l<s.length;l++){var u=s[l];t&&t.equals(u)||(n.push(u),t=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){Os.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=Os.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var i=this.curves[t];e.curves.push(i.toJSON())}return e},fromJSON:function(e){Os.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var i=e.curves[t];this.curves.push((new Zs[i.type]).fromJSON(i))}return this}}),$s.prototype=Object.assign(Object.create(Js.prototype),{constructor:$s,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var n=new qs(this.currentPoint.clone(),new Rt(e,t));this.curves.push(n),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,n,i){var r=new Ks(this.currentPoint.clone(),new Rt(e,t),new Rt(n,i));this.curves.push(r),this.currentPoint.set(n,i)},bezierCurveTo:function(e,t,n,i,r,a){var o=new zs(this.currentPoint.clone(),new Rt(e,t),new Rt(n,i),new Rt(r,a));this.curves.push(o),this.currentPoint.set(r,a)},splineThru:function(e){var t=new Qs([this.currentPoint.clone()].concat(e));this.curves.push(t),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,n,i,r,a){var o=this.currentPoint.x,s=this.currentPoint.y;this.absarc(e+o,t+s,n,i,r,a)},absarc:function(e,t,n,i,r,a){this.absellipse(e,t,n,n,i,r,a)},ellipse:function(e,t,n,i,r,a,o,s){var l=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(e+l,t+u,n,i,r,a,o,s)},absellipse:function(e,t,n,i,r,a,o,s){var l=new Ds(e,t,n,i,r,a,o,s);if(this.curves.length>0){var u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);var d=l.getPoint(1);this.currentPoint.copy(d)},copy:function(e){return Js.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Js.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Js.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),el.prototype=Object.assign(Object.create($s.prototype),{constructor:el,getPointsHoles:function(e){for(var t=[],n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){$s.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var i=e.holes[t];this.holes.push(i.clone())}return this},toJSON:function(){var e=$s.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var i=this.holes[t];e.holes.push(i.toJSON())}return e},fromJSON:function(e){$s.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var i=e.holes[t];this.holes.push((new $s).fromJSON(i))}return this}}),tl.prototype=Object.assign(Object.create(Rn.prototype),{constructor:tl,isLight:!0,copy:function(e){return Rn.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=Rn.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),nl.prototype=Object.assign(Object.create(tl.prototype),{constructor:nl,isHemisphereLight:!0,copy:function(e){return tl.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(il.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radiu
vendor: 6,111 bytes, line 3
3s=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),rl.prototype=Object.assign(Object.create(il.prototype),{constructor:rl,isSpotLightShadow:!0,update:function(e){var t=this.camera,n=2*Mt.RAD2DEG*e.angle,i=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;n===t.fov&&i===t.aspect&&r===t.far||(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix())}}),al.prototype=Object.assign(Object.create(tl.prototype),{constructor:al,isSpotLight:!0,copy:function(e){return tl.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),ol.prototype=Object.assign(Object.create(tl.prototype),{constructor:ol,isPointLight:!0,copy:function(e){return tl.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),sl.prototype=Object.assign(Object.create(ta.prototype),{constructor:sl,isOrthographicCamera:!0,copy:function(e,t){return ta.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,i,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,r=n-e,a=n+e,o=i+t,s=i-t;if(null!==this.view&&this.view.enabled){var l=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),d=(this.right-this.left)/this.view.width,c=(this.top-this.bottom)/this.view.height;a=(r+=d*(this.view.offsetX/l))+d*(this.view.width/l),s=(o-=c*(this.view.offsetY/u))-c*(this.view.height/u)}this.projectionMatrix.makeOrthographic(r,a,o,s,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=Rn.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),ll.prototype=Object.assign(Object.create(il.prototype),{constructor:ll}),ul.prototype=Object.assign(Object.create(tl.prototype),{constructor:ul,isDirectionalLight:!0,copy:function(e){return tl.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),dl.prototype=Object.assign(Object.create(tl.prototype),{constructor:dl,isAmbientLight:!0}),cl.prototype=Object.assign(Object.create(tl.prototype),{constructor:cl,isRectAreaLight:!0,copy:function(e){return tl.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=tl.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(fl.prototype,{load:function(e,t,n,i){var r=this,a=new Ms(r.manager);a.setPath(r.path),a.load(e,function(e){t(r.parse(JSON.parse(e)))},n,i)},parse:function(e){var t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var i=new ss[e.type];if(void 0!==e.uuid&&(i.uuid=e.uuid),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&i.color.setHex(e.color),void 0!==e.roughness&&(i.roughness=e.roughness),void 0!==e.metalness&&(i.metalness=e.metalness),void 0!==e.emissive&&i.emissive.setHex(e.emissive),void 0!==e.specular&&i.specular.setHex(e.specular),void 0!==e.shininess&&(i.shininess=e.shininess),void 0!==e.clearCoat&&(i.clearCoat=e.clearCoat),void 0!==e.clearCoatRoughness&&(i.clearCoatRoughness=e.clearCoatRoughness),void 0!==e.vertexColors&&(i.vertexColors=e.vertexColors),void 0!==e.fog&&(i.fog=e.fog),void 0!==e.flatShading&&(i.flatShading=e.flatShading),void 0!==e.blending&&(i.blending=e.blending),void 0!==e.combine&&(i.combine=e.combine),void 0!==e.side&&(i.side=e.side),void 0!==e.opacity&&(i.opacity=e.opacity),void 0!==e.transparent&&(i.transparent=e.transparent),void 0!==e.alphaTest&&(i.alphaTest=e.alphaTest),void 0!==e.depthTest&&(i.depthTest=e.depthTest),void 0!==e.depthWrite&&(i.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(i.colorWrite=e.colorWrite),void 0!==e.wireframe&&(i.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(i.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(i.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(i.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(i.rotation=e.rotation),1!==e.linewidth&&(i.linewidth=e.linewidth),void 0!==e.dashSize&&(i.dashSize=e.dashSize),void 0!==e.gapSize&&(i.gapSize=e.gapSize),void 0!==e.scale&&(i.scale=e.scale),void 0!==e.polygonOffset&&(i.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(i.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(i.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(i.skinning=e.skinning),void 0!==e.morphTargets&&(i.morphTargets=e.morphTargets),void 0!==e.dithering&&(i.dithering=e.dithering),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.uniforms)for(var r in e.uniforms){var a=e.uniforms[r];switch(i.uniforms[r]={},a.type){case"t":i.uniforms[r].value=n(a.value);break;case"c":i.uniforms[r].value=(new hn).setHex(a.value);break;case"v2":i.uniforms[r].value=(new Rt).fromArray(a.value);break;case"v3":i.uniforms[r].value=(new It).fromArray(a.value);break;case"v4":i.uniforms[r].value=(new Xt).fromArray(a.value);break;case"m3":i.uniforms[r].value=(new Lt).fromArray(a.value);
vendor: 6,278 bytes, line 3
3case"m4":i.uniforms[r].value=(new an).fromArray(a.value);break;default:i.uniforms[r].value=a.value}}if(void 0!==e.defines&&(i.defines=e.defines),void 0!==e.vertexShader&&(i.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(i.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var o in e.extensions)i.extensions[o]=e.extensions[o];if(void 0!==e.shading&&(i.flatShading=1===e.shading),void 0!==e.size&&(i.size=e.size),void 0!==e.sizeAttenuation&&(i.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(i.map=n(e.map)),void 0!==e.matcap&&(i.matcap=n(e.matcap)),void 0!==e.alphaMap&&(i.alphaMap=n(e.alphaMap),i.transparent=!0),void 0!==e.bumpMap&&(i.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(i.bumpScale=e.bumpScale),void 0!==e.normalMap&&(i.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(i.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),i.normalScale=(new Rt).fromArray(s)}return void 0!==e.displacementMap&&(i.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(i.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(i.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(i.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(i.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(i.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(i.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(i.specularMap=n(e.specularMap)),void 0!==e.envMap&&(i.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(i.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(i.reflectivity=e.reflectivity),void 0!==e.lightMap&&(i.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(i.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(i.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(i.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(i.gradientMap=n(e.gradientMap)),i},setPath:function(e){return this.path=e,this},setTextures:function(e){return this.textures=e,this}});var hl=function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)};function pl(){qn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function ml(e,t,n,i){"number"==typeof n&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Dn.call(this,e,t,n),this.meshPerAttribute=i||1}function gl(e){this.manager=void 0!==e?e:Ss}pl.prototype=Object.assign(Object.create(qn.prototype),{constructor:pl,isInstancedBufferGeometry:!0,copy:function(e){return qn.prototype.copy.call(this,e),this.maxInstancedCount=e.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=qn.prototype.toJSON.call(this);return e.maxInstancedCount=this.maxInstancedCount,e.isInstancedBufferGeometry=!0,e}}),ml.prototype=Object.assign(Object.create(Dn.prototype),{constructor:ml,isInstancedBufferAttribute:!0,copy:function(e){return Dn.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=Dn.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Object.assign(gl.prototype,{load:function(e,t,n,i){var r=this,a=new Ms(r.manager);a.setPath(r.path),a.load(e,function(e){t(r.parse(JSON.parse(e)))},n,i)},parse:function(e){var t=e.isInstancedBufferGeometry?new pl:new qn,n=e.data.index;if(void 0!==n){var i=new vl[n.type](n.array);t.setIndex(new Dn(i,1))}var r=e.data.attributes;for(var a in r){var o=r[a],s=(i=new vl[o.type](o.array),new(o.isInstancedBufferAttribute?ml:Dn)(i,o.itemSize,o.normalized));void 0!==o.name&&(s.name=o.name),t.addAttribute(a,s)}var l=e.data.morphAttributes;if(l)for(var a in l){for(var u=l[a],d=[],c=0,f=u.length;c<f;c++){o=u[c],s=new Dn(i=new vl[o.type](o.array),o.itemSize,o.normalized);void 0!==o.name&&(s.name=o.name),d.push(s)}t.morphAttributes[a]=d}var h=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==h){c=0;for(var p=h.length;c!==p;++c){var m=h[c];t.addGroup(m.start,m.count,m.materialIndex)}}var g=e.data.boundingSphere;if(void 0!==g){var v=new It;void 0!==g.center&&v.fromArray(g.center),t.boundingSphere=new tn(v,g.radius)}return e.name&&(t.name=e.name),e.userData&&(t.userData=e.userData),t},setPath:function(e){return this.path=e,this}});var vl={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function yl(e){this.manager=void 0!==e?e:Ss,this.resourcePath=""}Object.assign(yl.prototype,{crossOrigin:"anonymous",load:function(e,t,n,i){var r=this,a=void 0===this.path?hl(e):this.path;this.resourcePath=this.resourcePath||a;var o=new Ms(r.manager);o.setPath(this.path),o.load(e,function(n){var a=null;try{a=JSON.parse(n)}catch(t){return void 0!==i&&i(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}var o=a.metadata;void 0!==o&&void 0!==o.type&&"geometry"!==o.type.toLowerCase()?r.parse(a,t):console.error("THREE.ObjectLoader: Can't load "+e)},n,i)},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(e,t){var n=this.parseShape(e.shapes),i=this.parseGeometries(e.geometries,n),r=this.parseImages(e.images,function(){void 0!==t&&t(s)}),a=this.parseTextures(e.textures,r),o=this.parseMaterials(e.materials,a),s=this.parseObject(e.object,i,o);return e.animations&&(s.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(s),s},parseShape:function(e){var t={};if(void 0!==e)for(var n=0,i=e.length;n<i;n++){var r=(new el).fromJSON(e[n]);t[r.uuid]=r}return t},parseGeometries:function(e,t){var n={};if(void 0!==e)for(var i=new gl,r=0,a=e.length;r<a;r++){var o,s=e[r];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":o=new Qo[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":o=new Qo[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;
vendor: 4,758 bytes, line 3
3case"CircleGeometry":case"CircleBufferGeometry":o=new Qo[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":o=new Qo[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":o=new Qo[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":o=new Qo[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":o=new Qo[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":o=new Qo[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":o=new Qo[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":o=new Qo[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"TubeGeometry":case"TubeBufferGeometry":o=new Qo[s.type]((new Zs[s.path.type]).fromJSON(s.path),s.tubularSegments,s.radius,s.radialSegments,s.closed);break;case"LatheGeometry":case"LatheBufferGeometry":o=new Qo[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":o=new Qo[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var l=[],u=0,d=s.shapes.length;u<d;u++){var c=t[s.shapes[u]];l.push(c)}o=new Qo[s.type](l,s.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(l=[],u=0,d=s.shapes.length;u<d;u++){c=t[s.shapes[u]];l.push(c)}var f=s.options.extrudePath;void 0!==f&&(s.options.extrudePath=(new Zs[f.type]).fromJSON(f)),o=new Qo[s.type](l,s.options);break;case"BufferGeometry":case"InstancedBufferGeometry":o=i.parse(s);break;case"Geometry":if("THREE"in window&&"LegacyJSONLoader"in THREE)o=(new THREE.LegacyJSONLoader).parse(s,this.resourcePath).geometry;else console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),!0===o.isBufferGeometry&&void 0!==s.userData&&(o.userData=s.userData),n[s.uuid]=o}return n},parseMaterials:function(e,t){var n={},i={};if(void 0!==e){var r=new fl;r.setTextures(t);for(var a=0,o=e.length;a<o;a++){var s=e[a];if("MultiMaterial"===s.type){for(var l=[],u=0;u<s.materials.length;u++){var d=s.materials[u];void 0===n[d.uuid]&&(n[d.uuid]=r.parse(d)),l.push(n[d.uuid])}i[s.uuid]=l}else void 0===n[s.uuid]&&(n[s.uuid]=r.parse(s)),i[s.uuid]=n[s.uuid]}}return i},parseAnimations:function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=bs.parse(i);void 0!==i.uuid&&(r.uuid=i.uuid),t.push(r)}return t},parseImages:function(e,t){var n=this,i={};function r(e){return n.manager.itemStart(e),a.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemError(e),n.manager.itemEnd(e)})}if(void 0!==e&&e.length>0){var a=new Cs(new As(t));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=e.length;o<s;o++){var l=e[o],u=l.url;if(Array.isArray(u)){i[l.uuid]=[];for(var d=0,c=u.length;d<c;d++){var f=u[d],h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(f)?f:n.resourcePath+f;i[l.uuid].push(r(h))}}else{h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:n.resourcePath+l.url;i[l.uuid]=r(h)}}}return i},parseTextures:function(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var i={};if(void 0!==e)for(var r=0,a=e.length;r<a;r++){var o,s=e[r];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image),(o=Array.isArray(t[s.image])?new Ci(t[s.image]):new Kt(t[s.image])).needsUpdate=!0,o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),void 0!==s.mapping&&(o.mapping=n(s.mapping,Al)),void 0!==s.offset&&o.offset.fromArray(s.offset),void 0!==s.repeat&&o.repeat.fromArray(s.repeat),void 0!==s.center&&o.center.fromArray(s.center),void 0!==s.rotation&&(o.rotation=s.rotation),void 0!==s.wrap&&(o.wrapS=n(s.wrap[0],Sl),o.wrapT=n(s.wrap[1],Sl)),void 0!==s.format&&(o.format=s.format),void 0!==s.type&&(o.type=s.type),void 0!==s.encoding&&(o.encoding=s.encoding),void 0!==s.minFilter&&(
vendor: 5,988 bytes, line 3
3o.minFilter=n(s.minFilter,xl)),void 0!==s.magFilter&&(o.magFilter=n(s.magFilter,xl)),void 0!==s.anisotropy&&(o.anisotropy=s.anisotropy),void 0!==s.flipY&&(o.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(o.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(o.unpackAlignment=s.unpackAlignment),i[s.uuid]=o}return i},parseObject:function(e,t,n){var i;function r(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function a(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],i=0,r=e.length;i<r;i++){var a=e[i];void 0===n[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),t.push(n[a])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}switch(e.type){case"Scene":i=new ya,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new hn(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new va(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new ga(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new na(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new sl(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new dl(e.color,e.intensity);break;case"DirectionalLight":i=new ul(e.color,e.intensity);break;case"PointLight":i=new ol(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new cl(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new al(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new nl(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var o=r(e.geometry),s=a(e.material);i=o.bones&&o.bones.length>0?new Aa(o,s):new vi(o,s),void 0!==e.drawMode&&i.setDrawMode(e.drawMode);break;case"LOD":i=new wa;break;case"Line":i=new Ra(r(e.geometry),a(e.material),e.mode);break;case"LineLoop":i=new Ia(r(e.geometry),a(e.material));break;case"LineSegments":i=new Ca(r(e.geometry),a(e.material));break;case"PointCloud":case"Points":i=new Oa(r(e.geometry),a(e.material));break;case"Sprite":i=new Ta(a(e.material));break;case"Group":i=new ea;break;default:i=new Rn}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.layers&&(i.layers.mask=e.layers),void 0!==e.children)for(var l=e.children,u=0;u<l.length;u++)i.add(this.parseObject(l[u],t,n));if("LOD"===e.type)for(var d=e.levels,c=0;c<d.length;c++){var f=d[c],h=i.getObjectByProperty("uuid",f.object);void 0!==h&&i.addLevel(h,f.distance)}return i}});var _l,El,bl,Tl,wl,Al={UVMapping:300,CubeReflectionMapping:ie,CubeRefractionMapping:re,EquirectangularReflectionMapping:ae,EquirectangularRefractionMapping:oe,SphericalReflectionMapping:se,CubeUVReflectionMapping:le,CubeUVRefractionMapping:ue},Sl={RepeatWrapping:de,ClampToEdgeWrapping:ce,MirroredRepeatWrapping:fe},xl={NearestFilter:he,NearestMipMapNearestFilter:pe,NearestMipMapLinearFilter:me,LinearFilter:ge,LinearMipMapNearestFilter:ve,LinearMipMapLinearFilter:ye};function Ml(e){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==e?e:Ss,this.options=void 0}function Rl(){this.type="ShapePath",this.color=new hn,this.subPaths=[],this.currentPath=null}function Cl(e){this.type="Font",this.data=e}function Il(e,t,n,i,r){var a=r.glyphs[e]||r.glyphs["?"];if(a){var o,s,l,u,d,c,f,h,p=new Rl;if(a.o)for(var m=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,v=m.length;g<v;){switch(m[g++]){case"m":o=m[g++]*t+n,s=m[g++]*t+i,p.moveTo(o,s);break;case"l":o=m[g++]*t+n,s=m[g++]*t+i,p.lineTo(o,s);break;case"q":l=m[g++]*t+n,u=m[g++]*t+i,d=m[g++]*t+n,c=m[g++]*t+i,p.quadraticCurveTo(d,c,l,u);break;case"b":l=m[g++]*t+n,u=m[g++]*t+i,d=m[g++]*t+n,c=m[g++]*t+i,f=m[g++]*t+n,h=m[g++]*t+i,p.bezierCurveTo(d,c,f,h,l,u)}}return{offsetX:a.ha*t,path:p}}}function Ll(){}Ml.prototype={constructor:Ml,setOptions:function(e){return this.options=e,this},load:function(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var r=this,a=ws.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;fetch(e).then(function(e){return e.blob()}).then(function(e){return void 0===r.options?createImageBitmap(e):createImageBitmap(e,r.options)}).then(function(n){ws.add(e,n),t&&t(n),r.manager.itemEnd(e)}).catch(function(t){i&&i(t),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)},setCrossOrigin:function(){return this},setPath:function(e){return this.path=e,this}}
vendor: 4,761 bytes, line 3
3,Object.assign(Rl.prototype,{moveTo:function(e,t){this.currentPath=new $s,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t)},lineTo:function(e,t){this.currentPath.lineTo(e,t)},quadraticCurveTo:function(e,t,n,i){this.currentPath.quadraticCurveTo(e,t,n,i)},bezierCurveTo:function(e,t,n,i,r,a){this.currentPath.bezierCurveTo(e,t,n,i,r,a)},splineThru:function(e){this.currentPath.splineThru(e)},toShapes:function(e,t){function n(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n],a=new el;a.curves=r.curves,t.push(a)}return t}function i(e,t){for(var n=t.length,i=!1,r=n-1,a=0;a<n;r=a++){var o=t[r],s=t[a],l=s.x-o.x,u=s.y-o.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(o=t[a],l=-l,s=t[r],u=-u),e.y<o.y||e.y>s.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var d=u*(e.x-o.x)-l*(e.y-o.y);if(0===d)return!0;if(d<0)continue;i=!i}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return i}var r=So.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);var o,s,l,u=[];if(1===a.length)return s=a[0],(l=new el).curves=s.curves,u.push(l),u;var d=!r(a[0].getPoints());d=e?!d:d;var c,f,h=[],p=[],m=[],g=0;p[g]=void 0,m[g]=[];for(var v=0,y=a.length;v<y;v++)o=r(c=(s=a[v]).getPoints()),(o=e?!o:o)?(!d&&p[g]&&g++,p[g]={s:new el,p:c},p[g].s.curves=s.curves,d&&g++,m[g]=[]):m[g].push({h:s,p:c[0]});if(!p[0])return n(a);if(p.length>1){for(var _=!1,E=[],b=0,T=p.length;b<T;b++)h[b]=[];for(b=0,T=p.length;b<T;b++)for(var w=m[b],A=0;A<w.length;A++){for(var S=w[A],x=!0,M=0;M<p.length;M++)i(S.p,p[M].p)&&(b!==M&&E.push({froms:b,tos:M,hole:A}),x?(x=!1,h[M].push(S)):_=!0);x&&h[b].push(S)}E.length>0&&(_||(m=h))}v=0;for(var R=p.length;v<R;v++){l=p[v].s,u.push(l);for(var C=0,I=(f=m[v]).length;C<I;C++)l.holes.push(f[C].h)}return u}}),Object.assign(Cl.prototype,{isFont:!0,generateShapes:function(e,t){void 0===t&&(t=100);for(var n=[],i=function(e,t,n){for(var i=Array.from?Array.from(e):String(e).split(""),r=t/n.resolution,a=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*r,o=[],s=0,l=0,u=0;u<i.length;u++){var d=i[u];if("\n"===d)s=0,l-=a;else{var c=Il(d,r,s,l,n);s+=c.offsetX,o.push(c.path)}}return o}(e,t,this.data),r=0,a=i.length;r<a;r++)Array.prototype.push.apply(n,i[r].toShapes());return n}}),Object.assign(function(e){this.manager=void 0!==e?e:Ss}.prototype,{load:function(e,t,n,i){var r=this,a=new Ms(this.manager);a.setPath(this.path),a.load(e,function(e){var n;try{n=JSON.parse(e)}catch(t){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(e.substring(65,e.length-2))}var i=r.parse(n);t&&t(i)},n,i)},parse:function(e){return new Cl(e)},setPath:function(e){return this.path=e,this}}),Ll.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,n=0,i=t.length;n<i;n+=2){var r=t[n],a=t[n+1];if(r.test(e))return a}return null}},Object.assign(Ll.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(e,t,n){for(var i=[],r=0;r<e.length;++r)i[r]=this.createMaterial(e[r],t,n);return i},createMaterial:(_l={NoBlending:y,NormalBlending:_,AdditiveBlending:E,SubtractiveBlending:b,MultiplyBlending:T,CustomBlending:w},El=new hn,bl=new Ls,Tl=new fl,function(e,t,n){var i={};function r(e,r,a,o,s){var l,u=t+e,d=Ll.Handlers.get(u);null!==d?l=d.load(u):(bl.setCrossOrigin(n),l=bl.load(u)),void 0!==r&&(l.repeat.fromArray(r),1!==r[0]&&(l.wrapS=de),1!==r[1]&&(l.wrapT=de)),void 0!==a&&l.offset.fromArray(a),void 0!==o&&("repeat"===o[0]&&(l.wrapS=de),"mirror"===o[0]&&(l.wrapS=fe),"repeat"===o[1]&&(l.wrapT=de),"mirror"===o[1]&&(l.wrapT=fe)),void 0!==s&&(l.anisotropy=s);var c=Mt.generateUUID();return i[c]=l,c}var a={uuid:Mt.generateUUID(),type:"MeshLambertMaterial"};for(var o in e){var s=e[o];switch(o){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":case"mapAlpha
3Repeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"DbgName":a.name=s;break;case"blending":a.blending=_l[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",o,"is no longer supported.");break;case"colorDiffuse":a.color=El.fromArray(s).getHex();break;case"colorSpecular":a.specular=El.fromArray(s).getHex();break;case"colorEmissive":a.emissive=El.fromArray(s).getHex();break;case"specularCoef":a.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(a.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(a.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(a.type="MeshStandardMaterial");break;case"mapDiffuse":a.map=r(s,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case"mapEmissive":a.emissiveMap=r(s,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case"mapLight":a.lightMap=r(s,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case"mapAO":a.aoMap=r(s,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case"mapBump":a.bumpMap=r(s,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case"mapBumpScale":a.bumpScale=s;break;case"mapNormal":a.normalMap=r(s,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case"mapNormalFactor":a.normalScale=s;break;case"mapSpecular":a.specularMap=r(s,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case"mapMetalness":a.metalnessMap=r(s,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case"mapRoughness":a.roughnessMap=r(s,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;
vendor: 6,938 bytes, line 3
3case"mapAlpha":a.alphaMap=r(s,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case"flipSided":a.side=m;break;case"doubleSided":a.side=g;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),a.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":a[o]=s;break;case"vertexColors":!0===s&&(a.vertexColors=2),"face"===s&&(a.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",o,s)}}return"MeshBasicMaterial"===a.type&&delete a.emissive,"MeshPhongMaterial"!==a.type&&delete a.specular,a.opacity<1&&(a.transparent=!0),Tl.setTextures(i),Tl.parse(a)})});var Ol=function(){return void 0===wl&&(wl=new(window.AudioContext||window.webkitAudioContext)),wl};function Dl(e){this.manager=void 0!==e?e:Ss}function Pl(){this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new It)}function Nl(e,t){tl.call(this,void 0,t),this.sh=void 0!==e?e:new Pl}function kl(e,t,n){Nl.call(this,void 0,n);var i=(new hn).set(e),r=(new hn).set(t),a=new It(i.r,i.g,i.b),o=new It(r.r,r.g,r.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(o).multiplyScalar(s),this.sh.coefficients[1].copy(a).sub(o).multiplyScalar(l)}function Fl(e,t){Nl.call(this,void 0,t);var n=(new hn).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}function Bl(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new na,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new na,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}Object.assign(Dl.prototype,{load:function(e,t,n,i){var r=new Ms(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.load(e,function(e){var n=e.slice(0);Ol().decodeAudioData(n,function(e){t(e)})},n,i)},setPath:function(e){return this.path=e,this}}),Object.assign(Pl.prototype,{isSphericalHarmonics3:!0,set:function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},zero:function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},getAt:function(e,t){var n=e.x,i=e.y,r=e.z,a=this.coefficients;return t=.282095*a[0],t+=.488603*a[1]*i,t+=.488603*a[2]*r,t+=.488603*a[3]*n,t+=1.092548*a[4]*(n*i),t+=1.092548*a[5]*(i*r),t+=.315392*a[6]*(3*r*r-1),t+=1.092548*a[7]*(n*r),t+=.546274*a[8]*(n*n-i*i)},getIrradianceAt:function(e,t){var n=e.x,i=e.y,r=e.z,a=this.coefficients;return t=.886227*a[0],t+=2*a[1]*.511664*i,t+=2*a[2]*.511664*r,t+=2*a[3]*.511664*n,t+=2*a[4]*.429043*n*i,t+=2*a[5]*.429043*i*r,t+=a[6]*(.743125*r*r-.247708),t+=2*a[7]*.429043*n*r,t+=.429043*a[8]*(n*n-i*i)},add:function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},scale:function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},lerp:function(e,t){for(var n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this},equals:function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},copy:function(e){return this.set(e.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(e){for(var t=this.coefficients,n=0;n<9;n++)t[n].fromArray(e,3*n);return this},toArray:function(){for(var e=[],t=this.coefficients,n=0;n<9;n++)t[n].toArray(e,3*n);return e}}),Object.assign(Pl,{getBasisAt:function(e,t){var n=e.x,i=e.y,r=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*r,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*n*r,t[8]=.546274*(n*n-i*i)}}),Nl.prototype=Object.assign(Object.create(tl.prototype),{constructor:Nl,isLightProbe:!0,copy:function(e){return tl.prototype.copy.call(this,e),this.sh.copy(e.sh),this.intensity=e.intensity,this},toJSON:function(e){return tl.prototype.toJSON.call(this,e)}}),kl.prototype=Object.assign(Object.create(Nl.prototype),{constructor:kl,isHemisphereLightProbe:!0,copy:function(e){return Nl.prototype.copy.call(this,e),this},toJSON:function(e){return Nl.prototype.toJSON.call(this,e)}}),Fl.prototype=Object.assign(Object.create(Nl.prototype),{constructor:Fl,isAmbientLightProbe:!0,copy:function(e){return Nl.prototype.copy.call(this,e),this},toJSON:function(e){return Nl.prototype.toJSON.call(this,e)}}),Object.assign(Bl.prototype,{update:function(){var e,t,n,i,r,a,o,s,l=new an,u=new an;return function(d){if(e!==this||t!==d.focus||n!==d.fov||i!==d.aspect*this.aspect||r!==d.near||a!==d.far||o!==d.zoom||s!==this.eyeSep){e=this,t=d.focus,n=d.fov,i=d.aspect*this.aspect,r=d.near,a=d.far,o=d.zoom;var c,f,h=d.projectionMatrix.clone(),p=(s=this.eyeSep/2)*r/t,m=r*Math.tan(Mt.DEG2RAD*n*.5)/o;u.elements[12]=-s,l.elements[12]=s,c=-m*i+p,f=m*i+p,h.elements[0]=2*r/(f-c),h.elements[8]=(f+c)/(f-c),this.cameraL.projectionMatrix.copy(h),c=-m*i-p,f=m*i-p,h.elements[0]=2*r/(f-c),h.elements[8]=(f+c)/(f-c),this.cameraR.projectionMatrix.copy(h)}this.cameraL.matrixWorld.copy(d.matrixWorld).multiply(u),this.cameraR.matrixWorld.copy(d.matrixWorld).multiply(l)}}()});var Ul=90;function jl(e,t,n,i){Rn.call(this),this.type="CubeCamera";var r=new na(Ul,1,e,t);r.up.set(0,-1,0),r.lookAt(new It(1,0,0)),this.add(r);var a=new na(Ul,1,e,t);a.up.set(0,-1,0),a.lookAt(new It(-1,0,0)),this.add(a);var o=new na(Ul,1,e,t);o.up.set(0,0,1),o.lookAt(new It(0,1,0)),this.add(o);var s=new na(Ul,1,e,t);s.up.set(0,0,-1),s.lookAt(new It(0,-1,0)),this.add(s);var l=new na(Ul,1,e,t);l.up.set(0,-1,0),l.lookAt(new It(0,0,1)),this.add(l);var u=new na(Ul,1,e,t);u.up.set(0,-1,0),u.lookAt(new It(0,0,-1)),this.add(u),i=i||{format:Oe,magFilter:ge,minFilter:ge},this.renderTarget=new Jt(n,n,i),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=e.getRenderTarget(),i=this.renderTarget,d=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,r),e.setRenderTarget(i,1),e.render(t,a),e.setRenderTarget(i,2),e.render(t,o),e.setRenderTarget(i,3),e.render(t,s),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=d,e.setRenderTarget(i,5),e.render(t,u),e.setRenderTarget(n)},this.clear=function(e,t,n,i){for(var r=e.getRenderTarget(),a=this.renderTarget,o=0;o<6;o++)e.setRenderTarget(a,o),e.clear(t,n,i);e.setRenderTarget(r)}}function Gl(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function Vl(){Rn.call(this),this.type="AudioListener",this.context=Ol(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Hl(e){Rn.call(this),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl
vendor: 14,176 bytes, line 3
3=!0,this.sourceType="empty",this.filters=[]}function zl(e){Hl.call(this,e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}function Wl(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function ql(e,t,n){this.binding=e,this.valueSize=n;var i,r=Float64Array;switch(t){case"quaternion":i=this._slerp;break;case"string":case"bool":r=Array,i=this._select;break;default:i=this._lerp}this.buffer=new r(4*n),this._mixBufferRegion=i,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}jl.prototype=Object.create(Rn.prototype),jl.prototype.constructor=jl,Object.assign(Gl.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"==typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}),Vl.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Vl,getInput:function(){return this.gain},removeFilter:function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},updateMatrixWorld:function(){var e=new It,t=new Ct,n=new It,i=new It,r=new Gl;return function(a){Rn.prototype.updateMatrixWorld.call(this,a);var o=this.context.listener,s=this.up;if(this.timeDelta=r.getDelta(),this.matrixWorld.decompose(e,t,n),i.set(0,0,-1).applyQuaternion(t),o.positionX){var l=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(e.x,l),o.positionY.linearRampToValueAtTime(e.y,l),o.positionZ.linearRampToValueAtTime(e.z,l),o.forwardX.linearRampToValueAtTime(i.x,l),o.forwardY.linearRampToValueAtTime(i.y,l),o.forwardZ.linearRampToValueAtTime(i.z,l),o.upX.linearRampToValueAtTime(s.x,l),o.upY.linearRampToValueAtTime(s.y,l),o.upZ.linearRampToValueAtTime(s.z,l)}else o.setPosition(e.x,e.y,e.z),o.setOrientation(i.x,i.y,i.z,s.x,s.y,s.z)}}()}),Hl.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Hl,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setMediaElementSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.onended=this.onEnded.bind(this),this.startTime=this.context.currentTime,e.start(this.startTime,this.offset),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},setDetune:function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},getDetune:function(){return this.detune},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}),zl.prototype=Object.assign(Object.create(Hl.prototype),{constructor:zl,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){return this.panner.refDistance=e,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){return this.panner.rolloffFactor=e,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){return this.panner.distanceModel=e,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){return this.panner.maxDistance=e,this},setDirectionalCone:function(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this},updateMatrixWorld:function(){var e=new It,t=new Ct,n=new It,i=new It;return function(r){if(Rn.prototype.updateMatrixWorld.call(this,r),!0!==this.hasPlaybackControl||!1!==this.isPlaying){this.matrixWorld.decompose(e,t,n),i.set(0,0,1).applyQuaternion(t);var a=this.panner;if(a.positionX){var o=this.context.currentTime+this.listener.timeDelta;a.positionX.linearRampToValueAtTime(e.x,o),a.positionY.linearRampToValueAtTime(e.y,o),a.positionZ.linearRampToValueAtTime(e.z,o),a.orientationX.linearRampToValueAtTime(i.x,o),a.orientationY.linearRampToValueAtTime(i.y,o),a.orientationZ.linearRampToValueAtTime(i.z,o)}else a.setPosition(e.x,e.y,e.z),a.setOrientation(i.x,i.y,i.z)}}}()}),Object.assign(Wl.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length}}),Object.assign(ql.prototype,{accumulate:function(e,t){var n=this.buffer,i=this.valueSize,r=e*i+i,a=this.cumulativeWeight;if(0===a){for(var o=0;o!==i;++o)n[r+o]=n[o];a=t}else{var s=t/(a+=t);this._mixBufferRegion(n,r,0,s,i)}this.cumulativeWeight=a},apply:function(e){var t=this.valueSize,n=this.buffer,i=e*t+t,r=this.cumulativeWeight,a=this.binding;if(this.cumulativeWeight=0,r<1){var o=3*t;this._mixBufferRegion(n,i,o,1-r,t)}for(var s=t,l=t+t;s!==l;++s)if(n[s]!==n[s+t]){a.setValue(n,i);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,i=3*n;e.getValue(t,i);for(var r=n,a=i;r!==a;++r)t[r]=t[i+r%n];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,n,i,r){if(i>=.5)for(var a=0;a!==r;++a)e[t+a]=e[n+a]},_slerp:function(e,t,n,i){Ct.slerpFlat(e,t,e,t,e,n,i)},_lerp:function(e,t,n,i,r){for(var a=1-i,o=0;o!==r;++o){var s=t+o;e[s]=e[s]*a+e[n+o]*i}}});var Yl,Kl,Xl,Ql,Zl,Jl,$l,eu,tu,nu,iu,ru,au,ou,su,lu="\\[\\]\\.:\\/";function uu(e,t,n){var i=n||du.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}function du(e,t,n){this.path=t,this.parsedPath=n||du.parseTrackName(t),this.node=du.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function cu(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var i=t.tracks,r=i.length,a=new Array(r),o={endingStart:ct,endingEnd:ct},s=0;s!==r;++s){var l=i[s].createInterpolant(null);a[s]=l,l.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function fu(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function hu(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function pu(e,t,n){_a.call(this,e,t),this.meshPerAttribute=n||1}function mu(e,t,n,i){this.ray=new pi(e,t),this.near=n||0,this.far=i||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function gu(e,t){return e.distance-t.distance}function vu(e,t,n,i){if(!1!==e.visible&&(e.raycast(t,n),!0===i))for(var r=e.children,a=0,o=r.length;a<o;a++)vu(r[a],t,n,!0)}function yu(e,t){this.min=void 0!==e?e:new Rt(1/0,1/0),this.max=void 0!==t?t:new Rt(-1/0,-1/0)}function _u(e,t){this.start=void 0!==e?e:new It,this.end=void 0!==t?t:new It}function Eu(e){Rn.call(this),this.material=e,this.render=function(){}}function bu(e,t,n,i){this.object=e,this.size=void 0!==t?t:1;var r=void 0!==n?n:16711680,a=void 0!==i?i:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var l=new qn,u=new Gn(2*o*3,3);l.addAttribute("position",u),Ca.call(this,l,new Ma({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Tu(e,t){Rn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var n=new qn,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,a=1;r<32;r++,a++){var o=r/32*Math.PI*2,s=a/32*Math.PI*2;i.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Gn(i,3));var l=new Ma({fog:!1});this.cone=new Ca(n,l),this.add(this.cone),this.update()}function wu(e){var t=[];e&&e.isBone&&t.push(e);for(var n=0;n<e.children.length;n++)t.push.apply(t,wu(e.children[n]));return t}function Au(e){for(var t=wu(e),n=new qn,i=[],r=[],a=new hn(0,0,1),o=new hn(0,1,0),s=0;s<t.length;s++){var l=t[s];l.parent&&l.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(a.r,a.g,a.b),r.push(o.r,o.g,o.b))}n.addAttribute("position",new Gn(i,3)),n.addAttribute("color",new Gn(r,3));var u=new Ma({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Ca.call(this,n,u),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function Su(e,t,n){this.light=e,this.light.updateMatrixWorld(),this.color=n;var i=new No(t,4,2),r=new gi({wireframe:!0,fog:!1});vi.call(this,i,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function xu(e,t){this.type="RectAreaLightHelper",this.light=e,this.color=t;var n=new qn;n.addAttribute("position",new Gn([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),n.computeBoundingSphere();var i=new Ma({fog:!1});Ra.call(this,n,i);var r=new qn;r.addAttribute("position",new Gn([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),r.computeBoundingSphere(),this.add(new vi(r,new gi({side:m,fog:!1}))),this.update()}function Mu(e,t,n){Rn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var i=new Wa(t);i.rotateY(.5*Math.PI),this.material=new gi({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var r=i.getAttribute("position"),a=new Float32Array(3*r.count);i.addAttribute("color",new Dn(a,3)),this.add(new vi(i,this.material)),this.update()}function Ru(e,t){this.lightProbe=e,this.size=t;var n={GAMMA_OUTPUT:""},i=new hi({defines:n,uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:["varying vec3 vNormal;","void main() {","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI 0.318309886","vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {","\t// matrix is assumed to be orthogonal","\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );","}","vec3 linearToOutput( in vec3 a ) {","\t#ifdef GAMMA_OUTPUT","\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );","\t#else","\t\treturn a;","\t#endif","}
3","// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf","vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {","\t// normal is assumed to have unit length","\tfloat x = normal.x, y = normal.y, z = normal.z;","\t// band 0","\tvec3 result = shCoefficients[ 0 ] * 0.886227;","\t// band 1","\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;","\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;","\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;","\t// band 2","\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;","\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;","\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );","\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;","\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );","\treturn result;","}","uniform vec3 sh[ 9 ]; // sh coefficients","uniform float intensity; // light probe intensity","varying vec3 vNormal;","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );","\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );","\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;","\toutgoingLight = linearToOutput( outgoingLight );","\tgl_FragColor = vec4( outgoingLight, 1.0 );","}"].join("\n")}),r=new No(1,32,16);vi.call(this,r,i),this.onBeforeRender()}function Cu(e,t,n,i){e=e||10,t=t||10,n=new hn(void 0!==n?n:4473924),i=new hn(void 0!==i?i:8947848);for(var r=t/2,a=e/t,o=e/2,s=[],l=[],u=0,d=0,c=-o;u<=t;u++,c+=a){s.push(-o,0,c,o,0,c),s.push(c,0,-o,c,0,o);var f=u===r?n:i;f.toArray(l,d),d+=3,f.toArray(l,d),d+=3,f.toArray(l,d),d+=3,f.toArray(l,d),d+=3}var h=new qn;h.addAttribute("position",new Gn(s,3)),h.addAttribute("color",new Gn(l,3));var p=new Ma({vertexColors:2});Ca.call(this,h,p)}function Iu(e,t,n,i,r,a){e=e||10,t=t||16,n=n||8,i=i||64,r=new hn(void 0!==r?r:4473924),a=new hn(void 0!==a?a:8947848);var o,s,l,u,d,c,f,h=[],p=[];for(u=0;u<=t;u++)l=u/t*(2*Math.PI),o=Math.sin(l)*e,s=Math.cos(l)*e,h.push(0,0,0),h.push(o,0,s),f=1&u?r:a,p.push(f.r,f.g,f.b),p.push(f.r,f.g,f.b);for(u=0;u<=n;u++)for(f=1&u?r:a,c=e-e/n*u,d=0;d<i;d++)l=d/i*(2*Math.PI),o=Math.sin(l)*c,s=Math.cos(l)*c,h.push(o,0,s),p.push(f.r,f.g,f.b),l=(d+1)/i*(2*Math.PI),o=Math.sin(l)*c,s=Math.cos(l)*c,h.push(o,0,s),p.push(f.r,f.g,f.b);var m=new qn;m.addAttribute("position",new Gn(h,3)),m.addAttribute("color",new Gn(p,3));var g=new Ma({vertexColors:2});Ca.call(this,m,g)}function Lu(e,t,n,i){this.audio=e,this.range=t||1,this.divisionsInnerAngle=n||16,this.divisionsOuterAngle=i||2;var r=new qn,a=this.divisionsInnerAngle+2*this.divisionsOuterAngle,o=new Float32Array(3*(3*a+3));r.addAttribute("position",new Dn(o,3));var s=new Ma({color:65280}),l=new Ma({color:16776960});Ra.call(this,r,[l,s]),this.update()}function Ou(e,t,n,i){this.object=e,this.size=void 0!==t?t:1;var r=void 0!==n?n:16776960,a=void 0!==i?i:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var l=new qn,u=new Gn(2*o*3,3);l.addAttribute("position",u),Ca.call(this,l,new Ma({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Du(e,t,n){Rn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);var i=new qn;i.addAttribute("position",new Gn([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var r=new Ma({fog:!1});this.lightPlane=new Ra(i,r),this.add(this.lightPlane),(i=new qn).addAttribute("position",new Gn([0,0,0,0,0,1],3)),this.targetLine=new Ra(i,r),this.add(this.targetLine),this.update()}function Pu(e){var t=new qn,n=new Ma({color:16777215,vertexColors:1}),i=[],r=[],a={},o=new hn(16755200),s=new hn(16711680),l=new hn(43775),u=new hn(16777215),d=new hn(3355443);function c(e,t,n){f(e,n),f(t,n)}function f(e,t){i.push(0,0,0),r.push(t.r,t.g,t.b),void 0===a[e]&&(a[e]=[]),a[e].push(i.length/3-1)}c("n1","n2",o),c("n2","n4",o),c("n4","n3",o),c("n3","n1",o),c("f1","f2",o),c("f2","f4",o),c("f4","f3",o),c("f3","f1",o),c("n1","f1",o),c("n2","f2",o),c("n3","f3",o),c("n4","f4",o),c("p","
3n1",s),c("p","n2",s),c("p","n3",s),c("p","n4",s),c("u1","u2",l),c("u2","u3",l),c("u3","u1",l),c("c","t",u),c("p","c",d),c("cn1","cn2",d),c("cn3","cn4",d),c("cf1","cf2",d),c("cf3","cf4",d),t.addAttribute("position",new Gn(i,3)),t.addAttribute("color",new Gn(r,3)),Ca.call(this,t,n),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function Nu(e,t){this.object=e,void 0===t&&(t=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(24),r=new qn;r.setIndex(new Dn(n,1)),r.addAttribute("position",new Dn(i,3)),Ca.call(this,r,new Ma({color:t})),this.matrixAutoUpdate=!1,this.update()}function ku(e,t){this.type="Box3Helper",this.box=e;var n=void 0!==t?t:16776960,i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new qn;r.setIndex(new Dn(i,1)),r.addAttribute("position",new Gn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ca.call(this,r,new Ma({color:n})),this.geometry.computeBoundingSphere()}function Fu(e,t,n){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t;var i=void 0!==n?n:16776960,r=new qn;r.addAttribute("position",new Gn([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),Ra.call(this,r,new Ma({color:i}));var a=new qn;a.addAttribute("position",new Gn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),a.computeBoundingSphere(),this.add(new vi(a,new gi({color:i,opacity:.2,transparent:!0,depthWrite:!1})))}function Bu(e,t,n,i,r,a){Rn.call(this),void 0===e&&(e=new It(0,0,1)),void 0===t&&(t=new It(0,0,0)),void 0===n&&(n=1),void 0===i&&(i=16776960),void 0===r&&(r=.2*n),void 0===a&&(a=.2*r),void 0===ru&&((ru=new qn).addAttribute("position",new Gn([0,0,0,0,1,0],3)),(au=new Wo(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new Ra(ru,new Ma({color:i})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new vi(au,new gi({color:i})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,r,a)}function Uu(e){var t=[0,0,0,e=e||1,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new qn;n.addAttribute("position",new Gn(t,3)),n.addAttribute("color",new Gn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var i=new Ma({vertexColors:2});Ca.call(this,n,i)}Object.assign(uu.prototype,{getValue:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}),Object.assign(du,{Composite:uu,create:function(e,t,n){return e&&e.isAnimationObjectGroup?new du.Composite(e,t,n):new du(e,t,n)},sanitizeNodeName:(tu=new RegExp("["+lu+"]","g"),function(e){return e.replace(/\s/g,"_").replace(tu,"")}),parseTrackName:(Yl="[^"+lu+"]",Kl="[^"+lu.replace("\\.","")+"]",Xl=/((?:WC+[\/:])*)/.source.replace("WC",Yl),Ql=/(WCOD+)?/.source.replace("WCOD",Kl),Zl=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Yl),Jl=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Yl),$l=new RegExp("^"+Xl+Ql+Zl+Jl+"$"),eu=["material","materials","bones"],function(e){var t=$l.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){var r=n.nodeName.substring(i+1);-1!==eu.indexOf(r)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=r)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}),findNode:function(e,t){if(!t||""===t||"root"===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){var i=function(e){for(var n=0;n<e.length;n++){var r=e[n];if(r.name===t||r.uuid===t)return r;var a=i(r.children);if(a)return a}return null},r=i(e.children);if(r)return r}return null}}),Object.assign(du.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)e[t++]=n[i]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)n[i]=e[t++]},function(e,t){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,i=t.propertyName,r=t.propertyIndex;if(e||(e=du.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(n){var a=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as no
vendor: 16,758 bytes, lines 3-5
3de does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var o=0;o<e.length;o++)if(e[o].name===a){a=o;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==a){if(void 0===e[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[a]}}var s=e[i];if(void 0!==s){var l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var u=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(e.geometry.isBufferGeometry){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(o=0;o<this.node.geometry.morphAttributes.position.length;o++)if(e.geometry.morphAttributes.position[o].name===r){r=o;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(o=0;o<this.node.geometry.morphTargets.length;o++)if(e.geometry.morphTargets[o].name===r){r=o;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][l]}else{var d=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+d+"."+i+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
4//!\ DECLARE ALIAS AFTER assign prototype !
5Object.assign(du.prototype,{_getValue_unbound:du.prototype.getValue,_setValue_unbound:du.prototype.setValue}),Object.assign(function(){this.uuid=Mt.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var i=this;this.stats={objects:{get total(){return i._objects.length},get inUse(){return this.total-i.nCachedObjects_}},get bindingsPerObject(){return i._bindings.length}}}.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,i=this._indicesByUUID,r=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,l=void 0,u=0,d=arguments.length;u!==d;++u){var c=arguments[u],f=c.uuid,h=i[f];if(void 0===h){h=t++,i[f]=h,e.push(c);for(var p=0,m=s;p!==m;++p)o[p].push(new du(c,r[p],a[p]))}else if(h<n){l=e[h];var g=--n,v=e[g];i[v.uuid]=h,e[h]=v,i[f]=g,e[g]=c;for(p=0,m=s;p!==m;++p){var y=o[p],_=y[g],E=y[h];y[h]=_,void 0===E&&(E=new du(c,r[p],a[p])),y[g]=E}}else e[h]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var e=this._objects,t=this.nCachedObjects_,n=this._indicesByUUID,i=this._bindings,r=i.length,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],l=s.uuid,u=n[l];if(void 0!==u&&u>=t){var d=t++,c=e[d];n[c.uuid]=u,e[u]=c,n[l]=d,e[d]=s;for(var f=0,h=r;f!==h;++f){var p=i[f],m=p[d],g=p[u];p[u]=m,p[d]=g}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,i=this._indicesByUUID,r=this._bindings,a=r.length,o=0,s=arguments.length;o!==s;++o){var l=arguments[o].uuid,u=i[l];if(void 0!==u)if(delete i[l],u<n){var d=--n,c=e[d],f=e[v=--t];i[c.uuid]=u,e[u]=c,i[f.uuid]=d,e[d]=f,e.pop();for(var h=0,p=a;h!==p;++h){var m=(y=r[h])[d],g=y[v];y[u]=m,y[d]=g,y.pop()}}else{var v;i[(f=e[v=--t]).uuid]=u,e[u]=f,e.pop();for(h=0,p=a;h!==p;++h){var y;(y=r[h])[u]=y[v],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,i=n[e],r=this._bindings;if(void 0!==i)return r[i];var a=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,u=this.nCachedObjects_,d=new Array(l);i=r.length,n[e]=i,a.push(e),o.push(t),r.push(d);for(var c=u,f=s.length;c!==f;++c){var h=s[c];d[c]=new du(h,e,t)}return d},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var i=this._paths,r=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];t[e[o]]=n,a[n]=s,a.pop(),r[n]=r[o],r.pop(),i[n]=i[o],i.pop()}}}),Object.assign(cu.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var i=this._clip.duration,r=e._clip.duration,a=r/i,o=i/r;e.warp(1,a,t),this.warp(o,1,t)}return this},crossFadeTo:function(e,t,n){return e.crossFadeFrom(this,t,n)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,n){var i=this._mixer,r=i.time,a=this._timeScaleInterpolant,o=this.timeScale;null===a&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,l=a.sampleValues;return s[0]=r,s[1]=r+n,l[0]=e/o,l[1]=t/o,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,n,i){if(this.enabled){var r=this._startTime;if(null!==r){var a=(e-r)*n;if(a<0||0===n)return;this._startTime=null,t=n*a}t*=this._updateTimeScale(e);var o=this._updateTime(t),s=this._updateWeight(e);if(s>0)for(var l=this._interpolants,u=this._propertyBindings,d=0,c=l.length;d!==c;++d)l[d].evaluate(o),u[d].accumulate(i,s)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,i=this.loop,r=this._loopCount,a=2202===i;if(0===e)return-1===r||!a||1&~r?t:n-t;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),t>=n||t<0){var o=Math.floor(t/n);t-=n*o,r+=Math.abs(o);var s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(a&&!(1&~r))return n-t}return t},_setEndings:function(e,t,n){var i=this._interpolantSettings;n?(i.endingStart=ft,i.endingEnd=ft):(i.endingStart=e?this.zeroSlopeAtStart?ft:ct:ht,i.endingEnd=t?this.zeroSlopeAtEnd?ft:ct:ht)},_scheduleFading:function(e,t,n){var i=this._mixer,r=i.time,a=this._weightInterpolant;null===a&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=r,s[0]=t,o[1]=r+e,s[1]=n,this}}),fu.prototype=Object.assign(Object.create(i.prototype),{constructor:fu,_bindAction:function(e,t){var n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName,u=l[s];void 0===u&&(u={},l[s]=u);for(var d=0;d!==r;++d){var c=i[d],f=c.name,h=u[f];if(void 0!==h)a[d]=h;else{if(void 0!==(h=a[d])){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,s,f));continue}var p=t&&t._propertyBindings[d].binding.parsedPath;++(h=new ql(du.create(n,f,p),c.ValueTypeName,c.getValueSize())).referenceCount,this._addInactiveBinding(h,s,f),a[d]=h}o[d].resultBuffer=h.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,i=this._actionsByClip[n];this._bindAction(e,i&&i.knownActions[0]),this._addInactiveAction(e,n,t)}for(var r=e._propertyBindings,a=0,o=r.length;a!==o;++a){var s=r[a];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,i=t.length;n!==i;++n){var r=t[n];0===--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,n){var i=this._actions,r=this._actionsByClip,a=r[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=a;else{var o=a.knownActions;e._byClipCacheIndex=o.length,o.push(e)}e._cacheIndex=i.length,i.push(e),a.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,t.pop(),e._cacheIndex=null;var r=e._clip.uuid,a=this._actionsByClip,o=a[r],s=o.knownActions,l=s[s.length-1],u=e._byClipCacheIndex;l._byClipCacheIndex=u,s[u]=l,s.pop(),e._byClipCacheIndex=null,delete o.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete a[r],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,i=t.length;n!==i;++n){var r=t[n];0===--r.referenceCount&&this._removeInactiveBinding(r)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r},_addInactiveBinding:function(e,t,n){var i=this._bindingsByRootAndName,r=i[t],a=this._bindings;void 0===r&&(r={},i[t]=r),r[n]=e,e._cacheIndex=a.length,a.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,a=this._bindingsByRootAndName,o=a[i],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete o[r];e:{for(var u in o)break e;delete a[i]}},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&((n=new cs(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t){var n=t||this._root,i=n.uuid,r="string"==typeof e?bs.findByName(n,e):e,a=null!==r?r.uuid:e,o=this._actionsByClip[a],s=null;if(void 0!==o){var l=o.actionByRoot[i];if(void 0!==l)return l;s=o.knownActions[0],null===r&&(r=s._clip)}if(null===r)return null;var u=new cu(this,r,t);return this._bindAction(u,s),this._addInactiveAction(u,a,i),u},existingAction:function(e,t){var n=t||this._root,i=n.uuid,r="string"==typeof e?bs.findByName(n,e):e,a=r?r.uuid:e,o=this._actionsByClip[a];return void 0!==o&&o.actionByRoot[i]||null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,n=this._bindings,i=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var r=0;r!==t;++r)e[r].reset();for(r=0;r!==i;++r)n[r].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1,o=0;o!==n;++o){t[o]._update(i,e,r,a)}var s=this._bindings,l=this._nActiveBindings;for(o=0;o!==l;++o)s[o].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){for(var a=r.knownActions,o=0,s=a.length;o!==s;++o){var l=a[o];this._deactivateAction(l);var u=l._cacheIndex,d=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,d._cacheIndex=u,t[u]=d,t.pop(),this._removeInactiveBindingsForAction(l)}delete i[n]}},uncacheRoot:function(e){var t=e.uuid,n=this._actionsByClip;for(var i in n){var r=n[i].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}var a=this._bindingsByRootAndName[t];if(void 0!==a)for(var o in a){var s=a[o];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(e,t){var n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),hu.prototype.clone=function(){return new hu(void 0===this.value.clone?this.value:this.value.clone())},pu.prototype=Object.assign(Object.create(_a.prototype),{constructor:pu,isInstancedInterleavedBuffer:!0,copy:function(e){return _a.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),Object.assign(mu.prototype,{linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize()):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld)):console.error("THREE.Raycaster: 
5Unsupported camera type.")},intersectObject:function(e,t,n){var i=n||[];return vu(e,this,i,t),i.sort(gu),i},intersectObjects:function(e,t,n){var i=n||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var r=0,a=e.length;r<a;r++)vu(e[r],this,i,t);return i.sort(gu),i}}),Object.assign(function(e,t,n){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==n?n:0,this}.prototype,{set:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){var e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Mt.clamp(t/this.radius,-1,1))),this}}),Object.assign(function(e,t,n){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==n?n:0,this}.prototype,{set:function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}}),Object.assign(yu.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new Rt;return function(t,n){var i=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new Rt),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new Rt),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Rt),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Rt),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new Rt;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(_u.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new It),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new It),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at(
5) target is now required"),t=new It),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:(nu=new It,iu=new It,function(e,t){nu.subVectors(e,this.start),iu.subVectors(this.end,this.start);var n=iu.dot(iu),i=iu.dot(nu)/n;return t&&(i=Mt.clamp(i,0,1)),i}),closestPointToPoint:function(e,t,n){var i=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new It),this.delta(n).multiplyScalar(i).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Eu.prototype=Object.create(Rn.prototype),Eu.prototype.constructor=Eu,Eu.prototype.isImmediateRenderObject=!0,bu.prototype=Object.create(Ca.prototype),bu.prototype.constructor=bu,bu.prototype.update=function(){var e=new It,t=new It,n=new Lt;return function(){var i=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,a=this.geometry.attributes.position,o=this.object.geometry;if(o&&o.isGeometry)for(var s=o.vertices,l=o.faces,u=0,d=0,c=l.length;d<c;d++)for(var f=l[d],h=0,p=f.vertexNormals.length;h<p;h++){var m=s[f[i[h]]],g=f.vertexNormals[h];e.copy(m).applyMatrix4(r),t.copy(g).applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),a.setXYZ(u,e.x,e.y,e.z),u+=1,a.setXYZ(u,t.x,t.y,t.z),u+=1}else if(o&&o.isBufferGeometry){var v=o.attributes.position,y=o.attributes.normal;for(u=0,h=0,p=v.count;h<p;h++)e.set(v.getX(h),v.getY(h),v.getZ(h)).applyMatrix4(r),t.set(y.getX(h),y.getY(h),y.getZ(h)),t.applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),a.setXYZ(u,e.x,e.y,e.z),u+=1,a.setXYZ(u,t.x,t.y,t.z),u+=1}a.needsUpdate=!0}}(),Tu.prototype=Object.create(Rn.prototype),Tu.prototype.constructor=Tu,Tu.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Tu.prototype.update=function(){var e=new It;return function(){this.light.updateMatrixWorld();var t=this.light.distance?this.light.distance:1e3,n=t*Math.tan(this.light.angle);this.cone.scale.set(n,n,t),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Au.prototype=Object.create(Ca.prototype),Au.prototype.constructor=Au,Au.prototype.updateMatrixWorld=function(){var e=new It,t=new an,n=new an;return function(i){var r=this.bones,a=this.geometry,o=a.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,l=0;s<r.length;s++){var u=r[s];u.parent&&u.parent.isBone&&(t.multiplyMatrices(n,u.matrixWorld),e.setFromMatrixPosition(t),o.setXYZ(l,e.x,e.y,e.z),t.multiplyMatrices(n,u.parent.matrixWorld),e.setFromMatrixPosition(t),o.setXYZ(l+1,e.x,e.y,e.z),l+=2)}a.getAttribute("position").needsUpdate=!0,Rn.prototype.updateMatrixWorld.call(this,i)}}(),Su.prototype=Object.create(vi.prototype),Su.prototype.constructor=Su,Su.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Su.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},xu.prototype=Object.create(Ra.prototype),xu.prototype.constructor=xu,xu.prototype.update=function(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),void 0!==this.color)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);var e=this.material.color,t=Math.max(e.r,e.g,e.b);t>1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}},xu.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()},Mu.prototype=Object.create(Rn.prototype),Mu.prototype.constructor=Mu,Mu.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Mu.prototype.update=function(){var e=new It,t=new hn,n=new hn;return function(){var i=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var r=i.geometry.getAttribute("color");t.copy(this.light.color),n.copy(this.light.groundColor);for(var a=0,o=r.count;a<o;a++){var s=a<o/2?t:n;r.setXYZ(a,s.r,s.g,s.b)}r.needsUpdate=!0}i.lookAt(e.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),Ru.prototype=Object.create(vi.prototype),Ru.prototype.constructor=Ru,Ru.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Ru.prototype.onBeforeRender=function(){this.position.copy(this.lightProbe.position),this.scale.set(1,1,1).multiplyScalar(this.size),this.material.uniforms.intensity.value=this.lightProbe.intensity},Cu.prototype=Object.assign(Object.create(Ca.prototype),{constructor:Cu,copy:function(e){return Ca.prototype.copy.call(this,e),this.geometry.copy(e.geometry),this.material.copy(e.material),this},clone:function(){return(new this.constructor).copy(this)}}),Iu.prototype=Object.create(Ca.prototype),Iu.prototype.constructor=Iu,Lu.prototype=Object.create(Ra.prototype),Lu.prototype.constructor=Lu,Lu.prototype.update=function(){var e,t,n=this.audio,i=this.range,r=this.divisionsInnerAngle,a=this.divisionsOuterAngle,o=Mt.degToRad(n.panner.coneInnerAngle),s=Mt.degToRad(n.panner.coneOuterAngle),l=o/2,u=s/2,d=0,c=0,f=this.geometry,h=f.attributes.position;function p(n,r,a,o){var s=(r-n)/a;for(h.setXYZ(d,0,0,0),c++,e=n;e<r;e+=s)t=d+c,h.setXYZ(t,Math.sin(e)*i,0,Math.cos(e)*i),h.setXYZ(t+1,Math.sin(Math.min(e+s,r))*i,0,Math.cos(Math.min(e+s,r))*i),h.setXYZ(t+2,0,0,0),c+=3;
vendor: 6,624 bytes, line 5
5f.addGroup(d,c,o),d+=c,c=0}f.clearGroups(),p(-u,-l,a,0),p(-l,l,r,1),p(l,u,a,0),h.needsUpdate=!0,o===s&&(this.material[0].visible=!1)},Lu.prototype.dispose=function(){this.geometry.dispose(),this.material[0].dispose(),this.material[1].dispose()},Ou.prototype=Object.create(Ca.prototype),Ou.prototype.constructor=Ou,Ou.prototype.update=function(){var e=new It,t=new It,n=new Lt;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var i=this.object.matrixWorld,r=this.geometry.attributes.position,a=this.object.geometry,o=a.vertices,s=a.faces,l=0,u=0,d=s.length;u<d;u++){var c=s[u],f=c.normal;e.copy(o[c.a]).add(o[c.b]).add(o[c.c]).divideScalar(3).applyMatrix4(i),t.copy(f).applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),r.setXYZ(l,e.x,e.y,e.z),l+=1,r.setXYZ(l,t.x,t.y,t.z),l+=1}r.needsUpdate=!0}}(),Du.prototype=Object.create(Rn.prototype),Du.prototype.constructor=Du,Du.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Du.prototype.update=function(){var e=new It,t=new It,n=new It;return function(){e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(t,e),this.lightPlane.lookAt(t),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(t),this.targetLine.scale.z=n.length()}}(),Pu.prototype=Object.create(Ca.prototype),Pu.prototype.constructor=Pu,Pu.prototype.update=function(){var e,t,n=new It,i=new ta;function r(r,a,o,s){n.set(a,o,s).unproject(i);var l=t[r];if(void 0!==l)for(var u=e.getAttribute("position"),d=0,c=l.length;d<c;d++)u.setXYZ(l[d],n.x,n.y,n.z)}return function(){e=this.geometry,t=this.pointMap;i.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),r("c",0,0,-1),r("t",0,0,1),r("n1",-1,-1,-1),r("n2",1,-1,-1),r("n3",-1,1,-1),r("n4",1,1,-1),r("f1",-1,-1,1),r("f2",1,-1,1),r("f3",-1,1,1),r("f4",1,1,1),r("u1",.7,1.1,-1),r("u2",-.7,1.1,-1),r("u3",0,2,-1),r("cf1",-1,0,1),r("cf2",1,0,1),r("cf3",0,-1,1),r("cf4",0,1,1),r("cn1",-1,0,-1),r("cn2",1,0,-1),r("cn3",0,-1,-1),r("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),Nu.prototype=Object.create(Ca.prototype),Nu.prototype.constructor=Nu,Nu.prototype.update=function(){var e=new en;return function(t){if(void 0!==t&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&e.setFromObject(this.object),!e.isEmpty()){var n=e.min,i=e.max,r=this.geometry.attributes.position,a=r.array;a[0]=i.x,a[1]=i.y,a[2]=i.z,a[3]=n.x,a[4]=i.y,a[5]=i.z,a[6]=n.x,a[7]=n.y,a[8]=i.z,a[9]=i.x,a[10]=n.y,a[11]=i.z,a[12]=i.x,a[13]=i.y,a[14]=n.z,a[15]=n.x,a[16]=i.y,a[17]=n.z,a[18]=n.x,a[19]=n.y,a[20]=n.z,a[21]=i.x,a[22]=n.y,a[23]=n.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),Nu.prototype.setFromObject=function(e){return this.object=e,this.update(),this},Nu.prototype.copy=function(e){return Ca.prototype.copy.call(this,e),this.object=e.object,this},Nu.prototype.clone=function(){return(new this.constructor).copy(this)},ku.prototype=Object.create(Ca.prototype),ku.prototype.constructor=ku,ku.prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),Rn.prototype.updateMatrixWorld.call(this,e))},Fu.prototype=Object.create(Ra.prototype),Fu.prototype.constructor=Fu,Fu.prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?m:p,this.lookAt(this.plane.normal),Rn.prototype.updateMatrixWorld.call(this,e)},Bu.prototype=Object.create(Rn.prototype),Bu.prototype.constructor=Bu,Bu.prototype.setDirection=(su=new It,function(e){e.y>.99999?this.quaternion.set(0,0,0,1):e.y<-.99999?this.quaternion.set(1,0,0,0):(su.set(e.z,0,-e.x).normalize(),ou=Math.acos(e.y),this.quaternion.setFromAxisAngle(su,ou))}),Bu.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},Bu.prototype.setColor=function(e){this.line.material.color.copy(e),this.cone.material.color.copy(e)},Bu.prototype.copy=function(e){return Rn.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},Bu.prototype.clone=function(){return(new this.constructor).copy(this)},Uu.prototype=Object.create(Ca.prototype),Uu.prototype.constructor=Uu;function ju(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),js.call(this,e),this.type="catmullrom"}Os.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Os.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Js.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new On,n=0,i=e.length;n<i;n++){var r=e[n];t.vertices.push(new It(r.x,r.y,r.z||0))}return t}}),Object.assign($s.prototype,{fromPoints:function(e){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),Object.create(js.prototype),Object.create(js.prototype),ju.prototype=Object.create(js.prototype),Object.assign(ju.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Cu.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Au.prototype.update=function(){console.error("THREE.SkeletonHelper: update(
5) no longer needs to be called.")},Object.assign(Ll.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),hl(e)}}),Object.assign(yl.prototype,{setTexturePath:function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}),Object.assign(yu.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(en.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),_u.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(Mt,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Mt.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Mt.ceilPowerOfTwo(e)}}),Object.assign(Lt.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3(
5) has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(an.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){var e;return function(){return void 0===e&&(e=new It),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),e.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3(
5) has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,n,i,r,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,i,n,r,a)}}),nn.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Ct.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3(
5) has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Object.assign(pi.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(mi.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(mi,{barycoordFromPoint:function(e,t,n,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),mi.getBarycoord(e,t,n,i,r)},normal:function(e,t,n,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),mi.getNormal(e,t,n,i)}}),Object.assign(el.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ro(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new jo(this,e)}}),Object.assign(Rt.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(It.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Xt.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(On.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Rn.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Rn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library n
5ow uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(wa.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Sa.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Aa.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(Os.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),na.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(tl.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(Dn.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(qn.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(qn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Co.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(hu.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Jn.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")}
vendor: 4,451 bytes, line 5
5,set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new hn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}}}),Object.defineProperties(ts.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hi.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(ma.prototype,{clearTarget:function(e,t,n,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,i)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling(
5) has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")}}),Object.defineProperties(ma.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Qr.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Jt.prototype,{activeCubeFace:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeCubeFace has been removed. It is now the second parameter of WebGLRenderer.setRenderTarget().")}},activeMipMapLevel:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeMipMapLevel has been removed. It is now the third parameter of WebGLRenderer.setRenderTarget().")}}}),Object.defineProperties(Qt.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(ha.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Hl.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new Dl).load(e,function(e){t.setBuffer(e)}),this},Wl.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},jl.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update(
5)."),this.update(e,t)};qt.crossOrigin=void 0,qt.loadTexture=function(e,t,n,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Ls;r.setCrossOrigin(this.crossOrigin);var a=r.load(e,n,void 0,i);return t&&(a.mapping=t),a},qt.loadTextureCube=function(e,t,n,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new Is;r.setCrossOrigin(this.crossOrigin);var a=r.load(e,n,void 0,i);return t&&(a.mapping=t),a},qt.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},qt.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e=void 0,t=[],n={},i={};function r(e,n){for(var i in t){var r=t[i];if(r.context===e&&r.name===n)return r.instance}return null}function a(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,i){var r=void 0,a=t.__dashjs_factory_name,o=n[a];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},i);for(var l in r=t.apply({context:n},i),s=s.apply({context:n,factory:e,parent:r},i))r.hasOwnProperty(l)&&(r[l]=s[l])}else r=t.apply({context:n},i);return r.getClassName=function(){return a},r}return e={extend:function(e,t,n,i){!i[e]&&t&&(i[e]={instance:t,override:n})},getSingletonInstance:r,setSingletonInstance:function(e,n,i){for(var r in t){var a=t[r];if(a.context===e&&a.name===n)return void(t[r].instance=i)}t.push({name:n,context:e,instance:i})},getSingletonFactory:function(e){var i=a(e.__dashjs_factory_name,n);return i||(i=function(n){var i=void 0;return void 0===n&&(n={}),{getInstance:function(){return i||(i=r(n,e.__dashjs_factory_name)),i||(i=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:i})),i}}},n[e.__dashjs_factory_name]=i),i},getSingletonFactoryByName:function(e){return a(e,n)},updateSingletonFactory:function(e,t){o(e,t,n)},getClassFactory:function(e){var t=a(e.__dashjs_factory_name,i);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},i[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return a(e,i)},updateClassFactory:function(e,t){o(e,t,i)}},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){var e={};function t(t,n,i){var r=-1;return e[t]?(e[t].some(function(e,t){if(e&&e.callback===n&&(!i||i===e.scope))return r=t,!0}),r):r}var n={on:function(n,i,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;
vendor: 4,412 bytes, line 5
5if(!n)throw new Error("event type cannot be null or undefined");if(!i||"function"!=typeof i)throw new Error("listener must be a function: "+i);if(!(t(n,i,r)>=0)){e[n]=e[n]||[];var o={callback:i,scope:r,priority:a};e[n].some(function(t,i){if(t&&a>t.priority)return e[n].splice(i,0,o),!0})||e[n].push(o)}},off:function(n,i,r){if(n&&i&&e[n]){var a=t(n,i,r);a<0||(e[n][a]=null)}},trigger:function(t,n){if(t&&e[t]){if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,e[t]=e[t].filter(function(e){return e}),e[t].forEach(function(e){return e&&e.callback.call(e.scope,n)})}},reset:function(){e={}}};return n}o.__dashjs_factory_name="EventBus";var s=a.default.getSingletonFactory(o);s.EVENT_PRIORITY_LOW=0,s.EVENT_PRIORITY_HIGH=5e3,a.default.updateSingletonFactory(o.__dashjs_factory_name,s),t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2)),r=o(n(5)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var s=1,l=2,u=3,d=4,c=5;function f(e){e=e||{};var t,n=this.context,a=(0,i.default)(n).getInstance(),o=e.settings,f=[],h=void 0,p=void 0,m=void 0;function g(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function v(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];T.apply(void 0,[s,this].concat(t))}function y(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];T.apply(void 0,[l,this].concat(t))}function _(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];T.apply(void 0,[u,this].concat(t))}function E(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];T.apply(void 0,[d,this].concat(t))}function b(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];T.apply(void 0,[c,this].concat(t))}function T(e,t){var n="",i=null;h&&(i=(new Date).getTime(),n+="["+(i-m)+"]"),p&&t&&t.getClassName&&(n+="["+t.getClassName()+"]",t.getType&&(n+="["+t.getType()+"]")),n.length>0&&(n+=" ");for(var s=arguments.length,l=Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];Array.apply(null,l).forEach(function(e){n+=e+" "}),f[e]&&o.get().debug.logLevel>=e&&f[e](n),a.trigger(r.default.LOG,{message:n,level:e})}return t={getLogger:function(e){return{fatal:v.bind(e),error:y.bind(e),warn:_.bind(e),info:E.bind(e),debug:b.bind(e)}},setLogTimestampVisible:function(e){h=e},setCalleeNameVisible:function(e){p=e}},h=!0,p=!0,m=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(f[s]=g(window.console.error),f[l]=g(window.console.error),f[u]=g(window.console.warn),f[d]=g(window.console.info),f[c]=g(window.console.debug)),t}f.__dashjs_factory_name="Debug";var h=a.default.getSingletonFactory(f);h.LOG_LEVEL_NONE=0,h.LOG_LEVEL_FATAL=s,h.LOG_LEVEL_ERROR=l,h.LOG_LEVEL_WARNING=u,h.LOG_LEVEL_INFO=d,h.LOG_LEVEL_DEBUG=c,a.default.updateSingletonFactory(f.__dashjs_factory_name,h),t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return i(e,[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.FRAGMENTED_TEXT="fragmentedText",this.EMBEDDED_TEXT="embeddedText",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019"}}]),e}());t.default=r},function(e,t,n){"use strict";
vendor: 20,341 bytes, line 5
5Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(112);var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default),o=new a;t.default=o},function(e,t,n){var i=n(98),r=n(61);void 0===r.jQuery&&(r.jQuery=i),void 0===r.$&&(r.$=i),e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t||null,this.message=n||null,this.data=i||null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(74);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,e.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,e.SEGMENTS_UPDATE_FAILED_ERROR_CODE=13,e.SEGMENTS_UNAVAILABLE_ERROR_CODE=14,e.SEGMENT_BASE_LOADER_ERROR_CODE=15,e.TIME_SYNC_FAILED_ERROR_CODE=16,e.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,e.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,e.APPEND_ERROR_CODE=20,e.REMOVE_ERROR_CODE=21,e.DATA_UPDATE_FAILED_ERROR_CODE=22,e.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,e.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,e.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,e.DOWNLOAD_ERROR_ID_SIDX_CODE=26,e.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,e.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,e.DOWNLOAD_ERROR_ID_XLINK_CODE=29,e.MANIFEST_ERROR_ID_CODEC_CODE=30,e.MANIFEST_ERROR_ID_PARSE_CODE=31,e.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,e.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,e.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,e.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",e.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",e.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",e.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",e.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segments",e.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize time",e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",e.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",e.APPEND_ERROR_MESSAGE="chunk is not defined",e.REMOVE_ERROR_MESSAGE="buffer is not defined",e.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",e.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",e.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",e.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",e.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default));t.default=a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function e(){i(this,e),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null};r.GET="GET",r.HEAD="HEAD",r.MPD_TYPE="MPD",r.XLINK_EXPANSION_TYPE="XLinkExpansion",r.INIT_SEGMENT_TYPE="InitializationSegment",r.INDEX_SEGMENT_TYPE="IndexSegment",r.MEDIA_SEGMENT_TYPE="MediaSegment",r.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",r.OTHER_TYPE="other",t.HTTPRequest=r,t.HTTPRequestTrace=function e(){i(this,e),this.s=null,this.d=null,this.b=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return i(e,[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors"}}]),e}());t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return i(e,[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.INBAND_EVENT_STREAM="InbandEventStream",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.ROLE_ASARRAY="Role_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate"}}]),e}());t.default=r},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};var o={DEFAULT:.5,STRONG:1,WEAK:0};function s(e,t,n){var i,r;return i=void 0===e?-1:e,r=function(e){var t=o.DEFAULT;return e!==o.DEFAULT&&e!==o.STRONG&&e!==o.WEAK||(t=e),t}(n),{quality:i,reason:void 0===t?null:t,priority:r}}s.__dashjs_factory_name="SwitchRequest";var l=a.default.getClassFactory(s);l.NO_CHANGE=-1,l.PRIORITY=o,a.default.updateClassFactory(s.__dashjs_factory_name,l),t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.checkParameterType=function(e,t){if((void 0===e?"undefined":i(e))!==t)throw o.default.BAD_ARGUMENT_ERROR},t.checkInteger=function(e){if(null===e||isNaN(e)||e%1!=0)throw o.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"},t.checkRange=function(e,t,n){if(e<t||e>n)throw o.default.BAD_ARGUMENT_ERROR+" : argument out of range"},t.checkIsVideoOrAudioType=function(e){if("string"!=typeof e||e!==o.default.AUDIO&&e!==o.default.VIDEO)throw o.default.BAD_ARGUMENT_ERROR};var r,a=n(4),o=(r=a)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){var e=void 0,t=/^[a-z][a-z0-9+\-.]*:/i,n=/^https?:\/\//i,i=/^https:\/\//i,r=/^([a-z][a-z0-9+\-.]*:\/\/[^\/]+)\/?/i,a=function(e,t){try{return new window.URL(e,t).toString()}catch(t){return e}},o=function(e,t){var n=s;if(!t)return e;if(!d(e))return e;c(e)&&(n=l),f(e)&&(n=u);var i=n(t),r="/"!==i.charAt(i.length-1)&&"/"!==e.charAt(0)?"/":"";return[i,e].join(r)};function s(e){var t=e.indexOf("/"),n=e.lastIndexOf("/");return-1!==t?n===t+1?e:(-1!==e.indexOf("?")&&(e=e.substring(0,e.indexOf("?"))),e.substring(0,n+1)):""}function l(e){var t=e.match(r);return t?t[1]:""}function u(e){var n=e.match(t);return n?n[0]:""}function d(e){return!t.test(e)}function c(e){return d(e)&&"/"===e.charAt(0)}function f(e){return 0===e.indexOf("//")}return function(){try{new window.URL("x","http://y");e=a}catch(e){}finally{e=e||o}}(),{parseBaseUrl:s,parseOrigin:l,parseScheme:u,isRelative:d,isPathAbsolute:c,isSchemeRelative:f,isHTTPURL:function(e){return n.test(e)},isHTTPS:function(e){return i.test(e)},resolve:function(t,n){return e(t,n)}}}o.__dashjs_factory_name="URLUtils",t.default=a.default.getSingletonFactory(o)},function(e,t){var n,i,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(e){i=o}}();var l,u=[],d=!1,c=-1;function f(){d&&l&&(d=!1,l.length?u=l.concat(u):c=-1,u.length&&h())}function h(){if(!d){var e=s(f);d=!0;for(var t=u.length;t;){for(l=u,u=[];++c<t;)l&&l[c].run();c=-1,t=u.length}l=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||d||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(9);var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.action=e.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}return i(e,[{key:"isInitializationRequest",value:function(){return this.type&&this.type===r.HTTPRequest.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(e){this.type=e&&e.init?r.HTTPRequest.INIT_SEGMENT_TYPE:r.HTTPRequest.MEDIA_SEGMENT_TYPE,this.url=e&&e.url?e.url:null,this.range=e&&e.range?e.range.start+"-"+e.range.end:null,this.mediaType=e&&e.mediaType?e.mediaType:null}}]),e}();a.ACTION_DOWNLOAD="download",a.ACTION_COMPLETE="complete",t.default=a},function(e,t,n){"use strict";var i=n(31),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var a=Object.create(n(24));a.inherits=n(20);var o=n(70),s=n(44);a.inherits(c,o);for(var l=r(s.prototype),u=0;u<l.length;u++){var d=l[u];c.prototype[d]||(c.prototype[d]=s.prototype[d])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||i.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),i.nextTick(t,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return i(e,[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready"}}]),e}());t.default=r},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescapeDollarsInTemplate=function(e){return e?e.split("$$").join("$"):e},t.replaceIDForTemplate=function(e,t){if(!t||!e||-1===e.indexOf("$RepresentationID$"))return e;var n=t.toString();return e.split("$RepresentationID$").join(n)},t.replaceTokenForTemplate=s,t.getIndexBasedSegment=function(e,t,n,i){var r,a,o=void 0;o=n.segmentDuration,isNaN(o)&&(o=n.adaptation.period.duration);r=parseFloat((n.adaptation.period.start+i*o).toFixed(5)),a=parseFloat((r+o).toFixed(5));var s=l(n,o,r,e.calcMediaTimeFromPresentationTime(r,n),e.calcAvailabilityStartTimeFromPresentationTime(r,n.adaptation.period.mpd,t),e,a,t,i);if(!u(e,n,s,t))return null;return s},t.getTimeBasedSegment=function(e,t,n,i,r,a,o,d,c,f){var h,p,m=i/a,g=Math.min(r/a,n.adaptation.period.mpd.maxSegmentDuration),v=void 0;if(h=e.calcPresentationTimeFromMediaTime(m,n),p=h+g,v=l(n,g,h,m,n.adaptation.period.mpd.manifest.loadedTime,e,p,t,c),!u(e,n,v,t))return null;return v.replacementTime=f||i,o=s(o,"Number",v.replacementNumber),o=s(o,"Time",v.replacementTime),v.media=o,v.mediaRange=d,v};var i,r=n(49),a=(i=r)&&i.__esModule?i:{default:i};function o(e,t){for(;e.length<t;)e="0"+e;return e}function s(e,t,n){var i=void 0,r=void 0,a=void 0,s=void 0,l=void 0,u=void 0,d=t.length;if(!e)return e;for(;;){if((i=e.indexOf("$"+t))<0)return e;if((r=e.indexOf("$",i+d))<0)return e;if((a=e.indexOf("%0",i+d))>i&&a<r)switch(s=e.charAt(r-1),l=parseInt(e.substring(a+2,r-1),10),s){case"d":case"i":case"u":u=o(n.toString(),l);break;case"x":u=o(n.toString(16),l);break;case"X":u=o(n.toString(16),l).toUpperCase();break;case"o":u=o(n.toString(8),l);break;default:return e}else u=n;e=e.substring(0,i)+u+e.substring(r+1)}}function l(e,t,n,i,r,o,s,l,u){var d,c=new a.default;return c.representation=e,c.duration=t,c.presentationStartTime=n,c.mediaStartTime=i,c.availabilityStartTime=r,c.availabilityEndTime=o.calcAvailabilityEndTimeFromPresentationTime(s,e.adaptation.period.mpd,l),c.wallStartTime=o.calcWallTimeForSegment(c,l),c.replacementNumber=(d=u,c.representation.startNumber+d),c.availabilityIdx=u,c}function u(e,t,n,i){var r=e.getPeriodEnd(t,i),a=e.calcPeriodRelativeTimeFromMpdRelativeTime(t,r);
vendor: 5,336 bytes, line 5
5if(e.calcPeriodRelativeTimeFromMpdRelativeTime(t,n.presentationStartTime)>=a){if(!i)return!1;if(t.segmentAvailabilityRange&&n.presentationStartTime>=t.segmentAvailabilityRange.end)return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var i=e[n];"urn:mpeg:dash:mp4protection:2011"===i.schemeIdUri.toLowerCase()&&"cenc"===i.value.toLowerCase()&&(t=i)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),i=n.getUint8(t);return t+=20,i>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var i=e.parsePSSHList(n);return t&&i.hasOwnProperty(t.uuid.toLowerCase())?i[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e?t.decodeArray(e.pssh.__text).buffer:null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},i=0;;){var r,a,o=void 0,s=i;if(i>=t.buffer.byteLength)break;if(r=i+t.getUint32(i),i+=4,1886614376===t.getUint32(i))if(i+=4,0===(a=t.getUint8(i))||1===a){i++,i+=3,o="";var l=void 0,u=void 0;for(l=0;l<4;l++)o+=1===(u=t.getUint8(i+l).toString(16)).length?"0"+u:u;for(i+=4,o+="-",l=0;l<2;l++)o+=1===(u=t.getUint8(i+l).toString(16)).length?"0"+u:u;for(i+=2,o+="-",l=0;l<2;l++)o+=1===(u=t.getUint8(i+l).toString(16)).length?"0"+u:u;for(i+=2,o+="-",l=0;l<2;l++)o+=1===(u=t.getUint8(i+l).toString(16)).length?"0"+u:u;for(i+=2,o+="-",l=0;l<6;l++)o+=1===(u=t.getUint8(i+l).toString(16)).length?"0"+u:u;i+=6,o=o.toLowerCase(),t.getUint32(i),i+=4,n[o]=t.buffer.slice(s,r),i=r}else i=r;else i=r}return n}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(3)),r=l(n(118)),a=l(n(1)),o=l(n(38)),s=l(n(120));function l(e){return e&&e.__esModule?e:{default:e}}function u(){var e=void 0,t=void 0,n=this.context;function a(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=o.default.parseBuffer(e),i=(0,r.default)(n).create();return i.setData(t),i}function l(e,t){return e[t+3]>>>0|e[t+2]<<8>>>0|e[t+1]<<16>>>0|e[t]<<24>>>0}function u(e,t){return String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t])}return t={parse:a,findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new s.default(0,!1);for(var i=t instanceof ArrayBuffer?new Uint8Array(t):t,r=void 0,a=0;n<i.byteLength;){var o=l(i,n),d=u(i,n+4);if(0===o)break;n+o<=i.byteLength&&(e.indexOf(d)>=0?r=new s.default(n,!0,o):a=n+o),n+=o}return r||new s.default(a,!1)},getMediaTimescaleFromMoov:function(e){var t=a(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var t,n,i=a(e),r=i.getBoxes("moof"),o=i.getBoxes("mfhd"),s=void 0,l=void 0,u=void 0,d=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0;n=i.getBoxes("moof").length,t=o[o.length-1].sequence_number,l=0,c=[];var b=-1,T=-1;for(g=0;g<r.length;g++){var w=r[g],A=w.getChildBoxes("traf");for(p=0;p<A.length;p++){var S=A[p],x=S.getChildBox("tfhd"),M=S.getChildBox("tfdt");d=M.baseMediaDecodeTime;var R=S.getChildBoxes("trun"),C=S.getChildBoxes("subs");for(m=0;m<R.length;m++){var I=R[m];for(l=I.sample_count,_=(x.base_data_offset||0)+(I.data_offset||0),h=0;h<l;h++){s=void 0!==(f=I.samples[h]).sample_duration?f.sample_duration:x.default_sample_duration,u=void 0!==f.sample_size?f.sample_size:x.default_sample_size;var L={dts:d,cts:d+(void 0!==f.sample_composition_time_offset?f.sample_composition_time_offset:0),duration:s,offset:w.offset+_,size:u,subSizes:[u]};if(C)for(v=0;v<C.length;v++){var O=C[v];if(b<O.entry_count-1&&h>T&&(b++,T+=O.entries[b].sample_delta),h==T){L.subSizes=[];var D=O.entries[b];for(y=0;y<D.subsample_count;y++)L.subSizes.push(D.subsamples[y].subsample_size)}}c.push(L),_+=u,d+=s}}E=d-M.baseMediaDecodeTime}}return{sampleList:c,lastSequenceNumber:t,totalDuration:E,numSequences:n}},findInitRange:function(t){var n=null,i=a(t);if(!i)return n;var r=i.getBox("ftyp"),o=i.getBox("moov");return e.debug("Searching for initialization."),o&&o.isComplete&&(n=(r?r.offset:o.offset)+"-"+(o.offset+o.size-1),e.debug("Found the initialization.  Range: "+n)),n}},e=(0,i.default)(n).getInstance().getLogger(t),t}u.__dashjs_factory_name="BoxParser",t.default=a.default.getSingletonFactory(u)},function(e,t,n){function i(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===i(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e}
vendor: 4,736 bytes, line 5
5,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===i(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===i(e)},t.isError=function(e){return"[object Error]"===i(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(41).Buffer.isBuffer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(50)),r=c(n(163)),a=n(9),o=c(n(1)),s=c(n(8)),l=c(n(7)),u=c(n(80)),d=c(n(53));function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){e=e||{};var t,n,o=this.context,c=e.errHandler,h=e.dashMetrics,p=e.mediaPlayerModel,m=e.requestModifier,g=e.boxParser,v=e.useFetch||!1,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0;function w(e,t){var n=e.request,s=[],u=!0,f=!0,A=new Date,S=A,x=0,M=void 0;if(!m||!h||!c)throw new Error("config object is not correct or missing");var R=function(e){f=!1,n.requestStartDate=A,n.requestEndDate=new Date,n.firstByteDate=n.firstByteDate||A,n.checkExistenceOnly||(h.addHttpRequest(n,M.response?M.response.responseURL:null,M.response?M.response.status:null,M.response&&M.response.getAllResponseHeaders?M.response.getAllResponseHeaders():M.response?M.response.responseHeaders:[],e?s:null),n.type===a.HTTPRequest.MPD_TYPE&&h.addManifestUpdate(n.type,n.requestStartDate,n.requestEndDate))},C=function(){if(-1!==y.indexOf(M)&&(y.splice(y.indexOf(M),1),f))if(R(!1),t>0){t--;var i={config:e};E.push(i),i.timeout=setTimeout(function(){-1!==E.indexOf(i)&&(E.splice(E.indexOf(i),1),w(e,t))},p.getRetryIntervalsForType(n.type))}else c.error(new l.default(b[n.type],n.url+" is not available",{request:n,response:M.response})),e.error&&e.error(n,"error",M.response.statusText),e.complete&&e.complete(n,M.response.statusText)},I=void 0;I=v&&window.fetch&&"arraybuffer"===n.responseType&&n.type===a.HTTPRequest.MEDIA_SEGMENT_TYPE?(0,r.default)(o).create({requestModifier:m,boxParser:g}):(0,i.default)(o).create({requestModifier:m});var L=m.modifyRequestURL(n.url),O=function(e){try{var t=[],n=T.getQueryParameter(e);return n&&t.push(n),t}catch(e){return[]}}(n);L=d.default.addAditionalQueryParameterToUrl(L,O);var D=n.checkExistenceOnly?a.HTTPRequest.HEAD:a.HTTPRequest.GET,P=p.getXHRWithCredentialsForType(n.type);M={url:L,method:D,withCredentials:P,request:n,onload:function(){M.response.status>=200&&M.response.status<=299&&(R(!0),e.success&&e.success(M.response.response,M.response.statusText,M.response.responseURL),e.complete&&e.complete(n,M.response.statusText))},onend:C,onerror:C,progress:function(t){var i=new Date;u&&(u=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(n.firstByteDate=i)),t.lengthComputable&&(n.bytesLoaded=t.loaded,n.bytesTotal=t.total),t.noTrace||(s.push({s:S,d:t.time?t.time:i.getTime()-S.getTime(),b:[t.loaded?t.loaded-x:0]}),S=i,x=t.loaded),e.progress&&t&&e.progress(t)},onabort:function(){e.abort&&e.abort(n)},loader:I};var N=(new Date).getTime();if(isNaN(n.delayLoadingTime)||N>=n.delayLoadingTime)y.push(M),I.load(M);else{var k={httpRequest:M};_.push(k),k.delayTimeout=setTimeout(function(){if(-1!==_.indexOf(k)){_.splice(_.indexOf(k),1);try{A=new Date,S=A,y.push(k.httpRequest),I.load(k.httpRequest)}catch(e){k.httpRequest.onerror()}}},n.delayLoadingTime-N)}}return t={load:function(e){e.request?w(e,p.getRetryAttemptsForType(e.request.type)):e.error&&e.error(e.request,"error")},abort:function(){E.forEach(function(e){clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)}),E=[],_.forEach(function(e){return clearTimeout(e.delayTimeout)}),_=[],y.forEach(function(e){e.onloadend=e.onerror=e.onprogress=void 0,e.loader.abort(e)}),y=[]}},y=[],_=[],E=[],T=(0,u.default)(o).getInstance(),f(n={},a.HTTPRequest.MPD_TYPE,s.default.DOWNLOAD_ERROR_ID_MANIFEST_CODE),f(n,a.HTTPRequest.XLINK_EXPANSION_TYPE,s.default.DOWNLOAD_ERROR_ID_XLINK_CODE),f(n,a.HTTPRequest.INIT_SEGMENT_TYPE,s.default.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),f(n,a.HTTPRequest.MEDIA_SEGMENT_TYPE,s.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),f(n,a.HTTPRequest.INDEX_SEGMENT_TYPE,s.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),f(n,a.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,s.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),f(n,a.HTTPRequest.OTHER_TYPE,s.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),b=n,t}h.__dashjs_factory_name="HTTPLoader";var p=o.default.getClassFactory(h);t.default=p},function(e,t,n){"use strict";
vendor: 4,851 bytes, line 5
5Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(74);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.MEDIA_KEYERR_CODE=100,e.MEDIA_KEYERR_UNKNOWN_CODE=101,e.MEDIA_KEYERR_CLIENT_CODE=102,e.MEDIA_KEYERR_SERVICE_CODE=103,e.MEDIA_KEYERR_OUTPUT_CODE=104,e.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,e.MEDIA_KEYERR_DOMAIN_CODE=106,e.MEDIA_KEY_MESSAGE_ERROR_CODE=107,e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,e.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,e.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,e.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,e.KEY_SESSION_CREATED_ERROR_CODE=113,e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,e.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",e.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",e.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",e.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",e.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",e.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",e.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",e.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",e.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",e.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",e.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default));t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,i=!!t&&t.publicOnly;for(var r in e)!e.hasOwnProperty(r)||this[r]&&!n||i&&-1===e[r].indexOf("public_")||(this[r]=e[r])}}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(2)),r=l(n(5)),a=l(n(1)),o=l(n(17)),s=l(n(3));function l(e){return e&&e.__esModule?e:{default:e}}var u="loading",d="executed",c="failed";function f(e){e=e||{};var t=this.context,n=(0,i.default)(t).getInstance(),a=e.dashMetrics,l=e.fragmentLoader,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0;function v(e){var t;return!!e&&(t=!1,m.some(function(n){if(i=e,r=n,!isNaN(i.index)&&i.startTime===r.startTime&&i.adaptationIndex===r.adaptationIndex&&i.type===r.type||function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality}(e,n)||function(e,t){return e.action===o.default.ACTION_COMPLETE&&e.action===t.action}(e,n))return t=!0;var i,r}),t)}function y(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function _(e){m=m.filter(function(t){var n=y(t);return isNaN(t.startTime)||void 0!==e&&t.startTime>=e-n})}function E(e,t){t<=e+.5||(m=m.filter(function(n){var i=y(n);return isNaN(n.startTime)||n.startTime>=t-i||isNaN(n.duration)||n.startTime+n.duration<=e+i}))}function b(e,t,n){for(var i=e.length-1;i>=0;i--){var r=e[i],a=r.startTime,o=a+r.duration;if(n=isNaN(n)?y(r):n,!isNaN(a)&&!isNaN(o)&&t+n>=a&&t-n<o||isNaN(a)&&isNaN(t))return r}return null}function T(e,t){a.addSchedulingInfo(e,t),a.addRequestsQueue(e.mediaType,g,m)}
vendor: 7,418 bytes, line 5
5function w(e){e.sender===l&&(g.splice(g.indexOf(e.request),1),e.response&&!e.error&&m.push(e.request),T(e.request,e.error?c:d),n.trigger(r.default.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this}))}function A(e){e.sender===l&&n.trigger(r.default.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this})}function S(e){e.sender===l&&n.trigger(r.default.FRAGMENT_LOADING_ABANDONED,{streamProcessor:this.getStreamProcessor(),request:e.request,mediaType:e.mediaType})}function x(){m=[],g=[]}return f={setStreamProcessor:function(e){p=e},getStreamProcessor:function(){return p},getRequests:function(e){var t=e?e.state instanceof Array?e.state:[e.state]:[],n=[];return t.forEach(function(t){var i=function(e){var t=void 0;switch(e){case u:t=g;break;case d:t=m;break;default:t=[]}return t}(t);n=n.concat(function(e,t){if(t.hasOwnProperty("time"))return[b(e,t.time,t.threshold)];return e.filter(function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0})}(i,e))}),n},isFragmentLoaded:v,isFragmentLoadedOrPending:function(e){var t=!1,n=0,i=void 0;if(!(t=v(e)))for(n=0;n<g.length;n++)i=g[n],e.url===i.url&&e.startTime===i.startTime&&(t=!0);return t},removeExecutedRequestsBeforeTime:_,removeExecutedRequestsAfterTime:function(e){m=m.filter(function(t){return isNaN(t.startTime)||void 0!==e&&t.startTime<e})},syncExecutedRequestsWithBufferedRange:function(e,t){if(e&&0!==e.length){for(var n=0,i=0,r=e.length;i<r;i++)E(n,e.start(i)),n=e.end(i);t>0&&E(n,t)}else _()},abortRequests:function(){l.abort(),g=[]},executeRequest:function(e){switch(e.action){case o.default.ACTION_COMPLETE:m.push(e),T(e,d),h.debug("executeRequest trigger STREAM_COMPLETED"),n.trigger(r.default.STREAM_COMPLETED,{request:e,fragmentModel:this});break;case o.default.ACTION_DOWNLOAD:T(e,u),g.push(e),function(e){n.trigger(r.default.FRAGMENT_LOADING_STARTED,{sender:f,request:e}),l.load(e)}(e);break;default:h.warn("Unknown request action.")}},reset:function(){n.off(r.default.LOADING_COMPLETED,w,this),n.off(r.default.LOADING_DATA_PROGRESS,A,this),n.off(r.default.LOADING_ABANDONED,S,this),l&&l.reset(),x()},addExecutedRequest:function(e){m.push(e)}},h=(0,s.default)(t).getInstance().getLogger(f),x(),n.on(r.default.LOADING_COMPLETED,w,f),n.on(r.default.LOADING_DATA_PROGRESS,A,f),n.on(r.default.LOADING_ABANDONED,S,f),f}f.__dashjs_factory_name="FragmentModel";var h=a.default.getClassFactory(f);h.FRAGMENT_MODEL_LOADING=u,h.FRAGMENT_MODEL_EXECUTED=d,h.FRAGMENT_MODEL_CANCELED="canceled",h.FRAGMENT_MODEL_FAILED=c,a.default.updateClassFactory(f.__dashjs_factory_name,h),t.default=h},function(e,t,n){!function(e){e.ns_tt="http://www.w3.org/ns/ttml",e.ns_tts="http://www.w3.org/ns/ttml#styling",e.ns_ttp="http://www.w3.org/ns/ttml#parameter",e.ns_xml="http://www.w3.org/XML/1998/namespace",e.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",e.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",e.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",e.ns_ebutts="urn:ebu:tt:style"}(t)},function(e,t,n){!function(e){var t=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,n=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,r={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};e.parseColor=function(e){var a,o=null,s=r[e.toLowerCase()];return void 0!==s?o=s:null!==(a=t.exec(e))?o=[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),void 0!==a[4]?parseInt(a[4],16):255]:null!==(a=n.exec(e))?o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),255]:null!==(a=i.exec(e))&&(o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),parseInt(a[4])]),o};var a=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;e.parseLength=function(e){var t,n=null;return null!==(t=a.exec(e))&&(n={value:parseFloat(t[1]),unit:t[2]}),n},e.parseTextShadow=function(t){for(var n=t.match(/([^\(,\)]|\([^\)]+\))+/g),i=[],r=0;r<n.length;r++){var a=n[r].split(" ");if(1===a.length&&"none"===a[0])return"none";if(a.length>1&&a.length<5){var o=[null,null,null,null],s=e.parseLength(a.shift());if(null===s)return null;if(o[0]=s,null===(s=e.parseLength(a.shift())))return null;if(o[1]=s,0===a.length){i.push(o);continue}if(null!==(s=e.parseLength(a[0]))&&(o[2]=s,a.shift()),0===a.length){i.push(o);continue}var l=e.parseColor(a[0]);if(null===l)return null;o[3]=l,i.push(o)}}return i},e.parsePosition=function(t){var n=t.split(" "),i=function(e){return"center"===e||"left"===e||"top"===e||"bottom"===e||"right"===e};if(n.length>4)return null;for(var r=0;r<n.length;r++)if(!i(n[r])){var a=e.parseLength(n[r]);if(null===a)return null;n[r]=a}for(var o={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},s=0;s<n.length;){var l=n[s++];if(i(l)){var u={value:0,unit:"%"};2!==n.length&&s<n.length&&!i(n[s])&&(u=n[s++]),"right"===l?(o.h.edge=l,o.h.offset=u):"bottom"===l?(o.v.edge=l,o.v.offset=u):"left"===l?o.h.offset=u:"top"===l&&(o.v.offset=u)}else{if(1!==n.length&&2!==n.length)return null;1===s?o.h.offset=l:o.v.offset=l}}return o},e.ComputedLength=function(e,t){this.rw=e,this.rh=t},e.ComputedLength.prototype.toUsedLength=function(e,t){return e*this.rw+t*this.rh},e.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},e.toComputedLength=function(t,n,i,r,a,o){return"%"===n&&r?new e.ComputedLength(r.rw*t/100,r.rh*t/100):"em"===n&&i?new e.ComputedLength(i.rw*t,i.rh*t):"c"===n&&a?new e.ComputedLength(t*a.rw,t*a.rh):"px"===n&&o?new e.ComputedLength(t*o.rw,t*o.rh):"rh"===n?new e.ComputedLength(0,t/100):"rw"===n?new e.ComputedLength(t/100,0):null}}(t)},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,i,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,i)});case 4:return t.nextTick(function(){e.call(null,n,i,r)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick(function(){e.apply(null,a)})}}}:e.exports=t}).call(this,n(16))},function(e,t,n){var i=n(41),r=i.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=i:(a(i,t),t.Buffer=o),a(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,n){"use strict";
vendor: 4,557 bytes, line 5
5Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){return{modifyRequestURL:function(e){return e},modifyRequestHeader:function(e){return e}}}o.__dashjs_factory_name="RequestModifier",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._test=t,this._converter=n}return i(e,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(27);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default));t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=h(n(22)),r=h(n(249)),a=h(n(250)),o=h(n(251)),s=h(n(252)),l=h(n(253)),u=h(n(254)),d=h(n(255)),c=h(n(256)),f=h(n(19));function h(e){return e&&e.__esModule?e:{default:e}}function p(){var e=this.context,t=void 0,n=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;return t={initialize:function(){p=[];var t=void 0;t=(0,s.default)(e).getInstance({BASE64:m}),p.push(t),t=(0,o.default)(e).getInstance({BASE64:m}),p.push(t),t=(0,r.default)(e).getInstance({BASE64:m}),p.push(t),g=t,t=(0,a.default)(e).getInstance({BASE64:m,debug:n}),p.push(t),v=t},setProtectionData:function(e){for(var t=function(t){var n=null;return e&&(n=t in e?e[t]:null),n},n=0;n<p.length;n++){var i=p[n];i.hasOwnProperty("init")&&i.init(t(i.systemString))}},isClearKey:function(e){return e===g||e===v},initDataEquals:function(e,t){if(e.byteLength===t.byteLength){for(var n=new Uint8Array(e),i=new Uint8Array(t),r=0;r<n.length;r++)if(n[r]!==i[r])return!1;return!0}return!1},getKeySystems:function(){return p},setKeySystems:function(e){p=e},getKeySystemBySystemString:function(e){for(var t=0;t<p.length;t++)if(p[t].systemString===e)return p[t];return null},getSupportedKeySystemsFromContentProtection:function(e){var t=void 0,n=void 0,i=void 0,r=void 0,a=[];if(e)for(i=0;i<p.length;++i)for(n=p[i],r=0;r<e.length;++r)if((t=e[r]).schemeIdUri.toLowerCase()===n.schemeIdURI){var o=n.getInitData(t);a.push({ks:p[i],initData:o,cdmData:n.getCDMData(),sessionId:n.getSessionId(t)})}return a},getSupportedKeySystems:function(e,t){for(var n=[],r=i.default.parsePSSHList(e),a=void 0,o=void 0,s=void 0,l=0;l<p.length;++l)o=(a=p[l]).systemString,s=!t||o in t,a.uuid in r&&s&&n.push({ks:a,initData:r[a.uuid],cdmData:a.getCDMData(),sessionId:a.getSessionId()});return n},getLicenseServer:function(t,n,i){if("license-release"===i||"individualization-request"===i)return null;var r=null;return n&&n.hasOwnProperty("drmtoday")?r=(0,l.default)(e).getInstance({BASE64:m}):t.systemString===f.default.WIDEVINE_KEYSTEM_STRING?r=(0,d.default)(e).getInstance():t.systemString===f.default.PLAYREADY_KEYSTEM_STRING?r=(0,u.default)(e).getInstance():t.systemString===f.default.CLEARKEY_KEYSTEM_STRING&&(r=(0,c.default)(e).getInstance()),r},processClearKeyLicenseRequest:function(e,t,n){try{return e.getClearKeysFromProtectionData(t,n)}catch(e){return h.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(e){e&&(e.debug&&(n=e.debug,h=n.getLogger(t)),e.BASE64&&(m=e.BASE64))}}}p.__dashjs_factory_name="ProtectionKeyController",t.default=dashjs.FactoryMaker.getSingletonFactory(p)},function(e,t,n){"use strict";
vendor: 7,025 bytes, lines 5-7
5Object.defineProperty(t,"__esModule",{value:!0});var i=f(n(4)),r=f(n(1)),a=f(n(116)),o=f(n(39)),s=f(n(138)),l=f(n(139)),u=f(n(2)),d=f(n(5)),c=n(14);function f(e){return e&&e.__esModule?e:{default:e}}function h(){var e=this.context,t=void 0,n=void 0,r=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0,S=void 0,x=void 0;function M(e){void 0===x&&null!==e.fromStreamInfo&&(x=this.getCurrentTrackIdx())}function R(){void 0===x&&(x=this.getCurrentTrackIdx())}function C(){void 0!==x&&(this.setTextTrack(x),x=void 0)}function I(e){var t=this,n=e.tracks,i=e.index;n.some(function(e,n){if(e.lang===b)return t.setTextTrack(n),i=n,!0}),w||this.setTextTrack(-1),T=i,E.trigger(d.default.TEXT_TRACKS_ADDED,{enabled:L(),index:i,tracks:n})}function L(){var e=!0;return A&&!S&&(e=!1),e}function O(){A=!1}return t={setConfig:function(e){e&&(e.errHandler&&(r=e.errHandler),e.adapter&&(f=e.adapter),e.manifestModel&&(h=e.manifestModel),e.mediaController&&(p=e.mediaController),e.videoModel&&(m=e.videoModel),e.streamController&&(g=e.streamController),e.textTracks&&(v=e.textTracks),e.vttParser&&(y=e.vttParser),e.ttmlParser&&(_=e.ttmlParser),n.setConfig({errHandler:r,adapter:f,manifestModel:h,mediaController:p,videoModel:m,streamController:g,textTracks:v,vttParser:y,ttmlParser:_}))},getTextSourceBuffer:function(){return n},getAllTracksAreDisabled:function(){return A},addEmbeddedTrack:function(e){n.addEmbeddedTrack(e)},getTextDefaultLanguage:function(){return b},setTextDefaultLanguage:function(e){(0,c.checkParameterType)(e,"string"),b=e},setTextDefaultEnabled:function(e){(0,c.checkParameterType)(e,"boolean"),(w=e)||this.setTextTrack(-1)},getTextDefaultEnabled:function(){return w},enableText:function(e){(0,c.checkParameterType)(e,"boolean"),L()!==e&&(e&&this.setTextTrack(T),e||(T=this.getCurrentTrackIdx(),this.setTextTrack(-1)))},isTextEnabled:L,setTextTrack:function(e){var t=n.getConfig(),r=t.fragmentModel,a=t.fragmentedTracks,o=t.videoModel,s=void 0,l=void 0;A=-1===e;var u=v.getCurrentTrackIdx();if(u!==e){v.setModeForTrackIdx(u,i.default.TEXT_HIDDEN),v.setCurrentTrackIdx(e),v.setModeForTrackIdx(e,i.default.TEXT_SHOWING);var d=v.getCurrentTrackInfo();if(d&&d.isFragmented&&!d.isEmbedded)for(var c=0;c<a.length;c++){var f=a[c];if(d.lang===f.lang&&d.index===f.index&&(f.id?d.id===f.id:d.id===f.index))if(f!==p.getCurrentTrackFor(i.default.FRAGMENTED_TEXT,g.getActiveStreamInfo()))r.abortRequests(),r.removeExecutedRequestsBeforeTime(),n.remove(),v.deleteCuesFromTrackIdx(u),p.setTrack(f),n.setCurrentFragmentedTrackIdx(c);else if(-1===u){for(var h=g.getActiveStreamProcessors(),m=0;m<h.length;m++)if(h[m].getType()===i.default.FRAGMENTED_TEXT){l=h[m];break}l.setIndexHandlerTime(o.getTime()),l.getScheduleController().start()}}else if(d&&!d.isFragmented){for(var y=g.getActiveStreamProcessors(),_=0;_<y.length;_++)if(y[_].getType()===i.default.TEXT){s=(l=y[_]).getMediaInfoArr();break}if(l&&s)for(var E=0;E<s.length;E++)if(s[E].index===d.index&&s[E].lang===d.lang){l.selectMediaInfo(s[E]);break}}}},getCurrentTrackIdx:function(){return v.getCurrentTrackIdx()},enableForcedTextStreaming:function(e){(0,c.checkParameterType)(e,"boolean"),S=e},reset:function(){O(),n.resetEmbedded(),n.reset()}},b="",T=-1,w=!0,S=!1,v=(0,o.default)(e).getInstance(),y=(0,s.default)(e).getInstance(),_=(0,l.default)(e).getInstance(),n=(0,a.default)(e).getInstance(),E=(0,u.default)(e).getInstance(),v.initialize(),E.on(d.default.TEXT_TRACKS_QUEUE_INITIALIZED,I,t),E.on(d.default.PERIOD_SWITCH_STARTED,M,t),E.on(d.default.STREAM_COMPLETED,R,t),E.on(d.default.PERIOD_SWITCH_COMPLETED,C,t),O(),t}h.__dashjs_factory_name="TextController",t.default=r.default.getSingletonFactory(h)},function(e,t,n){
6/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
7var i={parseBuffer:function(e){return new r(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(a.prototype._boxProcessors[e]=t)},createFile:function(){return new r},createBox:function(e,t,n){var i=a.create(e);return t&&t.append(i,n),i},createFullBox:function(e,t,n){var r=i.createBox(e,t,n);return r.version=0,r.flags=0,r},Utils:{}};i.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var i=[],r=0;if("utf-8"===n)for(;r<e.byteLength;){var a=e.getUint8(r++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(r++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(r++))<<6,a|=63&e.getUint8(r++)):(a=(7&a)<<18,a|=(63&e.getUint8(r++))<<12,a|=(63&e.getUint8(r++))<<6,a|=63&e.getUint8(r++))),i.push(String.fromCharCode(a))}else for(;r<e.byteLength;)i.push(String.fromCharCode(e.getUint8(r++)));return i.join("")},i.Utils.utf8ToByteArray=function(e){var t,n;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],n=0;n<e.length;++n){var i=e.charCodeAt(n);i<128?t.push(i):i<2048?(t.push(192|i>>6),t.push(128|63&i)):i<65536?(t.push(224|i>>12),t.push(128|63&i>>6),t.push(128|63&i)):(t.push(240|i>>18),t.push(128|63&i>>12),t.push(128|63&i>>6),t.push(128|63&i))}return t},i.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var i,r=-1;if("number"==typeof n)r=n;else{if("string"==typeof n)i=n;else{if("object"!=typeof n||!n.type)return void e.boxes.push(t);i=n.type}for(var a=0;a<e.boxes.length;a++)if(i===e.boxes[a].type){r=a+1;break}}e.boxes.splice(r,0,t)}else e.boxes.push(t)},t.parseBuffer=i.parseBuffer,t.addBoxProcessor=i.addBoxProcessor,t.createFile=i.createFile,t.createBox=i.createBox,t.createFullBox=i.createFullBox,t.Utils=i.Utils,i.Cursor=function(e){this.offset=void 0===e?0:e};var r=function(e){this._cursor=new i.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};r.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},r.prototype.fetchAll=function(e,t){var n=[];return r._sweep.call(this,e,n,t),n},r.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=a.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},r._sweep=function(e,t,n){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&n)return;r._sweep.call(this.boxes[i],e,t,n)}},r.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var n=new Uint8Array(t);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return n.buffer},r.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)};var a=function(){this._cursor=new i.Cursor};a.parse=function(e){var t=new a;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},a.create=function(e){var t=new a;return t.type=e,t.boxes=[],t},a.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","
7stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],a.prototype._boxProcessors={},a.prototype._procField=function(e,t,n){this._parsing?this[e]=this._readField(t,n):this._writeField(t,n,this[e])},a.prototype._procFieldArray=function(e,t,n,i){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e][r]=this._readField(n,i);else for(r=0;r<this[e].length;r++)this._writeField(n,i,this[e][r])},a.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},a.prototype._procEntries=function(e,t,n){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e].push({}),n.call(this,this[e][i]);else for(i=0;i<t;i++)n.call(this,this[e][i])},a.prototype._procSubEntries=function(e,t,n,i){var r;if(this._parsing)for(e[t]=[],r=0;r<n;r++)e[t].push({}),i.call(this,e[t][r]);else for(r=0;r<n;r++)i.call(this,e[t][r])},a.prototype._procEntryField=function(e,t,n,i){this._parsing?e[t]=this._readField(n,i):this._writeField(n,i,e[t])},a.prototype._procSubBoxes=function(e,t){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push(a.parse(this));else for(n=0;n<t;n++)this._rawo?this[e][n].write():this.size+=this[e][n].getLength()},a.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();default:return-1}},a.prototype._readInt=function(e){var t=null,n=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(n);break;case 16:t=this._raw.getInt16(n);break;case 32:t=this._raw.getInt32(n);break;case 64:var i=this._raw.getInt32(n),r=this._raw.getInt32(n+4);t=i*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readUint=function(e){var t,n,i=null,r=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:i=this._raw.getUint8(r);break;case 16:i=this._raw.getUint16(r);break;case 24:i=((t=this._raw.getUint16(r))<<8)+(n=this._raw.getUint8(r+2));break;case 32:i=this._raw.getUint32(r);break;case 64:t=this._raw.getUint32(r),n=this._raw.getUint32(r+4),i=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,i},a.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var i=this._readUint(8);t+=String.fromCharCode(i)}return t},a.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},a.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},a.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},a.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?i.Utils.dataViewToString(t):t},a.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},a.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},a.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(a.parse(this))},a.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)},a.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},a.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},a.prototype._writeInt=function(e,t){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(n,t);break;case 16:this._rawo.setInt16(n,t);break;case 32:this._rawo.setInt32(n,t);break;case 64:var i=Math.floor(t/Math.pow(2,32)),r=t-i*Math.pow(2,32);this._rawo.setUint32(n,i),this._rawo.setUint32(n+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},a.prototype._writeUint=function(e,t){if(this._rawo){var n,i,r=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(r,t);break;case 16:this._rawo.setUint16(r,t);break;case 24:n=(16776960&t)>>8,i=255&t,this._rawo.setUint16(r,n),this._rawo.setUint8(r+2,i);break;case 32:this._rawo.setUint32(r,t);break;case 64:i=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(r,n),this._rawo.setUint32(r+4,i)}this._cursor.offset+=e>>3}else this.size+=e>>3},a.prototype._writeString=function(e,t){for(var n=0;n<e;n++)this._writeUint(8,t.charCodeAt(n))},a.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},a.prototype._writeTemplate=function(e,t){var n=Math.floor(t),i=(t-n)*Math.pow(2,e/2);this._writeUint(e/2,n),this._writeUint(e/2,i)},a.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,n=0;n<e.length;n++)this._rawo.setInt8(t+n,e[n]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},a.prototype._writeUTF8String=function(e){var t=i.Utils.utf8ToByteArray(e);if(this._rawo)for(var n=new DataView(this._rawo.buffer,this._cursor.offset,t.length),r=0;r<t.length;r++)n.setUint8(r,t[r
vendor: 11,826 bytes, line 7
7]);else this.size+=t.length},a.prototype._writeField=function(e,t,n){switch(e){case"uint":this._writeUint(t,n);break;case"int":this._writeInt(t,n);break;case"template":this._writeTemplate(t,n);break;case"string":-1==t?this._writeTerminatedString(n):this._writeString(t,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},a.prototype._boxProcessors.avc1=a.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},a.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},a.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)})},a.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},a.prototype._boxProcessors.free=a.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},a.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},a.prototype._boxProcessors.ftyp=a.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},a.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},a.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},a.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},a.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},a.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},a.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},a.prototype._boxProcessors.mp4a=a.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},a.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},a.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},a.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},a.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},a.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},a.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)})},a.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},a.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)})})},a.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},a.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)})})},a.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},a.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},a.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},a.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},a.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},a.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},a.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},a.prototype._boxProcessors["url "]=a.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},a.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},a.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},a.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},a.prototype._boxProcessors.vtte=function(){}},
7function(e,t,n){"use strict";
vendor: 5,876 bytes, line 7
7Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(4)),r=d(n(2)),a=d(n(5)),o=d(n(1)),s=d(n(3)),l=n(68),u=n(14);function d(e){return e&&e.__esModule?e:{default:e}}function c(){var e=this.context,t=(0,r.default)(e).getInstance(),n=void 0,o=void 0,d=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0;function S(e){var t=f[e].kind,n=void 0!==f[e].id?f[e].id:f[e].lang,i=f[e].lang,r=f[e].isTTML,a=f[e].isEmbedded,o=c.addTextTrack(t,n,i);return o.isEmbedded=a,o.isTTML=r,o}function x(e,t,n,i,r,a){var o=0,s=0;e/t>n/i?o=(s=t)/i*n:s=(o=e)/n*i;var l,u,d=0,c=0;return o/s>r?(c=s,d=s*r):(d=o,c=o/r),l=(e-d)/2,u=(t-c)/2,a?{x:l+.1*d,y:u+.1*c,w:.8*d,h:.8*c}:{x:l,y:u,w:d,h:c}}function M(e,n){var i=c.getClientWidth(),r=c.getClientHeight(),o=c.getVideoWidth(),s=c.getVideoHeight(),l=c.getVideoRelativeOffsetTop(),u=c.getVideoRelativeOffsetLeft();if(0!==o&&0!==s){var d=o/s,f=!1;e.isFromCEA608&&(d=3.5/3,f=!0);var h=x.call(this,i,r,o,s,d,f),p=h.w,E=h.h,w=h.x,S=h.y;if(p!=v||E!=y||w!=m||S!=g||n){if(m=w+u,g=S+l,v=p,y=E,_){var M=_.style;M&&(M.left=m+"px",M.top=g+"px",M.width=v+"px",M.height=y+"px",M.zIndex=b&&document[b]||T?A:null,t.trigger(a.default.CAPTION_CONTAINER_RESIZE,{}))}var R=e.activeCues;if(R)for(var C=R.length,I=0;I<C;++I){var L=R[I];L.scaleCue(L)}}}}function R(e){var t=v,n=y,i=void 0,r=void 0,a=void 0,o=void 0,s=void 0;if(e.cellResolution){var l=[t/e.cellResolution[0],n/e.cellResolution[1]];if(e.linePadding)for(i in e.linePadding)if(e.linePadding.hasOwnProperty(i)){r=(e.linePadding[i]*l[0]).toString();for(var u=document.getElementsByClassName("spanPadding"),d=0;d<u.length;d++)u[d].style.cssText=u[d].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+r),u[d].style.cssText=u[d].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+r)}if(e.fontSize){for(i in e.fontSize)if(e.fontSize.hasOwnProperty(i)){"%"===e.fontSize[i][0]?a=e.fontSize[i][1]/100:"c"===e.fontSize[i][0]&&(a=e.fontSize[i][1]),r=(a*l[1]).toString(),s="defaultFontSize"!==i?document.getElementsByClassName(i):document.getElementsByClassName("paragraph");for(var c=0;c<s.length;c++)s[c].style.cssText=s[c].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+r)}if(e.lineHeight)for(i in e.lineHeight)if(e.lineHeight.hasOwnProperty(i)){"%"===e.lineHeight[i][0]?o=e.lineHeight[i][1]/100:"c"===e.fontSize[i][0]&&(o=e.lineHeight[i][1]),r=(o*l[1]).toString(),s=document.getElementsByClassName(i);for(var f=0;f<s.length;f++)s[f].style.cssText=s[f].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+r)}}}if(e.isd){var h=document.getElementById(e.cueID);h&&_.removeChild(h),C(e)}}function C(e){if(_){var n=document.createElement("div");_.appendChild(n),w=(0,l.renderHTML)(e.isd,n,function(t){var n=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,i=/^#(.*)$/;if(n.test(t)){var r=n.exec(t),a=parseInt(r[4],10)-1;return"data:image/png;base64,"+btoa(e.images[a])}if(i.test(t)){var o=i.exec(t)[1];return"data:image/png;base64,"+e.embeddedImages[o]}return null},_.clientHeight,_.clientWidth,!1,function(e){o.info("renderCaption :",e)},w,!0),n.id=e.cueID,t.trigger(a.default.CAPTION_RENDERED,{captionDiv:n,currentTrackIdx:p})}}function I(e){return e>=0&&f[e]?c.getTextTrack(f[e].kind,f[e].id,f[e].lang,f[e].isTTML,f[e].isEmbedded):null}function L(e){if(e!==p){var t=I(p=e);O.call(this,t),E&&(clearInterval(E),E=null),t&&"html"===t.renderingType&&(M.call(this,t,!0),E=setInterval(M.bind(this,t),500))}}function O(e){F.call(this),e&&"html"===e.renderingType?N.call(this):k.call(this)}function D(e,t,n){return(isNaN(t)||e.startTime>=t)&&(isNaN(n)||e.endTime<=n)}function P(e,t,n){if(e.cues)for(var i=e.cues,r=i.length-1;r>=0;r--)D(i[r],t,n)&&e.removeCue(i[r])}function N(){var e=document.getElementById("native-cue-style");if(!e){(e=document.createElement("style")).id="native-cue-style",document.head.appendChild(e);var t=e.sheet,n=c.getElement();try{n&&(n.id?t.insertRule("#"+n.id+"::cue {background: transparent}",0):0!==n.classList.length?t.insertRule("."+n.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){o.info(""+e.message)}}}function k(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function F(){if(_)for(;_.firstChild;)_.removeChild(_.firstChild)}return n={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(d=window.VTTCue||window.TextTrackCue,f=[],h=[],p=-1,m=0,g=0,v=0,y=0,_=null,E=null,T=!1,A=2147483647,w=null,void 0!==document.fullscreenElement?b="fullscreenElement":void 0!==document.webkitIsFullScreen?b="webkitIsFullScreen":document.msFullscreenElement?b="msFullscreenElement":document.mozFullScreen&&(b="mozFullScreen"))},setDisplayCConTop:function(e){(0,u.checkParameterType)(e,"boolean"),T=e,_&&!document[b]&&(_.style.zIndex=e?A:null)},addTextTrack:function(e,n){if(f.length!==n){if(f.push(e),f.length===n){f.sort(function(e,t){return e.index-t.index}),_=c.getTTMLRenderingDiv();for(var r=-1,s=0;s<f.length;s++){var l=S.call(this,s);h.push(l),f[s].defaultTrack&&(l.default=!0,r=s);var u=I(s);u&&(u.mode=i.default.TEXT_SHOWING,_&&(f[s].isTTML||f[s].isEmbedded)?u.renderingType="html":u.renderingType="default"),this.addCaptions(s,0,f[s].captionData),t.trigger(a.default.TEXT_TRACK_ADDED)}if(L.call(this,r),r>=0){t.on(a.default.PLAYBACK_METADATA_LOADED,function e(){var n=I(r);n&&M.call(this,n,!0),t.off(a.default.PLAYBACK_METADATA_LOADED,e,this)},this);for(var d=0;d<f.length;d++){var m=I(d);m&&(m.mode=d===r?i.default.TEXT_SHOWING:i.default.TEXT_HIDDEN)}}t.trigger(a.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:p,tracks:f})}}else o.error("Trying to add too many tracks.")},addCaptions:function(e,n,r){var s=I(e),l=this;if(s&&Array.isArray(r)&&0!==r.length)for(var u=0;u<r.length;u++){var c=void 0,f=r[u];
vendor: 15,568 bytes, lines 7-14
7s.cellResolution=f.cellResolution,s.isFromCEA608=f.isFromCEA608,"html"===f.type&&_?((c=new d(f.start-n,f.end-n,"")).cueHTMLElement=f.cueHTMLElement,c.isd=f.isd,c.images=f.images,c.embeddedImages=f.embeddedImages,c.cueID=f.cueID,c.scaleCue=R.bind(l),c.cellResolution=f.cellResolution,c.lineHeight=f.lineHeight,c.linePadding=f.linePadding,c.fontSize=f.fontSize,_.style.left=m+"px",_.style.top=g+"px",_.style.width=v+"px",_.style.height=y+"px",c.onenter=function(){s.mode===i.default.TEXT_SHOWING&&(this.isd?(C(this),o.debug("Cue enter id:"+this.cueID)):(_.appendChild(this.cueHTMLElement),R.call(l,this),t.trigger(a.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:p})))},c.onexit=function(){if(_)for(var e=_.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&(o.debug("Cue exit id:"+e[t].id),_.removeChild(e[t]),--t)}):f.data&&(c=new d(f.start-n,f.end-n,f.data),f.styles&&(void 0!==f.styles.align&&"align"in c&&(c.align=f.styles.align),void 0!==f.styles.line&&"line"in c&&(c.line=f.styles.line),void 0!==f.styles.position&&"position"in c&&(c.position=f.styles.position),void 0!==f.styles.size&&"size"in c&&(c.size=f.styles.size)),c.onenter=function(){s.mode===i.default.TEXT_SHOWING&&t.trigger(a.default.CAPTION_RENDERED,{currentTrackIdx:p})});try{c?s.addCue(c):o.error("impossible to display subtitles.")}catch(e){throw P(s),s.addCue(c),e}}},getCurrentTrackIdx:function(){return p},setCurrentTrackIdx:L,getTrackIdxForId:function(e){for(var t=-1,n=0;n<f.length;n++)if(f[n].id===e){t=n;break}return t},getCurrentTrackInfo:function(){return f[p]},setModeForTrackIdx:function(e,t){var n=I(e);n&&n.mode!==t&&(n.mode=t)},deleteCuesFromTrackIdx:function(e,t,n){var i=I(e);i&&P(i,t,n)},deleteAllTextTracks:function(){for(var e=h?h.length:0,t=0;t<e;t++){var n=I(t);n&&(P.call(this,n),n.mode="disabled")}h=[],f=[],E&&(clearInterval(E),E=null),p=-1,F.call(this)},deleteTextTrack:function(e){c.removeChild(h[e]),h.splice(e,1)},setConfig:function(e){e&&e.videoModel&&(c=e.videoModel)}},o=(0,s.default)(e).getInstance().getLogger(n),n}c.__dashjs_factory_name="TextTracks",t.default=o.default.getSingletonFactory(c)},function(e,t,n){!function(e,t,n){function i(e,t,n,i,r,a,o,s){this.name=t,this.ns=e,this.qname=e+" "+t,this.inherit=r,this.animatable=a,this.initial=n,this.applies=i,this.parse=o,this.compute=s}for(var r in e.all=[new i(t.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,n.parseColor,null),new i(t.ns_tts,"color","white",["span"],!0,!0,n.parseColor,null),new i(t.ns_tts,"direction","ltr",["p","span"],!0,!0,function(e){return e},null),new i(t.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(e){return e},null),new i(t.ns_tts,"displayAlign","before",["region"],!1,!0,function(e){return e},null),new i(t.ns_tts,"extent","auto",["tt","region"],!1,!0,function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var i=n.parseLength(t[0]),r=n.parseLength(t[1]);return r&&i?{h:r,w:i}:null},function(e,t,i,r,a){var o,s;if("auto"===r)o=new n.ComputedLength(0,1);else if(null===(o=n.toComputedLength(r.h.value,r.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===r)s=new n.ComputedLength(1,0);else if(null===(s=n.toComputedLength(r.w.value,r.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}}),new i(t.ns_tts,"fontFamily","default",["span","p"],!0,!0,function(e){for(var t=e.split(","),n=[],i=0;i<t.length;i++)t[i]=t[i].trim(),"'"!==t[i].charAt(0)&&'"'!==t[i].charAt(0)&&"default"===t[i]?n.push("monospaceSerif"):n.push(t[i]);return n},null),new i(t.ns_tts,"shear","0%",["p"],!0,!0,n.parseLength,function(e,t,n,i){return"%"!==i.unit?null:Math.abs(i.value)>100?100*Math.sign(i.value):i.value}),new i(t.ns_tts,"fontSize","1c",["span","p"],!0,!0,n.parseLength,function(t,i,r,a,o){return n.toComputedLength(a.value,a.unit,null!==i?i.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,null!==i?i.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,t.cellLength.h,t.pxLength.h)}),new i(t.ns_tts,"fontStyle","normal",["span","p"],!0,!0,function(e){return e},null),new i(t.ns_tts,"fontWeight","normal",["span","p"],!0,!0,function(e){return e},null),new i(t.ns_tts,"lineHeight","normal",["p"],!0,!0,function(e){return"normal"===e?e:n.parseLength(e)},function(t,i,r,a,o){var s;if("normal"===a)s=a;else if(null===(s=n.toComputedLength(a.value,a.unit,r.styleAttrs[e.byName.fontSize.qname],r.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h)))return null;return s}),new i(t.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new i(t.ns_tts,"origin","auto",["region"],!1,!0,function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var i=n.parseLength(t[0]),r=n.parseLength(t[1]);return r&&i?{h:r,w:i}:null},function(e,t,i,r,a){var o,s;if("auto"===r)o=new n.ComputedLength(0,0);else if(null===(o=n.toComputedLength(r.h.value,r.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===r)s=new n.ComputedLength(0,0);else if(null===(s=n.toComputedLength(r.w.value,r.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}}),new i(t.ns_tts,"overflow","hidden",["region"],!1,!0,function(e){return e},null),new i(t.ns_tts,"padding","0px",["region"],!1,!0,function(e){var t=e.split(" ");if(t.length>4)return null;for(var i=[],r=0;r<t.length;r++){var a=n.parseLength(t[r]);if(!a)return null;i.push(a)}return i},function(t,i,r,a,o){var s;if(1===a.length)s=[a[0],a[0],a[0],a[0]];else if(2===a.length)s=[a[0],a[1],a[0],a[1]];else if(3===a.length)s=[a[0],a[1],a[2],a[1]];else{if(4!==a.length)return null;s=[a[0],a[1],a[2],a[3]]}var l=r.styleAttrs[e.byName.writingMode.qname];if("lrtb"===l||"lr"===l)s=[s[0],s[3],s[2],s[1]];else if("rltb"===l||"rl"===l)s=[s[0],s[1],s[2],s[3]];else if("tblr"===l)s=[s[3],s[0],s[1],s[2]];else{if("tbrl"!==l&&"tb"!==l)return null;s=[s[3],s[2],s[1],s[0]]}for(var u=[],d=0;d<s.length;d++)if(0===s[d].value)u[d]=new n.ComputedLength(0,0);else if(u[d]=n.toComputedLength(s[d].value,s[d].unit,r.styleAttrs[e.byName.fontSize.qname],0===d||2===d?r.styleAttrs[e.byName.extent.qname].h:r.styleAttrs[e.byName.extent.qname].w,0===d||2===d?t.cellLength.h:t.cellLength.w,0===d||2===d?t.pxLength.h:t.pxLength.w),null===u[d])return null;return u}),new i(t.ns_tts,"position","top left",["region"],!1,!0,function(e){return n.parsePosition(e)},function(t,i,r,a){var o,s;return null===(o=n.toComputedLength(a.v.offset.value,a.v.offset.unit,null,new n.ComputedLength(-r.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-r.styleAttrs[e.byName.extent.qname].h.rh),null,t.pxLength.h))?null:("bottom"===a.v.edge&&(o=new n.ComputedLength(-o.rw-r.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-o.rh-r.styleAttrs[e.byName.extent.qname].h.rh)),s=n.toComputedLength(a.h.offset.value,a.h.offset.unit,null,new n.ComputedLength(t.dimensions.w.rw-r.styleAttrs[e.byName.extent.qname].w.rw,-r.styleAttrs[e.byName.extent.qname].w.rh),null,t.pxLength.w),null===o?null:("right"===a.h.edge&&(s=new n.ComputedLength(t.dimensions.w.rw-s.rw-r.styleAttrs[e.byName.extent.qname].w.rw,-s.rh-r.styleAttrs[e.byName.extent.qname].w.rh)),{h:o,w:s}))}),new i(t.ns_tts,"ruby","none",["span"],!1,!0,function(e){return e},null),new i(t.ns_tts,"rubyAlign","center",["span"],!0,!0,function(e){return"center"!==e&&"spaceAround"!==e?null:e},null),new i(t.ns_tts,"rubyPosition","outside",["span"],!0,!0,function(e){return e},null),new i(t.ns_tts,"rubyReserve","none",["p"],!0,!0,function(e){var t=e.split(" "),i=[null,null];if(0===t.length||t.length>2)return null;if("none"!==t[0]&&"both"!==t[0]&&"after"!==t[0]&&"before"!==t[0]&&"outside"!==t[0])return null;if(i[0]=t[0],2===t.length&&"none"!==t[0]){var r=n.parseLength(t[1]);if(!r)return null;i[1]=r}return i},function(t,i,r,a,o){if("none"===a[0])return a;var s=null;return null===(s=null===a[1]?new n.ComputedLength(.5*r.styleAttrs[e.byName.fontSize.qname].rw,.5*r.styleAttrs[e.byName.fontSize.qname].rh):n.toComputedLength(a[1].value,a[1].unit,r.styleAttrs[e.byName.fontSize.qname],r.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h))?null:[a[0],s]}),new i(t.ns_tts,"showBackground","always",["region"],!1,!0,function(e){return e},null),new i(t.ns_tts,"textAlign","start",["p"],!0,!0,function(e){return e},function(e,t,n,i,r){return"left"===i?"start":"right"===i?"end":i}),new i(t.ns_tts,"textCombine","none",["span"],!0,!0,function(e){return"none"===e||"all"===e?e:null},null),new i(t.ns_tts,"textDecoration","none",["span"],!0,!0,function(e){return e.split(" ")},null),new i(t.ns_tts,"textEmphasis","none",["span"],!0,!0,function(e){for(var t=e.split(" "),i={style:null,symbol:null,color:null,position:null},r=0;r<t.length;r++)if("none"===t[r]||"auto"===t[r])i.style=t[r];else if("filled"===t[r]||"open"===t[r])i.style=t[r];else if("circle"===t[r]||"dot"===t[r]||"sesame"===t[r])i.symbol=t[r];else if("current"===t[r])i.color=t[r];else if("outside"===t[r]||"before"===t[r]||"after"===t[r])i.position=t[r];else if(i.color=n.parseColor(t[r]),null===i.color)return null;return null==i.style&&null==i.symbol?i.style="auto":(i.symbol=i.symbol||"circle",i.style=i.style||"filled"),i.position=i.position||"outside",i.color=i.color||"current",i},null),new i(t.ns_tts,"textOutline","none",["span"],!0,!0,function(e){if("none"===e)return e;var t={},i=e.split(" ");if(0===i.length||i.length>2)return null;var r=n.parseColor(i[0]);if(t.color=r,null!==r&&i.shift(),1!==i.length)return null;var a=n.parseLength(i[0]);return a?(t.thickness=a,t):null},function(t,i,r,a,o){if("none"===a)return a;var s={};return null===a.color?s.color=r.styleAttrs[e.byName.color.qname]:s.color=a.color,s.thickness=n.toComputedLength(a.thickness.value,a.thickness.unit,r.styleAttrs[e.byName.fontSize.qname],r.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h),null===s.thickness?null:s}),new i(t.ns_tts,"textShadow","none",["span"],!0,!0,n.parseTextShadow,function(t,i,r,a){if("none"===a)return a;for(var o=[],s=0;s<a.length;s++){var l={};if(l.x_off=n.toComputedLength(a[s][0].value,a[s][0].unit,null,r.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.w),null===l.x_off)return null;if(l.y_off=n.toComputedLength(a[s][1].value,a[s][1].unit,null,r.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===l.y_off)return null;if(null===a[s][2])l.b_radius=0;else if(l.b_radius=n.toComputedLength(a[s][2].value,a[s][2].unit,null,r.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===l.b_radius)return null;null===a[s][3]?l.color=r.styleAttrs[e.byName.color.qname]:l.color=a[s][3],o.push(l)}return o}),new i(t.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(e){return e},null),new i(t.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(e){return e},null),new i(t.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(e){return e},null),new i(t.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(e){return e},null),new i(t.ns_tts,"zIndex","auto",["region"],!1,!0,function(e){var t;return"auto"===e?t=e:(t=parseInt(e),isNaN(t)&&(t=null)),t},null),new i(t.ns_ebutts,"linePadding","0c",["p"],!0,!1,n.parseLength,function(e,t,i,r,a){return n.toComputedLength(r.value,r.unit,null,null,e.cellLength.w,null)}),new i(t.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(e){return e},null),new i(t.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(e){return e},null),new i(t.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(e){return"true"===e},null),new i(t.ns_itts,"fillLineGap","false",["p"],!0,!0,function(e){return"true"===e},null)],e.byQName={},e.all)e.byQName[e.all[r].qname]=e.all[r];for(var a in e.byName={},e.all)e.byName[e.all[a].name]=e.all[a]}(t,"undefined"==typeof imscNames?n(29):imscNames,"undefined"==typeof imscUtils?n(30):imscUtils)},function(e,t,n){"use strict";(function(e){
8/*!
9 * The buffer module from node.js, for the browser.
10 *
11 * @author   Feross Aboukhadijeh <http://feross.org>
12 * @license  MIT
13 */
14var i=n(124),r=n(125),a=n(69);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return u(this,e,t,n)}function u(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,i):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(t,n);e=s(e,i);var r=e.write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?s(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t){if(d(t),e=s(e,t<0?0:0|h(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function h(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return G(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function v(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}
vendor: 7,165 bytes, line 14
14if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(r){var d=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===d?0:a-d)){if(-1===d&&(d=a),a-d+1===l)return d*o}else-1!==d&&(a-=a-d),d=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var c=!0,f=0;f<l;f++)if(u(e,a+f)!==u(t,f)){c=!1;break}if(c)return a}return-1}function _(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o<i;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function E(e,t,n,i){return H(G(t,e.length-n),e,n,i)}function b(e,t,n,i){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function T(e,t,n,i){return b(e,t,n,i)}function w(e,t,n,i){return H(V(t),e,n,i)}function A(e,t,n,i){return H(function(e,t){for(var n,i,r,a=[],o=0;o<e.length&&!((t-=2)<0);++o)i=(n=e.charCodeAt(o))>>8,r=n%256,a.push(r),a.push(i);return a}(t,e.length-n),e,n,i)}function S(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var a,o,s,l,u=e[r],d=null,c=u>239?4:u>223?3:u>191?2:1;if(r+c<=n)switch(c){case 1:u<128&&(d=u);break;case 2:128==(192&(a=e[r+1]))&&(l=(31&u)<<6|63&a)>127&&(d=l);break;case 3:a=e[r+1],o=e[r+2],128==(192&a)&&128==(192&o)&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:a=e[r+1],o=e[r+2],s=e[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(d=l)}null===d?(d=65533,c=1):d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|1023&d),i.push(d),r+=c}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=M));return n}(i)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,i){return d(t),t<=0?s(e,t):void 0!==n?"string"==typeof i?s(e,t).fill(n,i):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return c(null,e)},l.allocUnsafeSlow=function(e){return c(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,a=Math.min(n,i);r<a;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=l.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,r),r+=o.length}return i},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,i,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(i,r),d=e.slice(t,n),c=0;c<s;++c)if(u[c]!==d[c]){a=u[c],o=d[c];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},l.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function R(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}
vendor: 8,019 bytes, line 14
14function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function I(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",a=t;a<n;++a)r+=j(e[a]);return r}function L(e,t,n){for(var i=e.slice(t,n),r="",a=0;a<i.length;a+=2)r+=String.fromCharCode(i[a]+256*i[a+1]);return r}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,i,r,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function P(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-n,2);r<a;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function N(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-n,4);r<a;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function k(e,t,n,i,r,a){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,i,a){return a||k(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function B(e,t,n,i,a){return a||k(e,0,n,8),r.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var r=t-e;n=new l(r,void 0);for(var a=0;a<r;++a)n[a]=this[a+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=this[e],r=1,a=0;++a<t&&(r*=256);)i+=this[e+a]*r;return i},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},l.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=this[e],r=1,a=0;++a<t&&(r*=256);)i+=this[e+a]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var i=t,r=1,a=this[e+--i];i>0&&(r*=256);)a+=this[e+--i]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,a=0;for(this[t]=255&e;++a<n&&(r*=256);)this[t+a]=e/r&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);D(this,e,t,n,r-1,-r)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);D(this,e,t,n,r-1,-r)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,a=i-n;if(this===e&&n<t&&t<i)for(r=a-1;r>=0;--r)e[r+t]=this[r+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},l.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=l.isBuffer(e)?e:G(new l(e,i).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){var n;t=t||1/0;for(var i=e.length,r=null,a=[],o=0;o<i;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>
vendor: 5,478 bytes, line 14
14-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function V(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(12))},function(e,t,n){"use strict";var i,r="object"==typeof Reflect?Reflect:null,a=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,i){function r(n){e.removeListener(t,a),i(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}v(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,r,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,i){var r,a,o,s;if(u(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(r=d(e))>0&&o.length>r&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=f.bind(i);return r.listener=n,i.wrapFn=r,r}function p(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):g(r,r.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function v(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function r(a){i.once&&e.removeEventListener(t,r),n(a)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return d(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,r=this._events;if(void 0!==r)i=i&&void 0===r.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var u=l.length,d=g(l,u);for(n=0;n<u;++n)a(d[n],this,t)}return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,i,r,a,o;if(u(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit
vendor: 5,776 bytes, line 14
14("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,r=a;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,a=Object.keys(n);for(i=0;i<a.length;++i)"removeListener"!==(r=a[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){(t=e.exports=n(70)).Stream=t,t.Readable=t,t.Writable=n(44),t.Duplex=n(18),t.Transform=n(73),t.PassThrough=n(131)},function(e,t,n){"use strict";(function(t,i,r){var a=n(31);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=y;var s,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:a.nextTick;y.WritableState=v;var u=Object.create(n(24));u.inherits=n(20);var d={deprecate:n(130)},c=n(71),f=n(32).Buffer,h=(void 0!==r?r:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,m=n(72);function g(){}function v(e,t){s=s||n(18),e=e||{};var i=t instanceof s;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,u=e.writableHighWaterMark,d=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(u||0===u)?u:d,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(a.nextTick(r,i),a.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(r(i),e._writableState.errorEmitted=!0,e.emit("error",i),A(e,t))}(e,n,i,t,r);else{var o=T(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||b(e,n),i?l(E,e,n,o,r):E(e,n,o,r)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(e){if(s=s||n(18),!(p.call(y,this)||this instanceof s))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function _(e,t,n,i,r,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(r,t.onwrite):e._write(r,a,t.onwrite),t.sync=!1}function E(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),A(e,t)}function b(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,r=new Array(i),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)r[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;r.allBuffers=l,_(e,t,!0,t.length,r,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,d=n.encoding,c=n.callback;if(_(e,t,!1,t.objectMode?1:u.length,u,d,c),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),A(e,t)})}function A(e,t){var n=T(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(y,c),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:d.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof v)}}
vendor: 6,412 bytes, line 14
14)):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var i,r=this._writableState,o=!1,s=!r.objectMode&&(i=e,f.isBuffer(i)||i instanceof h);return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=g),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),a.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var r=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(i,o),r=!1),r}(this,r,e,n))&&(r.pendingcb++,o=function(e,t,n,i,r,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n));return t}(t,i,r);i!==o&&(n=!0,r="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:r,isBuf:n,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,s,i,r,a);return l}(this,r,s,e,t,n)),o},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||b(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(16),n(128).setImmediate,n(12))},function(e,t,n){"use strict";var i=n(32).Buffer,r=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=d,this.end=c,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var r=o(t[i]);if(r>=0)return r>0&&(e.lastNeed=r-1),r;if(--i<n||-2===r)return 0;if(r=o(t[i]),r>=0)return r>0&&(e.lastNeed=r-2),r;if(--i<n||-2===r)return 0;if(r=o(t[i]),r>=0)return r>0&&(2===r?r=0:e.lastNeed=r-3),r;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";
vendor: 4,622 bytes, line 14
14Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(4)),r=l(n(5)),a=l(n(2)),o=l(n(1)),s=l(n(3));function l(e){return e&&e.__esModule?e:{default:e}}var u="neverReplace",d="alwaysReplace",c="highestBitrate",f="widestRange",h=c;function p(){var e=this.context,t=(0,a.default)(e).getInstance(),n=void 0,o=void 0,l=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=[d,u],_=[c,f];function E(e,t){if(!e||!t)return[];var n=t.id;return l[n]&&l[n][e]?l[n][e].list:[]}function b(e,t){return!e||!t||t&&!l[t.id]?null:l[t.id][e].current}function T(e){if(e&&e.streamInfo){var n=e.type,i=e.streamInfo,a=i.id,o=b(n,i);if(l[a]&&l[a][n]&&!M(e,o)){l[a][n].current=e,l[a][n].current&&t.trigger(r.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:o,newMediaInfo:e,switchMode:g[n]});var s=function(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration},n=t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0;return n?t:null}(e);s&&l[a][n].storeLastSettings&&(s.roles&&(s.role=s.roles[0],delete s.roles),s.accessibility&&(s.accessibility=s.accessibility[0]),s.audioChannelConfiguration&&(s.audioChannelConfiguration=s.audioChannelConfiguration[0]),v.setSavedMediaSettings(n,s))}}}function w(e,t){e&&t&&(p[e]=t)}function A(e){return e?p[e]:null}function S(){return m||h}function x(e){return e===i.default.AUDIO||e===i.default.VIDEO||e===i.default.TEXT||e===i.default.FRAGMENTED_TEXT||e===i.default.IMAGE}function M(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.id===t.id,i=e.viewpoint===t.viewpoint,r=e.lang===t.lang,a=e.roles.toString()===t.roles.toString(),o=e.accessibility.toString()===t.accessibility.toString(),s=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString();return n&&i&&r&&a&&o&&s}function R(){l={},p={audio:null,video:null},g={audio:d,video:u}}function C(e,t){var n=!e.lang||t.lang.match(e.lang),i=!e.viewpoint||e.viewpoint===t.viewpoint,r=!e.role||!!t.roles.filter(function(t){return t===e.role})[0],a=!e.accessibility||!!t.accessibility.filter(function(t){return t===e.accessibility})[0],o=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter(function(t){return t===e.audioChannelConfiguration})[0];return n&&i&&r&&a&&o}function I(e){var t=S(),n=[],i=function(e){var t=0,n=[],i=void 0;return e.forEach(function(e){(i=Math.max.apply(Math,e.bitrateList.map(function(e){return e.bandwidth})))>t?(t=i,n=[e]):i===t&&n.push(e)}),n},r=function(e){var t=0,n=[],i=void 0;return e.forEach(function(e){(i=e.representationCount)>t?(t=i,n=[e]):i===t&&n.push(e)}),n};switch(t){case c:(n=i(e)).length>1&&(n=r(n));break;case f:(n=r(e)).length>1&&(n=i(e));break;default:o.warn("Track selection mode is not supported: "+t)}return n[0]}return n={checkInitialMediaSettingsForType:function(e,t){var n=A(e),r=E(e,t),a=[];e!==i.default.FRAGMENTED_TEXT?(n||w(e,n=v.getSavedMediaSettings(e)),r&&0!==r.length&&(n&&r.forEach(function(e){C(n,e)&&a.push(e)}),0===a.length?T(I(r)):a.length>1?T(I(a)):T(a[0]))):T(r[0])},addTrack:function(e){if(e){var t=e.type;if(x(t)){var n=e.streamInfo.id;l[n]||(l[n]={audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}});for(var i=l[n][t].list,r=0,a=i.length;r<a;++r)if(M(i[r],e))return;i.push(e);var o=A(t);o&&C(o,e)&&!b(t,e.streamInfo)&&T(e)}}},getTracksFor:E,getCurrentTrackFor:b,isCurrentTrack:function(e){if(!e)return!1;var t=e.type,n=e.streamInfo.id;return l[n]&&l[n][t]&&M(l[n][t].current,e)},setTrack:T,setInitialSettings:w,getInitialSettings:A,setSwitchMode:function(e,t){-1!==y.indexOf(t)?g[e]=t:o.warn("Track switch mode is not supported: "+t)},getSwitchMode:function(e){return g[e]},setSelectionModeForInitialTrack:function(e){-1!==_.indexOf(e)?m=e:o.warn("Track selection mode is not supported: "+e)},getSelectionModeForInitialTrack:S,isMultiTrackSupportedByType:x,isTracksEqual:M,setConfig:function(e){e&&e.domStorage&&(v=e.domStorage)},reset:R},o=(0,s.default)(e).getInstance().getLogger(n),R(),n}p.__dashjs_factory_name="MediaController";var m=o.default.getSingletonFactory(p);m.TRACK_SWITCH_MODE_NEVER_REPLACE=u,m.TRACK_SWITCH_MODE_ALWAYS_REPLACE=d,m.TRACK_SELECTION_MODE_HIGHEST_BITRATE=c,m.TRACK_SELECTION_MODE_WIDEST_RANGE=f,m.DEFAULT_INIT_TRACK_SELECTION_MODE=h,o.default.updateSingletonFactory(p.__dashjs_factory_name,m),t.default=m},function(e,t,n){"use strict";
vendor: 5,406 bytes, line 14
14Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){var e={};return{save:function(t){var n=t.streamId,i=t.representationId;e[n]=e[n]||{},e[n][i]=t},extract:function(t,n){return e&&e[t]&&e[t][n]?e[t][n]:null},reset:function(){e={}}}}o.__dashjs_factory_name="InitCache",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function e(){i(this,e),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};r.INITIAL_PLAYOUT_START_REASON="initial_playout",r.SEEK_START_REASON="seek",r.RESUME_FROM_PAUSE_START_REASON="resume",r.METRICS_COLLECTION_START_REASON="metrics_collection_start";var a=function e(){i(this,e),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};a.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",a.REBUFFERING_REASON="rebuffering",a.USER_REQUEST_STOP_REASON="user_request",a.END_OF_PERIOD_STOP_REASON="end_of_period",a.END_OF_CONTENT_STOP_REASON="end_of_content",a.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",a.FAILURE_STOP_REASON="failure",t.PlayList=r,t.PlayListTrace=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=(e=e||{}).requestModifier;return{load:function(e){var n=new Date,i=e.request,r=new XMLHttpRequest;r.open(e.method,e.url,!0),i.responseType&&(r.responseType=i.responseType),i.range&&r.setRequestHeader("Range","bytes="+i.range),i.requestStartDate||(i.requestStartDate=n),t&&(r=t.modifyRequestHeader(r)),r.withCredentials=e.withCredentials,r.onload=e.onload,r.onloadend=e.onend,r.onerror=e.onerror,r.onprogress=e.progress,r.onabort=e.onabort,r.send(),e.response=r},abort:function(e){var t=e.response;t.onloadend=t.onerror=t.onprogress=void 0,t.abort()}}}o.__dashjs_factory_name="XHRLoader";var s=a.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(27);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.AST_IN_FUTURE="astInFuture",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.SOURCE_INITIALIZED="sourceInitialized",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_SEEK_ASKED="playbackSeekAsked",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default));t.default=a},function(e,t,n){"use strict";
vendor: 6,200 bytes, line 14
14Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=u(n(1)),a=u(n(53)),o=u(n(3)),s=u(n(4)),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){var e,t,n={debug:{logLevel:o.default.LOG_LEVEL_WARNING},streaming:{metricsMaxListDepth:1e3,abandonLoadTimeout:1e4,liveDelayFragmentCount:4,liveDelay:null,scheduleWhilePaused:!0,fastSwitchEnabled:!1,bufferPruningInterval:10,bufferToKeep:20,bufferAheadToKeep:80,jumpGaps:!0,smallGapLimit:1.5,stableBufferTime:12,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,longFormContentDurationThreshold:600,wallclockTimeUpdateInterval:50,lowLatencyEnabled:!1,keepProtectionMediaKeys:!1,useManifestDateHeaderTimeSource:!0,useSuggestedPresentationDelay:!1,useAppendWindowEnd:!0,manifestUpdateRetryInterval:100,liveCatchUpMinDrift:.02,liveCatchUpMaxDrift:0,liveCatchUpPlaybackRate:.5,lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},retryIntervals:(e={},d(e,l.HTTPRequest.MPD_TYPE,500),d(e,l.HTTPRequest.XLINK_EXPANSION_TYPE,500),d(e,l.HTTPRequest.MEDIA_SEGMENT_TYPE,1e3),d(e,l.HTTPRequest.INIT_SEGMENT_TYPE,1e3),d(e,l.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),d(e,l.HTTPRequest.INDEX_SEGMENT_TYPE,1e3),d(e,l.HTTPRequest.OTHER_TYPE,1e3),e),retryAttempts:(t={},d(t,l.HTTPRequest.MPD_TYPE,3),d(t,l.HTTPRequest.XLINK_EXPANSION_TYPE,1),d(t,l.HTTPRequest.MEDIA_SEGMENT_TYPE,3),d(t,l.HTTPRequest.INIT_SEGMENT_TYPE,3),d(t,l.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),d(t,l.HTTPRequest.INDEX_SEGMENT_TYPE,3),d(t,l.HTTPRequest.OTHER_TYPE,3),t),abr:{movingAverageMethod:s.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:s.default.ABR_STRATEGY_DYNAMIC,bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useBufferOccupancyABR:!1,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0}},cmcd:{enabled:!1,sid:null,cid:null,did:null}}},r=a.default.clone(n);function u(e,t,n){for(var r in e)e.hasOwnProperty(r)&&t.hasOwnProperty(r)&&("object"===i(e[r])&&null!==e[r]?u(e[r],t[r],n.slice()+r+"."):t[r]=a.default.clone(e[r]))}return{get:function(){return r},update:function(e){"object"===(void 0===e?"undefined":i(e))&&u(e,r,"")},reset:function(){r=a.default.clone(n)}}}c.__dashjs_factory_name="Settings";var f=r.default.getSingletonFactory(c);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"mixin",value:function(t,n,r){var a=void 0,o={};if(t)for(var s in n)n.hasOwnProperty(s)&&(a=n[s],s in t&&(t[s]===a||s in o&&o[s]===a)||("object"===i(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],a,r):t[s]=r(a)));return t}},{key:"clone",value:function(t){if(!t||"object"!==(void 0===t?"undefined":i(t)))return t;var n=void 0;if(t instanceof Array){n=[];for(var r=0,a=t.length;r<a;++r)r in t&&n.push(e.clone(t[r]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=new URL(e);return t.forEach(function(e){e.key&&e.value&&n.searchParams.set(e.key,e.value)}),n.href}catch(t){return e}}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return t}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVersionString=function(){return i};var i="3.0.3"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,i,r,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDataTypes=["cenc"],t&&t.length&&(this.audioCapabilities=t),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=i,this.persistentState=r,this.sessionTypes=a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=t,this.key=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&"persistent"!==n&&"temporary"!==n)throw new Error("Invalid ClearKey key set type!  Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=n}return i(e,[{key:"toJWK",value:function(){var e=void 0,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var i={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(i)}
14this.type&&(n.type=this.type);var r=JSON.stringify(n),a=r.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=r.charCodeAt(e);return o}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initData=t,this.initDataType=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,i,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sessionToken=t,this.message=n,this.defaultURL=i,this.messageType=r||"license-request"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keySystem=t,this.ksConfiguration=n}},function(e,t,n){"use strict";(function(t){e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==t)return t}return e}()}).call(this,n(12))},function(e,t,n){var i,r,a;
15/*!
16 * jQuery Validation Plugin v1.22.1
17 *
18 * https://jqueryvalidation.org/
19 *
20 * Copyright (c) 2026 Jörn Zaefferer
21 * Released under the MIT license
22 */r=[n(6)],i=function(e){e.extend(e.fn,{validate:function(t){if(this.length){var n=e.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.on("click.validate",":submit",function(t){n.submitButton=t.currentTarget,e(this).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==e(this).attr("formnovalidate")&&(n.cancelSubmit=!0)}),this.on("submit.validate",function(t){function i(){var i,r;return n.submitButton&&(n.settings.submitHandler||n.formSubmitted)&&(i=e("<input type='hidden'/>").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)),!(n.settings.submitHandler&&!n.settings.debug)||(r=n.settings.submitHandler.call(n,n.currentForm,t),i&&i.remove(),void 0!==r&&r)}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,i()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):i():(n.focusInvalid(),!1)})),n)}t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var t,n,i;return e(this[0]).is("form")?t=this.validate().form():(i=[],t=!0,n=e(this[0].form).validate(),this.each(function(){(t=n.element(this)&&t)||(i=i.concat(n.errorList))}),n.errorList=i),t},rules:function(t,n){var i,r,a,o,s,l,u=this[0],d=void 0!==this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=u&&(!u.form&&d&&(u.form=this.closest("form")[0],u.name=this.attr("name")),null!=u.form)){if(t)switch(r=(i=e.data(u.form,"validator").settings).rules,a=e.validator.staticRules(u),t){case"add":e.extend(a,e.validator.normalizeRule(n)),delete a.messages,r[u.name]=a,n.messages&&(i.messages[u.name]=e.extend(i.messages[u.name],n.messages));break;case"remove":return n?(l={},e.each(n.split(/\s/),function(e,t){l[t]=a[t],delete a[t]}),l):(delete r[u.name],a)}return(o=e.validator.normalizeRules(e.extend({},e.validator.classRules(u),e.validator.attributeRules(u),e.validator.dataRules(u),e.validator.staticRules(u)),u)).required&&(s=o.required,delete o.required,o=e.extend({required:s},o)),o.remote&&(s=o.remote,delete o.remote,o=e.extend(o,{remote:s})),o}}});var t,n=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};e.extend(e.expr.pseudos||e.expr[":"],{blank:function(t){return!n(""+e(t).val())},filled:function(t){var i=e(t).val();return null!==i&&!!n(""+i)},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return 1===arguments.length?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(void 0===n||(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})})),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,ariaDescribedByCleanup:!1,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,customElements:[],onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.val
vendor: 21,103 bytes, line 22
22idClass),this.hideThese(this.errorsFor(e)))},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(t,n){var i=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===n.which&&""===this.elementValue(t)||-1!==e.inArray(n.keyCode,i)||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,i){"radio"===t.type?this.findByName(t.name).addClass(n).removeClass(i):e(t).addClass(n).removeClass(i)},unhighlight:function(t,n,i){"radio"===t.type?this.findByName(t.name).removeClass(n).addClass(i):e(t).removeClass(n).addClass(i)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}."),step:e.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var t,n=this.currentForm,i=this.groups={};function r(t){var i=void 0!==e(this).attr("contenteditable")&&"false"!==e(this).attr("contenteditable");if(!this.form&&i&&(this.form=e(this).closest("form")[0],this.name=e(this).attr("name")),n===this.form){var r=e.data(this.form,"validator"),a="on"+t.type.replace(/^validate/,""),o=r.settings;o[a]&&!e(this).is(o.ignore)&&o[a].call(r,this,t)}}e.each(this.settings.groups,function(t,n){"string"==typeof n&&(n=n.split(/\s/)),e.each(n,function(e,n){i[n]=t})}),t=this.settings.rules,e.each(t,function(n,i){t[n]=e.validator.normalizeRule(i)});var a=[":text","[type='password']","[type='file']","select","textarea","[type='number']","[type='search']","[type='tel']","[type='url']","[type='email']","[type='datetime']","[type='date']","[type='month']","[type='week']","[type='time']","[type='datetime-local']","[type='range']","[type='color']","[type='radio']","[type='checkbox']","[contenteditable]","[type='button']"],o=["select","option","[type='radio']","[type='checkbox']"];e(this.currentForm).on("focusin.validate focusout.validate keyup.validate",a.concat(this.settings.customElements).join(", "),r).on("click.validate",o.concat(this.settings.customElements).join(", "),r),this.settings.invalidHandler&&e(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){var n,i,r=this.clean(t),a=this.validationTargetFor(r),o=this,s=!0;return void 0===a?delete this.invalid[r.name]:(this.prepareElement(a),this.currentElements=e(a),(i=this.groups[a.name])&&e.each(this.groups,function(e,t){t===i&&e!==a.name&&(r=o.validationTargetFor(o.clean(o.findByName(e))))&&r.name in o.invalid&&(o.currentElements.pushStack(r),s=o.check(r)&&s)}),n=!1!==this.check(a),s=s&&n,this.invalid[a.name]=!n,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e(t).attr("aria-invalid",!n)),s},showErrors:function(t){if(t){var n=this;e.extend(this.errorMap,t),this.errorList=e.map(this.errorMap,function(e,t){return{message:e,element:n.findByName(t)[0]}}),this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(e){var t;if(this.settings.unhighlight)for(t=0;e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,""),this.findByName(e[t].name).removeClass(this.settings.validClass);else e.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,n=0;for(t in e)void 0!==e[t]&&null!==e[t]&&!1!==e[t]&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},addErrorAriaDescribedBy:function(t,n,i){i=void 0!==i&&i;var r,a,o,s=e(t).attr("aria-describedby");r=n.attr("id"),s?s.match(new RegExp("\\b"+this.escapeCssMeta(r)+"\\b"))||(s+=" "+r):s=r,e(t).attr("aria-describedby",s),i&&(o=this.groups[t.name])&&(a=this,e.each(a.groups,function(t,i){i===o&&a.addErrorAriaDescribedBy(e("[name='"+a.escapeCssMeta(t)+"']",a.currentForm),n,!1)}))},removeErrorAriaDescribedBy:function(t,n){var i=e(t).attr("aria-describedby").split(" "),r=n.attr("id"),a=i.indexOf(r);a>-1&&i.splice(a,1),i.length?e(t).attr("aria-describedby",i.join(" ")):e(t).removeAttr("aria-describedby")},hideThese:function(t){for(var n=0;t[n];n++){var i=e(t[n]),r=i.attr("id")?this.escapeCssMeta(i.attr("id")):void 0,a=r?this.elements().filter('[aria-describedby~="'+r+'"]'):[];this.settings.ariaDescribedByCleanup&&a.length&&this.removeErrorAriaDescribedBy(a,i),i.is(this.containers)||i.text(""),this.addWrapper(i).hide()}},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(e){}},findLastActive:function(){var t=this.lastActive;return t&&1===e.grep(this.errorList,function(e){return e.element.name===t.name}).length&&t},elements:function(){var t,n=this,i={},r=["input","select","textarea","[contenteditable]"],a=this.currentForm.getAttribute("id");return t=e(this.currentForm).find(r.concat(this.settings.customElements).join(", ")).not(":submit, :reset, :image, :disabled").not(this.settings.ignore),a&&(t=t.add(e(r.concat(this.settings.customElements).join(", ")).filter("[form='"+n.escapeCssMeta(a)+"']").not(":submit, :reset, :image, :disabled").not(this.settings.ignore))),t.filter(function(){var t=this.name||e(this).attr("name"),r=void 0!==e(this).attr("contenteditable")&&"false"!==e(this).attr("contenteditable");return!t&&n.settings.debug&&window.console&&console.error("%o has no name assigned",this),r&&(this.form=e(this).closest("form")[0],this.name=t),!(this.form!==n.currentForm||t in i||!n.objectLength(e(this).rules())||(i[t]=!0,0))})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return e(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([])},reset:function(){this.resetInternals(),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n,i,r=e(t),a=t.type,o=void 0!==r.attr("contenteditable")&&"false"!==r.attr("contenteditable");return"radio"===a||"checkbox"===a?this.findByName(t.name).filter(":checked").val():"number"===a&&void 0!==t.validity?t.validity.badInput?"NaN":r.val():(n=o?r.text():r.val(),"file"===a?"C:\\fakepath\\"===n.substr(0,12)?n.substr(12):(i=n.lastIndexOf("/"))>=0||(i=n.lastIndexOf("\\"))>=0?n.substr(i+1):n:"string"==typeof n?n.replace(/\r/g,""):n)},check:function(t){t=this.validationTargetFor(this.clean(t));var n,i,r,a,o=e(t).rules(),s=e.map(o,function(e,t){return t}).length,l=!1,u=this.elementValue(t);for(i in this.abortRequest(t),"function"==typeof o.normalizer?a=o.normalizer:"function"==typeof this.settings.normalizer&&(a=this.settings.normalizer),a&&(u=a.call(t,u),delete o.normalizer),o){r={method:i,parameters:o[i]};try{if("dependency-mismatch"===(n=e.validator.methods[i].call(this,u,t,r.parameters))&&1===s){l=!0;continue}if(l=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!n)return this.formatAndAdd(t,r),!1}catch(e){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+r.method+"' method.",e),e instanceof TypeError&&(e.message+=".  Exception occurred when checking element "+t.id+", check the '"+r.method+"' method."),e}}if(!l)return this.objectLength(o)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase())||e(t).data("msg")},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},defaultMessage:function(t,n){"string"==typeof n&&(n={method:n});var i=this.findDefined(this.customMessage(t.name,n.method),this.customDataMessage(t,n.method),!this.settings.ignoreTitle&&t.title||void 0,e.validator.messages[n.method],"<strong>Warning: No message defined for "+t.name+"</strong>"),r=/\$?\{(\d+)\}/g;return"function"==typeof i?i=i.call(this,n.parameters,t):r.test(i)&&(i=e.validator.format(i.replace(r,"{$1}"),n.parameters)),i},formatAndAdd:function(e,t){var n=this.defaultMessage(e,t);this.errorList.push({message:n,element:e,method:t.method}),this.errorMap[e.name]=n,this.submitted[e.name]=n},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t,n;for(e=0;this.errorList[e];e++)n=this.errorList[e],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var i,r=this.errorsFor(t),a=this.idOrName(t),o=e(t).attr("aria-describedby");r.length?(0!==r.closest("label[for='"+this.escapeCssMeta(a)+"']").length||void 0!==o&&-1!==o.split(" ").indexOf(r.attr("id"))||this.addErrorAriaDescribedBy(t,r,!0),r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),this.settings&&this.settings.escapeHtml?r.text(n||""):r.html(n||"")):(r=e("<"+this.settings.errorElement+">").attr("id",a+"-error").addClass(this.settings.errorClass),this.settings&&this.settings.escapeHtml?r.text(n||""):r.html(n||""),i=r,this.settings.wrapper&&(i=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(i):this.settings.errorPlacement?this.settings.errorPlacement.call(this,i,e(t)):i.insertAfter(t),r.is("label")?r.attr("for",a):0===r.parents("label[for='"+this.escapeCssMeta(a)+"']").length&&this.addErrorAriaDescribedBy(t,r,!0)),!n&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var n=this.escapeCssMeta(this.idOrName(t)),i=e(t).attr("aria-describedby"),r="label[for='"+n+"'], label[for='"+n+"'] *";return i&&(r=r+", #"+this.escapeCssMeta(i).replace(/\s+/g,", #")),r=r+", #"+n+"-error",this.errors().filter(r)},escapeCssMeta:function(e){return void 0===e?"":e.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),e(t).not(this.settings.ignore)[0]},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){var n=this.currentForm.getAttribute("id"),i="[name='"+this.escapeCssMeta(t)+"']",r=e(this.currentForm).find(i);return n&&(r=r.add(e(i).filter("[form='"+this.escapeCssMeta(n)+"']"))),r},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{boolean:function(e){return e},string:function(t,n){return!!e(t,n.form).length},function:function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},elementAjaxPort:function(e){return"validate"+e.name},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,e(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],e(t).removeClass(this.settings.pendingClass),n&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(e(this.currentForm).trigger("submit"),this.submitButton&&e("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},abortRequest:function(t){var n;this.pending[t.name]&&(n=this.elementAjaxPort(t),e.ajaxAbort(n),this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],e(t).removeClass(this.settings.pendingClass))},previousValue:function(t,n){return n="string"==typeof n&&n||"remote",e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:n})})},destroy:function(){this.resetForm(),e(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},i=e(t).attr("class");return i&&e.each(i.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},normalizeAttributeRule:function(e,t,n,i){/min|max|step/.test(n)&&(null===t||/number|range|text/.test(t))&&(i=Number(i),isNaN(i)&&(i=void 0)),i||0===i?e[n]=i:t===n&&"range"!==t&&(e["date"===t?"dateISO":n]=!0)},attributeRules:function(t){var n,i,r={},a=e(t),o=t.getAttribute("type");for(n in e.validator.methods)"required"===n?(""===(i=t.getAttribute(n))&&(i=!0),i=!!i):i=a.attr(n),this.normalizeAttributeRule(r,o,n,i);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(t){var n,i,r={},a=e(t),o=t.getAttribute("type");for(n in e.validator.methods)""===(i=a.data("rule"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase()))&&(i=!0),this.normalizeAttributeRule(r,o,n,i);return r},staticRules:function(t){var n={},i=e.data(t.form,"validator");return i.settings.rules&&(n=e.validator.normalizeRule(i.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(i,r){if(!1!==r){if(r.param||r.depends){var a=!0;switch(typeof r.depends){case"string":a=!!e(r.depends,n.form).length;break;case"function":a=r.depends.call(n,n)}a?t[i]=void 0===r.param||r.param:(e.data(n.form,"validator").resetElements(e(n)),delete t[i])}}else delete t[i]}),e.each(t,function(e,i){t[e]="function"==typeof i&&"normalizer"!==e?i(n):i}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength","range"],function(){var e;t[this]&&(Array.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(e=t[this].replace(/[\[\]]/g,"").split(/[\s,]+/),t[this]=[Number(e[0]),Number(e[1])]))}),e.validator.autoCreateRanges&&(null!=t.min&&null!=t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),null!=t.minlength&&null!=t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var n={};e.each(t.split(/\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,i){e.validator.methods[t]=n,e.validator.messages[t]=void 0!==i?i:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,i){if(!this.depend(i,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var r=e(n).val();return r&&r.length>0}return this.checkable(n)?this.getLength(t,n)>0:null!=t&&t.length>0},email:function(e,t){return this.optional(t)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},url:function(e,t){return this.optional(t)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)},date:(t=!1,function(e,n){return t||(t=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(n)||!/Invalid|NaN/.test(new Date(e).toString())}),dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e,t){return this.optional(t)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},minlength:function(e,t,n){var i=Array.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||i>=n},maxlength:function(e,t,n){var i=Array.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||i<=n},rangelength:function(e,t,n){var i=Array.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||i>=n[0]&&i<=n[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},step:function(t,n,i){var r,a=e(n).attr("type"),o="Step attribute on input type "+a+" is not supported.",s=["text","number","range"],l=new RegExp("\\b"+a+"\\b"),u=function(e){var t=(""+e).match(/(?:\.(\d+))?$/);return t&&t[1]?t[1].length:0},d=function(e){return Math.round(e*Math.pow(10,r))},c=!0;if(a&&!l.test(s.join()))throw new Error(o);return r=u(i),(u(t)>r||d(t)%d(i)!==0)&&(c=!1),this.optional(n)||c},equalTo:function(t,n,i){var r=e(i);return this.settings.onfocusout&&r.not(".validate-equalTo-blur").length&&r.addClass("val
22idate-equalTo-blur").on("blur.validate-equalTo",function(){e(n).valid()}),t===r.val()},remote:function(t,n,i,r){if(this.optional(n))return"dependency-mismatch";r="string"==typeof r&&r||"remote";var a,o,s,l=this.previousValue(n,r);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[n.name][r],this.settings.messages[n.name][r]=l.message,i="string"==typeof i&&{url:i}||i,s=e.param(e.extend({data:t},i.data)),null!==l.valid&&l.old===s?l.valid:(l.old=s,l.valid=null,a=this,this.startRequest(n),(o={})[n.name]=t,e.ajax(e.extend(!0,{mode:"abort",port:this.elementAjaxPort(n),dataType:"json",data:o,context:a.currentForm,success:function(e){var i,o,s,u=!0===e||"true"===e;a.settings.messages[n.name][r]=l.originalMessage,u?(s=a.formSubmitted,a.toHide=a.errorsFor(n),a.formSubmitted=s,a.successList.push(n),a.invalid[n.name]=!1,a.showErrors()):(i={},o=e||a.defaultMessage(n,{method:r,parameters:t}),i[n.name]=l.message=o,a.invalid[n.name]=!0,a.showErrors(i)),l.valid=u,a.stopRequest(n,u)}},i)),"pending")}}});var i,r={};return e.ajaxPrefilter?e.ajaxPrefilter(function(t,n,i){var a=t.port;"abort"===t.mode&&(e.ajaxAbort(a),r[a]=i)}):(i=e.ajax,e.ajax=function(t){var n=("mode"in t?t:e.ajaxSettings).mode,a=("port"in t?t:e.ajaxSettings).port;return"abort"===n?(e.ajaxAbort(a),r[a]=i.apply(this,arguments),r[a]):i.apply(this,arguments)}),e.ajaxAbort=function(e){r[e]&&(r[e].abort(),delete r[e])},e},void 0===(a="function"==typeof i?i.apply(t,r):i)||(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=U(n(64)),r=U(n(4)),a=U(n(10)),o=U(n(111)),s=U(n(113)),l=U(n(46)),u=U(n(87)),d=U(n(188)),c=U(n(200)),f=U(n(201)),h=U(n(39)),p=U(n(33)),m=U(n(37)),g=U(n(202)),v=U(n(204)),y=U(n(205)),_=U(n(75)),E=U(n(206)),b=U(n(80)),T=U(n(207)),w=U(n(3)),A=U(n(8)),S=U(n(2)),x=U(n(5)),M=U(n(51)),R=U(n(1)),C=U(n(52)),I=n(54),L=U(n(208)),O=U(n(213)),D=U(n(225)),P=n(9),N=U(n(226)),k=U(n(38)),F=U(n(7)),B=n(14);function U(e){return e&&e.__esModule?e:{default:e}}function j(){var e="You must first call initialize() and set a source before calling this method",t="You must first call initialize() and set a valid source and view before calling this method",n="You must first call attachView() to set the video element before calling this method",U="You must first call attachSource() with a valid source before calling this method",j="MediaPlayer not initialized!",G=this.context,V=(0,S.default)(G).getInstance(),H=(0,C.default)(G).getInstance(),z=(0,w.default)(G).getInstance({settings:H}),W=void 0,q=void 0,Y=void 0,K=void 0,X=void 0,Q=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,ie=void 0,re=void 0,ae=void 0,oe=void 0,se=void 0,le=void 0,ue=void 0,de=void 0,ce=void 0,fe=void 0,he=void 0,pe=void 0,me=void 0,ge=void 0,ve=void 0;function ye(){return!!Y&&!!pe.getElement()}function _e(){return(0,I.getVersionString)()}function Ee(){if(!Z)throw t;return de.isPaused()}function be(e){var t=ce.getCurrentDVRInfo();if(!t)return 0;var n=de.getLiveDelay(),i=t.range.start+e;return i>t.range.end-n&&(i=t.range.end-n),i}function Te(e){if(!Z)throw t;var n=Me().currentTime;if(void 0!==e)n=ue.getTimeRelativeToStreamId(n,e);else if(de.getIsDynamic()){var i=ce.getCurrentDVRInfo();n=null===i?0:we()-(i.range.end-i.time)}return n}function we(){if(!Z)throw t;var e=Me().duration;if(de.getIsDynamic()){var n,i=ce.getCurrentDVRInfo();if(!i)return 0;e=(n=i.range.end-i.range.start)<i.manifestInfo.DVRWindowSize?n:i.manifestInfo.DVRWindowSize}return e}function Ae(e){(0,B.checkParameterType)(e,"boolean"),J=e}function Se(){oe.restoreDefaultUTCTimingSources()}function xe(){return ce}function Me(){if(!pe.getElement())throw n;return pe.getElement()}function Re(e){if(!X)throw j;pe.setElement(e),e&&(Pe(),function(){if(ie)return;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(G).create();ie=t.createMetricsReporting({debug:z,eventBus:V,mediaElement:Me(),adapter:ae,dashMetrics:ce,events:x.default,constants:r.default,metricsConstants:a.default})}}(),function(){if(re)return;var e=dashjs.MssHandler;"function"==typeof e&&(A.default.extend(e.errors),re=e(G).create({eventBus:V,mediaPlayerModel:oe,dashMetrics:ce,manifestModel:fe,playbackController:de,protectionController:ne,baseURLController:(0,u.default)(G).getInstance(),errHandler:se,events:x.default,constants:r.default,debug:z,initSegmentType:P.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:N.default,ISOBoxer:k.default,settings:H}))}(),ue&&ue.switchToVideoElement()),Z&&Oe(),ke()}function Ce(t){if(!Q)throw e;var n=ue.getActiveStreamInfo();return te.getTracksFor(t,n)}function Ie(e){if(!X)throw j;"string"==typeof e&&ge.initialize(e),Y=e,(Q||Z)&&Oe(),ye()&&ke()}function Le(){if(!Q)throw e;var t=ue.getActiveStreamInfo();return t?ue.getStreamById(t.id):null}function Oe(){Z=!1,Q=!1,ae.reset(),ue.reset(),de.reset(),$.reset(),te.reset(),me.reset(),ne&&(H.get().streaming.keepProtectionMediaKeys?ne.stop():(ne.reset(),ne=null,Pe())),he.reset()}function De(){return(0,d.default)(G).create({errHandler:se,dashMetrics:ce,mediaPlayerModel:oe,requestModifier:(0,p.default)(G).getInstance(),mssHandler:re,settings:H})}function Pe(){if(ne)return ne;var e=dashjs.Protection;if("function"==typeof e){var t=e(G).create();return x.default.extend(e.events),M.default.extend(e.events,{publicOnly:!0}),A.default.extend(e.errors),le||(le=(0,f.default)(G).getInstance()),ne=t.createProtectionSystem({debug:z,errHandler:se,videoModel:pe,capabilities:le,eventBus:V,events:x.default,BASE64:N.default,constants:r.default})}return null}function Ne(e){var t=ce.getCurrentDVRInfo();return t?e+(t.manifestInfo.availableFrom.getTime()/1e3+t.range.start):0}function ke(){var e;!Q&&Y&&(Q=!0,q.info("Streaming Initialized"),e=De(),ue||(ue=(0,s.default)(G).getInstance()),te.setConfig({domStorage:ve}),ue.setConfig({capabilities:le,manifestLoader:e,manifestModel:fe,mediaPlayerModel:oe,protectionController:ne,adapter:ae,dashMetrics:ce,errHandler:se,timelineConverter:ee,videoModel:pe,playbackController:de,abrController:$,mediaController:te,textController:me,settings:H}),de.setConfig({streamController:ue,dashMetrics:ce,mediaPlayerModel:oe,adapter:ae,videoModel:pe,timelineConverter:ee,uriFragmentModel:ge,settings:H}),$.setConfig({streamController:ue,domStorage:ve,mediaPlayerModel:oe,dashMetrics:ce,adapter:ae,videoModel:pe,settings:H}),$.createAbrRulesCollection(),me.setConfig({errHandler:se,manifestModel:fe,adapter:ae,mediaController:te,streamController:ue,videoModel:pe}),he.setConfig({abrController:$,dashMetrics:ce,playbackController:de}),ue.initialize(J,K),he.initialize(),"string"==typeof Y?ue.load(Y):ue.loadWithManifest(Y)),!Z&&ye()&&(Z=!0,q.info("Playback Initialized"))}return W={initialize:function(e,t,n){le||(le=(0,f.default)(G).getInstance()),se=(0,c.default)(G).getInstance(),le.supportsMediaSource()?X||(X=!0,ee=(0,D.default)(G).getInstance(),$||($=(0,_.default)(G).getInstance()),de||(de=(0,o.default)(G).getInstance()),te||(te=(0,l.default)(G).getInstance()),ae=(0,L.default)(G).getInstance(),fe=(0,v.default)(G).getInstance(),he=(0,b.default)(G).getInstance(),ce=(0,O.default)(G).getInstance({settings:H}),me=(0,m.default)(G).getInstance(),ve=(0,T.default)(G).getInstance({settings:H}),ae.setConfig({constants:r.default,cea608parser:i.default,errHandler:se,BASE64:N.default}),Se(),Ae(void 0===n||n),e&&Re(e),t&&Ie(t),q.info("[dash.js "+_e()+"] MediaPlayer has been initialized")):se.error(new F.default(A.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,A.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(e){e&&(e.capabilities&&(le=e.capabilities),e.streamController&&(ue=e.streamController),e.playbackController&&(de=e.playbackController),e.mediaPlayerModel&&(oe=e.mediaPlayerModel),e.abrController&&($=e.abrController),e.mediaController&&(te=e.mediaController),e.settings&&(H=e.settings))},on:function(e,t,n){V.on(e,t,n)},off:function(e,t,n){V.off(e,t,n)},extend:function(e,t,n){R.default.extend(e,t,n,G)},attachView:Re,attachSource:Ie,isReady:ye,preload:function(){if(pe.getElement()||Q)return!1;if(!Y)throw U;ke()},play:function(){if(!Z)throw t;(!J||Ee()&&Z)&&de.play()},isPaused:Ee,pause:function(){if(!Z)throw t;de.pause()},isSeeking:function(){if(!Z)throw t;return de.isSeeking()},isDynamic:function(){if(!Z)throw t;return de.getIsDynamic()},seek:function(e){if(!Z)throw t;if((0,B.checkParameterType)(e,"number"),isNaN(e))throw r.default.BAD_ARGUMENT_ERROR;var n=de.getIsDynamic()?be(e):e;de.seek(n)},setPlaybackRate:function(e){Me().playbackRate=e},getPlaybackRate:function(){return Me().playbackRate},setMute:function(e){(0,B.checkParameterType)(e,"boolean"),Me().muted=e},isMuted:function(){return Me().muted},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw r.default.BAD_ARGUMENT_ERROR;Me().volume=e},getVolume:function(){return Me().volume},time:Te,duration:we,timeAsUTC:function(){if(!Z)throw t;return Te()<0?NaN:Ne(Te())},durationAsUTC:function(){if(!Z)throw t;return Ne(we())},getActiveStream:Le,getDVRWindowSize:function(){var e=ce.getCurrentDVRInfo();return e?e.manifestInfo.DVRWindowSize:0},getDVRSeekOffset:be,convertToTimeCode:function(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),i=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(i<10?"0"+i.toString():i.toString())},formatUTC:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=new Date(1e3*e),a=r.toLocaleDateString(t),o=r.toLocaleTimeString(t,{hour12:n});return i?o+" "+a:o},getVersion:_e,getDebug:function(){return z},getBufferLength:function(e){var t=[r.default.VIDEO,r.default.AUDIO,r.default.FRAGMENTED_TEXT];if(e){if(-1!==t.indexOf(e)){var n=xe().getCurrentBufferLevel(e);return n||NaN}return q.warn("getBufferLength requested for invalid type"),NaN}var i=t.map(function(e){return Ce(e).length>0?xe().getCurrentBufferLevel(e):Number.MAX_VALUE}).reduce(function(e,t){return Math.min(e,t)});return i===Number.MAX_VALUE?NaN:i},getTTMLRenderingDiv:function(){return pe?pe.getTTMLRenderingDiv():null},getVideoElement:Me,getSource:function(){if(!Y)throw U;return Y},getCurrentLiveLatency:function(){if(!X)throw j;return Z?de.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(t){if(!Q)throw e;return $.getTopBitrateInfoFor(t)},setAutoPlay:Ae,getAutoPlay:function(){return J},getDashMetrics:xe,getQualityFor:function(t){if(!Q)throw e;if(t===r.default.IMAGE){var n=Le();if(!n)return-1;var i=n.getThumbnailController();return i?i.getCurrentTrackIndex():-1}return $.getQualityFor(t)},setQualityFor:function(t,n){if(!Q)throw e;if(t===r.default.IMAGE){var i=Le();if(!i)return;var a=i.getThumbnailController();a&&a.setTrackByIndex(n)}$.setPlaybackQuality(t,ue.getActiveStreamInfo(),n)},updatePortalSize:function(){$.setElementSize(),$.setWindowResizeEventCalled(!0)},setTextDefaultLanguage:function(e){void 0===me&&(me=(0,m.default)(G).getInstance()),me.setTextDefaultLanguage(e)},getTextDefaultLanguage:function(){return void 0===me&&(me=(0,m.default)(G).getInstance()),me.getTextDefaultLanguage()},setTextDefaultEnabled:function(e){void 0===me&&(me=(0,m.default)(G).getInstance()),me.setTextDefaultEnabled(e)},getTextDefaultEnabled:function(){return void 0===me&&(me=(0,m.default)(G).getInstance()),me.getTextDefaultEnabled()},enableText:function(e){void 0===me&&(me=(0,m.default)(G).getInstance()),me.enableText(e)},enableForcedTextStreaming:function(e){void 0===me&&(me=(0,m.default)(G).getInstance()),me.enableForcedTextStreaming(e)},isTextEnabled:function(){return void 0===me&&(me=(0,m.default)(G).getInstance()),me.isTextEnabled()},setTextTrack:function(e){if(!Z)throw t;void 0===me&&(me=(0,m.default)(G).getInstance()),me.setTextTrack(e)},getBitrateInfoListFor:function(t){if(!Q)throw e;var n=Le();return n?n.getBitrateListFor(t):[]},getStreamsFromManifest:function(t){if(!Q)throw e;return ae.getStreamsInfo(t)},getTracksFor:Ce,getTracksForTypeFromManifest:function(t,n,i){if(!Q)throw e;return(i=i||ae.getStreamsInfo(n,1)[0])?ae.getAllMediaInfoForType(i,t,n):[]},getCurrentTrackFor:function(t){if(!Q)throw e;var n=ue.getActiveStreamInfo();return te.getCurrentTrackFor(t,n)},setInitialMediaSettingsFor:function(e,t){if(!X)throw j;te.setInitialSettings(e,t)},getInitialMediaSettingsFor:function(e){if(!X)throw j;return te.getInitialSettings(e)},setCurrentTrack:function(t){if(!Q)throw e;te.setTrack(t)},getTrackSwitchModeFor:function(e){if(!X)throw j;return te.getSwitchMode(e)},setTrackSwitchModeFor:function(e,t){if(!X)throw j;te.setSwitchMode(e,t)},setSelectionModeForInitialTrack:function(e){if(!X)throw j;te.setSelectionModeForInitialTrack(e)},getSelectionModeForInitialTrack:function(){if(!X)throw j;return te.getSelectionModeForInitialTrack()},addABRCustomRule:function(e,t,n){oe.addABRCustomRule(e,t,n)},removeABRCustomRule:function(e){oe.removeABRCustomRule(e)},removeAllABRCustomRule:function(){oe.removeABRCustomRule()},getAverageThroughput:function(e){var t=$.getThroughputHistory();return t?t.getAverageThroughput(e):0},retrieveManifest:function(e,t){var n=De(),i=this;V.on(x.default.INTERNAL_MANIFEST_LOADED,function e(r){r.error?t(null,r.error):t(r.manifest),V.off(x.default.INTERNAL_MANIFEST_LOADED,e,i),n.reset()},i),ge.initialize(e),n.load(e)},addUTCTimingSource:function(e,t){oe.addUTCTimingSource(e,t)},removeUTCTimingSource:function(e,t){oe.removeUTCTimingSource(e,t)},clearDefaultUTCTimingSources:function(){oe.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:Se,setXHRWithCredentialsForType:function(e,t){oe.setXHRWithCredentialsForType(e,t)},getXHRWithCredentialsForType:function(e){return oe.getXHRWithCredentialsForType(e)},getProtectionController:function(){return Pe()},attachProtectionController:function(e){ne=e},setProtectionData:function(e){K=e,ue&&ue.setProtectionData(K)},displayCaptionsOnTop:function(e){var t=(0,h.default)(G).getInstance();t.setConfig({videoModel:pe}),t.initialize(),t.setDisplayCConTop(e)},attachTTMLRenderingDiv:function(e){if(!pe.getElement())throw n;pe.setTTMLRenderingDiv(e)},getCurrentTextTrackIndex:function(){var e=NaN;return me&&(e=me.getCurrentTrackIdx()),e},getThumbnail:function(e,t){if(e<0)return null;var n=de.getIsDynamic()?be(e):e,i=ue.getStreamForTime(n);if(null===i)return null;var r=i.getThumbnailController();if(!r)return null;var a=ue.getTimeRelativeToStreamId(n,i.getId());return r.get(a,t)},getDashAdapter:function(){return ae},getSettings:function(){return H.get()},updateSettings:function(e){H.update(e)},resetSettings:function(){H.reset()},reset:function(){Ie(null),Re(null),K=null,ne&&(ne.reset(),ne=null),ie&&(ie.reset(),ie=null),H.reset()}},q=z.getLogger(W),X=!1,Z=!1,Q=!1,J=!0,ne=null,K=null,ae=null,x.default.extend(M.default),oe=(0,y.default)(G).getInstance(),pe=(0,E.default)(G).getInstance(),ge=(0,g.default)(G).getInstance(),W}j.__dashjs_factory_name="MediaPlayer";var G=R.default.getClassFactory(j);G.events=M.default,G.errors=A.default,R.default.updateClassFactory(j.__dashjs_factory_name,G),t.default=G},function(e,t,n){"use strict";!function(e){var t={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,
vendor: 8,062 bytes, line 22
22185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},n=function(e){var n=e;return t.hasOwnProperty(e)&&(n=t[e]),String.fromCharCode(n)},i=15,r=32,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],d={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},c=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},f=function(e,t,n,i,r){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=i||"black",this.flash=r||!1};f.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var h=function(e,t,n,i,r,a){this.uchar=e||" ",this.penState=new f(t,n,i,r,a)};h.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var p=function(){this.chars=[];for(var e=0;e<r;e++)this.chars.push(new h);this.pos=0,this.currPenState=new f};p.prototype={equals:function(e){for(var t=!0,n=0;n<r;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(d.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>r&&(d.log("ERROR","Too large cursor position "+this.pos),this.pos=r)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){e>=144&&this.backSpace();var t=n(e);this.pos>=r?d.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<r;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,n=0;n<r;n++){var i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};var m=function(){this.rows=[];for(var e=0;e<i;e++)this.rows.push(new p);this.currRow=14,this.nrRollUpRows=null,this.reset()};m.prototype={reset:function(){for(var e=0;e<i;e++)this.rows[e].clear();this.currRow=14},equals:function(e){for(var t=!0,n=0;n<i;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<i;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<i;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(e){this.rows[this.currRow].insertChar(e)},setPen:function(e){this.rows[this.currRow].setPenStyles(e)},moveCursor:function(e){this.rows[this.currRow].moveCursor(e)},setCursor:function(e){d.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},setPAC:function(e){d.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var n=this.rows[this.currRow];if(null!==e.indent){var i=e.indent,r=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[r].penState.foreground}var a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},setBkgData:function(e){d.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null!==this.nrRollUpRows){d.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),d.log("INFO","Rolling up")}else d.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",r=-1,a=0;a<i;a++){var o=this.rows[a].getTextString();o&&(r=a+1,e?t.push("Row "+r+': "'+o+'"'):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var g=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new m,this.nonDisplayedMemory=new m,this.lastOutputScreen=new m,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};g.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,d.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";d.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(d.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){d.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){d.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){d.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){d.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){d.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}
vendor: 9,498 bytes, line 22
22,cc_RDC:function(){d.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){d.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){d.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){d.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){d.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){d.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(d.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,d.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){d.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}d.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=d.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var v=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new g(1,t),new g(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};v.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,i,r,a=!1;this.lastTime=e,d.setTime(e);for(var o=0;o<t.length;o+=2)if(i=127&t[o],r=127&t[o+1],i>=16&&i<=31&&i===this.lastCmdA&&r===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,d.log("DEBUG","Repeated command ("+c([i,r])+") is dropped");else if(0!==i||0!==r){if(d.log("DATA","["+c([t[o],t[o+1]])+"] -> ("+c([i,r])+")"),(n=this.parseCmd(i,r))||(n=this.parseMidrow(i,r)),n||(n=this.parsePAC(i,r)),n||(n=this.parseBackgroundAttributes(i,r)),!n)if(a=this.parseChars(i,r))if(this.currChNr&&this.currChNr>=0)this.channels[this.currChNr-1].insertChars(a);else d.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,d.log("WARNING","Couldn't parse cleaned data "+c([i,r])+" orig: "+c([t[o],t[o+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var n=null;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47)&&!((23===e||31===e)&&33<=t&&t<=35))return!1;n=20===e||21===e||23===e?1:2;var i=this.channels[n-1];return 20===e||21===e||28===e||29===e?32===t?i.cc_RCL():33===t?i.cc_BS():34===t?i.cc_AOF():35===t?i.cc_AON():36===t?i.cc_DER():37===t?i.cc_RU(2):38===t?i.cc_RU(3):39===t?i.cc_RU(4):40===t?i.cc_FON():41===t?i.cc_RDC():42===t?i.cc_TR():43===t?i.cc_RTD():44===t?i.cc_EDM():45===t?i.cc_CR():46===t?i.cc_ENM():47===t&&i.cc_EOC():i.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if((n=17===e?1:2)!==this.currChNr)return d.log("ERROR","Mismatch channel in midrow parsing"),!1;var i=this.channels[n-1];return i.insertChars([32]),i.cc_MIDROW(t),d.log("DEBUG","MIDROW ("+c([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var n,i=null;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127)&&!((16===e||24===e)&&64<=t&&t<=95))return!1;n=e<=23?1:2,i=64<=t&&t<=95?1===n?a[e]:s[e]:1===n?o[e]:l[e];var r=this.interpretPAC(i,t);return this.channels[n-1].setPAC(r),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=!(1&~n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),i},parseChars:function(e,t){var i=null,r=null,a=null;if(e>=25?(i=2,a=e-8):(i=1,a=e),17<=a&&a<=19){var o=t;o=17===a?t+80:18===a?t+112:t+144,d.log("INFO","Special char '"+n(o)+"' in channel "+i),r=[o],this.lastCmdA=e,this.lastCmdB=t}else 32<=e&&e<=127&&(r=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null);if(r){var s=c(r);d.log("DEBUG","Char codes =  "+s.join(","))}return r},parseBackgroundAttributes:function(e,t){var n,i,r;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(n={},16===e||24===e?(i=Math.floor((t-32)/2),n.background=u[i],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),r=e<24?1:2,this.channels[r-1].setBkgData(n),this.lastCmdA=e,this.lastCmdB=t,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}};e.logger=d,e.PenState=f,e.CaptionScreen=m,e.Cea608Parser=v,e.findCea608Nalus=function(e,t,n){for(var i=0,r=t,a=[],o=function(e,t,n,i){if(4!==e||t<8)return null;var r=n.getUint8(i),a=n.getUint16(i+1),o=n.getUint32(i+3),s=n.getUint8(i+7);return 181==r&&49==a&&1195456820==o&&3==s};r<t+n;){if(i=e.getUint32(r),6===(31&e.getUint8(r+4)))for(var s=r+5,l=-1;s<r+4+i-1;){l=0;for(var u=255;255===u;)l+=u=e.getUint8(s),s++;var d=0;for(u=255;255===u;)d+=u=e.getUint8(s),s++;o(l,d,e,s)&&a.push([s,d]),s+=d}r+=i+4}return a},e.extractCea608DataFromRange=function(e,t){var n=t[0],i=[[],[]];n+=8;var r=31&e.getUint8(n);n+=2;for(var a=0;a<r;a++){var o=e.getUint8(n),s=4&o,l=3&o;n++;var u=e.getUint8(n);n++;var d=e.getUint8(n);n++,s&&(127&u)+(127&d)!=0&&(0===l?(i[0].push(u),i[0].push(d)):1===l&&(i[1].push(u),i[1].push(d)))}return i}}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=_(n(4)),r=_(n(10)),a=_(n(28)),o=_(n(66)),s=_(n(140)),l=_(n(75)),u=_(n(46)),d=_(n(2)),c=_(n(5)),f=_(n(23)),h=_(n(1)),p=_(n(3)),m=_(n(47)),g=_(n(7)),v=_(n(8)),y=n(9);function _(e){return e&&e.__esModule?e:{default:e}}var E=.5,b=.5,T=.01,w="BufferController";function A(e){e=e||{};var t=this.context,n=(0,d.default)(t).getInstance(),h=e.dashMetrics,_=e.errHandler,A=e.streamController,S=e.mediaController,x=e.adapter,M=e.textController,R=e.abrController,C=e.playbackController,I=e.type,L=e.streamProcessor,O=e.settings,D=void 0,P=void 0,N=void 0,k=void 0,F=void 0,B=void 0,U=void 0,j=void 0,G=void 0,V=void 0,H=void 0,z=void 0,W=void 0,q=void 0,Y=void 0,K=void 0,X=void 0,Q=void 0,Z=void 0,J=void 0,$=void 0;function ee(e,n){if(!K||!e||!L)return null;if(U)try{"function"==typeof(V=n&&n[I]?(0,o.default)(t).create(U,e,ae.bind(this),O.get().streaming.useAppendWindowEnd,n[I]):(0,o.default)(t).create(U,e,ae.bind(this),O.get().streaming.useAppendWindowEnd)).getBuffer().initialize&&V.getBuffer().initialize(I,L)}catch(e){P.fatal("Caught error on create SourceBuffer: "+e),_.error(new g.default(v.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,v.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+I))}else V=(0,s.default)(t).create(ae.bind(this));return we(L.getRepresentationInfo(N).MSETimeOffset),V}function te(e){e.fragmentModel===L.getFragmentModel()&&(P.info("Init fragment finished loading saving to",I+"'s init cache"),K.save(e.chunk),P.debug("Append Init fragment",I," with representationId:",e.chunk.representationId," and quality:",e.chunk.quality,", data size:",e.chunk.bytes.byteLength),ie(e.chunk))}function ne(e){if(e.fragmentModel===L.getFragmentModel()){var n=e.chunk,i=n.bytes,r=n.quality,o=L.getRepresentationInfo(r),s=L.getRepresentationController(),l=s&&o?s.getRepresentationForQuality(o.quality):null,u=x.getEventsFor(o.mediaInfo),d=x.getEventsFor(o,l);if(u&&u.length>0||d&&d.length>0){var c=function(e,n,i,r){for(var a=Math.max(!n||isNaN(n.startTime)?0:n.startTime,0),o=[],s=[],l=i.concat(r),u=0,d=l.length;u<d;u++)o[l[u].schemeIdUri+"/"+l[u].value]=l[u];for(var c=(0,f.default)(t).getInstance().parse(e).getBoxes("emsg"),h=0,p=c.length;h<p;h++){var m=x.getEvent(c[h],o,a);m&&s.push(m)}return s}(i,L.getFragmentModel().getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,quality:r,index:n.index})[0],u,d);L.addInbandEvents(c)}if(J){$=n;var h=V&&V.getAllBufferRanges();h&&h.length>0&&C.getTimeToStreamEnd()>E&&(P.debug("Clearing buffer because track changed - "+(h.end(h.length-1)+.5)),Ee([{start:0,end:h.end(h.length-1)+.5,force:!0}]))}else ie(n)}}function ie(e){V.append(e),e.mediaInfo.type===i.default.VIDEO&&n.trigger(c.default.VIDEO_CHUNK_RECEIVED,{chunk:e})}function re(e){if(e&&e.length>0)for(var t=0,n=e.length;t<n;t++)P.debug("Buffered Range",e.start(t)," - ",e.end(t)," currentTime = ",C.getTime())}function ae(e){if(e.error){if(22===e.error.code&&(B=.8*Le(),P.warn("Quota exceeded, Critical Buffer: "+B),B>
vendor: 9,727 bytes, line 22
220)){var t=Math.max(.2*B,1),i=B-t,r={streaming:{bufferToKeep:parseFloat(t.toFixed(5)),bufferAheadToKeep:parseFloat(i.toFixed(5))}};O.update(r)}22!==e.error.code&&Oe()||(P.warn("Clearing playback buffer to overcome quota exceed situation"),n.trigger(c.default.QUOTA_EXCEEDED,{sender:D,criticalBufferLevel:B}),ue())}else{(W=e.chunk)&&!isNaN(W.index)&&(j=Math.max(W.index,j),ge());var a=V.getAllBufferRanges();if(W.segmentType===y.HTTPRequest.MEDIA_SEGMENT_TYPE)re(a),de();else if(J){var o=C.getTime();P.debug("AppendToBuffer seek target should be "+o),L.getScheduleController().setSeekTarget(o),L.setIndexHandlerTime(o)}var s={sender:D,quality:W.quality,startTime:W.start,index:W.index,bufferedRanges:a};W&&!W.endFragment?n.trigger(c.default.BYTES_APPENDED,s):W&&n.trigger(c.default.BYTES_APPENDED_END_FRAGMENT,s)}}function oe(e){N!==e.newQuality&&I===e.mediaType&&L.getStreamInfo().id===e.streamInfo.id&&(we(L.getRepresentationInfo(e.newQuality).MSETimeOffset),N=e.newQuality)}function se(){k&&(Q=!0,k=!1,G=Number.POSITIVE_INFINITY),I!==i.default.FRAGMENTED_TEXT?ue():de()}function le(){Ce(void 0)}function ue(){V.waitForUpdateEnd(function(){var e=function(){var e=[],t=V.getAllBufferRanges();if(!t||0===t.length)return e;var n=C.getTime(),i=t.end(t.length-1)+b,r=L.getFragmentModel().getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:T})[0];if(r){var o={start:0,end:r.startTime-E},s=L.getFragmentModel().getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:r.startTime-r.duration/2,threshold:T})[0];s&&s.startTime!=r.startTime&&(o.end=s.startTime),o.start<o.end&&o.end>t.start(0)&&e.push(o);var l={start:r.startTime+r.duration+E,end:i},u=L.getFragmentModel().getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:r.startTime+r.duration+E,threshold:T})[0];u&&u.startTime!==r.startTime&&(l.start=u.startTime+u.duration+E),l.start<l.end&&l.start<i&&e.push(l)}else P.debug("getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 -",i),e.push({start:0,end:i});return e}();e&&0!==e.length||de(),Ee(e)})}function de(){(!J||I===i.default.FRAGMENTED_TEXT&&M.isTextEnabled())&&(pe(),me())}function ce(){ve()}function fe(){void 0!==X&&Ce(void 0),ve()}function he(e,t){var n=V.getAllBufferRanges(),i=0,r=0,a=null,o=null,s=0,l=void 0,u=void 0,d=t||.15;if(null!=n){for(u=0,l=n.length;u<l;u++)if(i=n.start(u),r=n.end(u),null===a)s=Math.abs(i-e),(e>=i&&e<r||s<=d)&&(a=i,o=r);else{if(!((s=i-o)<=d))break;o=r}if(null!==a)return{start:a,end:o}}return null}function pe(){var e,t,i;C&&(e=function(){var e=C.getTime();if(X){var t=V.getAllBufferRanges();t&&t.length&&(e=Math.max(t.start(0),X))}return e}()||0,F=null===(i=he(e,t))?0:i.end-e,n.trigger(c.default.BUFFER_LEVEL_UPDATED,{sender:D,bufferLevel:F}),ve())}function me(){L&&A&&L.getStreamInfo()&&(h.addBufferState(I,z,L.getScheduleController().getBufferTarget()),h.addBufferLevel(I,new Date,1e3*F))}function ge(){j>=G-1&&!k&&void 0===V.discharge&&(k=!0,P.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),n.trigger(c.default.BUFFERING_COMPLETED,{sender:D,streamInfo:L.getStreamInfo()}))}function ve(){I!==i.default.AUDIO&&I!==i.default.VIDEO||(Q&&!k&&F>0&&C&&C.getTimeToStreamEnd()-F<E&&(Q=!1,k=!0,P.debug("checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),n.trigger(c.default.BUFFERING_COMPLETED,{sender:D,streamInfo:L.getStreamInfo()})),(!O.get().streaming.lowLatencyEnabled&&F<E||0===F)&&!k?ye(r.default.BUFFER_EMPTY):(k||F>=L.getStreamInfo().manifestInfo.minBufferTime)&&ye(r.default.BUFFER_LOADED))}function ye(e){z===e||e===r.default.BUFFER_EMPTY&&0===C.getTime()||I===i.default.FRAGMENTED_TEXT&&!M.isTextEnabled()||(z=e,me(),n.trigger(c.default.BUFFER_LEVEL_STATE_CHANGED,{sender:D,state:e,mediaType:I,streamInfo:L.getStreamInfo()}),n.trigger(e===r.default.BUFFER_LOADED?c.default.BUFFER_LOADED:c.default.BUFFER_EMPTY,{mediaType:I}),P.debug(e===r.default.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function _e(){V&&I!==i.default.FRAGMENTED_TEXT&&(k||Ee(function(){var e=[],t=V.getAllBufferRanges();if(!t||0===t.length)return e;var n=C.getTime(),i={start:Math.max(0,n-O.get().streaming.bufferToKeep),end:n+O.get().streaming.bufferAheadToKeep},r=L.getFragmentModel().getRequests({state:a.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:T})[0];if(r)i.start=Math.min(r.startTime,i.start),i.end=Math.max(r.startTime+r.duration,i.end);else if(0===n&&C.getIsDynamic())return[];if(t.start(0)<=i.start){for(var o={start:0,end:i.start},s=0;s<t.length&&t.end(s)<=i.start;s++)o.end=t.end(s);o.start<o.end&&e.push(o)}if(t.end(t.length-1)>=i.end){var l={start:i.end,end:t.end(t.length-1)+T};l.start<l.end&&e.push(l)}return e}()))}function Ee(e){e&&V&&0!==e.length&&(Z.push.apply(Z,e),Y||be())}function be(){if(0===Z.length||!V)return P.debug("Nothing to prune, halt pruning"),Z=[],void(Y=!1);var e=V.getBuffer();if(!e||!e.buffered||0===e.buffered.length)return P.debug("SourceBuffer is empty (or does not exist), halt pruning"),Z=[],void(Y=!1);var t=Z.shift();P.debug("Removing buffer from:",t.start,"to",t.end),Y=!0;var n=C.getTime();n<t.end&&(k=!1,j=0,J||(L.getScheduleController().setSeekTarget(n),L.setIndexHandlerTime(n))),V.remove(t.start,t.end,t.force)}function Te(e){V===e.buffer&&(P.debug("onRemoved buffer from:",e.from,"to",e.to),re(V.getAllBufferRanges()),0===Z.length&&(Y=!1),e.unintended&&(P.warn("Detected unintended removal from:",e.from,"to",e.to,"setting index handler time to",e.from),L.setIndexHandlerTime(e.from)),Y?be():(J?(J=!1,$&&ie($)):(P.debug("onRemoved : call updateBufferLevel"),pe(),me()),n.trigger(c.default.BUFFER_CLEARED,{sender:D,from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:Oe()})))}function we(e){V&&V.updateTimestampOffset&&V.updateTimestampOffset(e)}function Ae(e){e.sender.getType()!==L.getType()||e.sender.getStreamId()!==L.getStreamInfo().id||e.error||we(e.currentRepresentation.MSETimeOffset)}function Se(e){e.fragmentModel===L.getFragmentModel()&&(G=e.request.index,ge())}function xe(e){var t=V&&V.getAllBufferRanges();t&&e.newMediaInfo.type===I&&e.newMediaInfo.streamInfo.id===L.getStreamInfo().id&&(P.info("Track change asked"),S.getSwitchMode(I)===u.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&t&&t.length>0&&C.getTimeToStreamEnd()>E&&(k=!1,G=Number.POSITIVE_INFINITY))}function Me(){++q*(O.get().streaming.wallclockTimeUpdateInterval/1e3)>=O.get().streaming.bufferPruningInterval&&(q=0,_e())}function Re(){ve()}function Ce(e){X=e}function Ie(e,t){U=e,V&&t&&"function"==typeof V.discharge&&(H=V,ee(t))}function Le(){var e,t=V.getAllBufferRanges(),n=0,i=void 0;if(!t)return n;for(i=0,e=t.length;i<e;i++)n+=t.end(i)-t.start(i);return n}function Oe(){return Le()<B}function De(e,t){B=Number.POSITIVE_INFINITY,z=void 0,N=l.default.QUALITY_DEFAULT,G=Number.POSITIVE_INFINITY,j=0,W=null,k=!1,Y=!1,Q=!1,F=0,q=0,Z=[],V&&(e||V.abort(),V.reset(t),V=null),J=!1}return D={getBufferControllerType:function(){return w},initialize:function(e){Ie(e),N=R.getQualityFor(I),n.on(c.default.DATA_UPDATE_COMPLETED,Ae,this),n.on(c.default.INIT_FRAGMENT_LOADED,te,this),n.on(c.default.MEDIA_FRAGMENT_LOADED,ne,this),n.on(c.default.QUALITY_CHANGE_REQUESTED,oe,this),n.on(c.default.STREAM_COMPLETED,Se,this),n.on(c.default.PLAYBACK_PLAYING,fe,this),n.on(c.default.PLAYBACK_PROGRESS,de,this),n.on(c.default.PLAYBACK_TIME_UPDATED,de,this),n.on(c.default.PLAYBACK_RATE_CHANGED,Re,this),n.on(c.default.PLAYBACK_SEEKING,se,this),n.on(c.default.PLAYBACK_SEEKED,le,this),n.on(c.default.PLAYBACK_STALLED,ce,this),n.on(c.default.WALLCLOCK_TIME_UPDATED,Me,this),n.on(c.default.CURRENT_TRACK_CHANGED,xe,this,d.default.EVENT_PRIORITY_HIGH),n.on(c.default.SOURCEBUFFER_REMOVE_COMPLETED,Te,this)},createBuffer:ee,dischargePreBuffer:function(){if(V&&H&&"function"==typeof H.discharge){var e=H.getAllBufferRanges();if(e.length>0){for(var t="Beginning "+I+"PreBuffer discharge, adding buffer for:",n=0;n<e.length;n++)t+=" start: "+e.start(n)+", end: "+e.end(n)+";";P.debug(t)}else P.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");for(var i=H.discharge(),r=null,a=0;a<i.length;a++){var o=i[a],s=K.extract(o.streamId,o.representationId);s&&(r!==s&&(V.append(s),r=s),V.append(o))}H.reset(),H=null}},getType:function(){return I},getStreamProcessor:function(){return L},setSeekStartTime:Ce,getBuffer:function(){return V},setBuffer:function(e){V=e},getBufferLevel:function(){return F},getRangeAt:he,setMediaSource:Ie,getMediaSource:function(){return U},getIsBufferingCompleted:function(){return k},switchInitData:function(e,t,i){var r=K.extract(e,t);J=!0===i&&i,r?(P.info("Append Init fragment",I," with representationId:",r.representationId," and quality:",r.quality,", data size:",r.bytes.byteLength),ie(r)):n.trigger(c.default.INIT_REQUESTED,{sender:D})},getIsPruningInProgress:function(){return Y},reset:function(e,t){n.off(c.default.DATA_UPDATE_COMPLETED,Ae,this),n.off(c.default.QUALITY_CHANGE_REQUESTED,oe,this),n.off(c.default.INIT_FRAGMENT_LOADED,te,this),n.off(c.default.MEDIA_FRAGMENT_LOADED,ne,this),n.off(c.default.STREAM_COMPLETED,Se,this),n.off(c.default.CURRENT_TRACK_CHANGED,xe,this),n.off(c.default.PLAYBACK_PLAYING,fe,this),n.off(c.default.PLAYBACK_PROGRESS,de,this),n.off(c.default.PLAYBACK_TIME_UPDATED,de,this),n.off(c.default.PLAYBACK_RATE_CHANGED,Re,this),n.off(c.default.PLAYBACK_SEEKING,se,this),n.off(c.default.PLAYBACK_SEEKED,le,this),n.off(c.default.PLAYBACK_STALLED,ce,this),n.off(c.default.WALLCLOCK_TIME_UPDATED,Me,this),n.off(c.default.SOURCEBUFFER_REMOVE_COMPLETED,Te,this),De(e,t)}},P=(0,p.default)(t).getInstance().getLogger(D),K=(0,m.default)(t).getInstance(),De(),D}A.__dashjs_factory_name=w,t.default=h.default.getClassFactory(A)},function(e,t,n){"use strict";
vendor: 8,263 bytes, line 22
22Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(3)),r=d(n(7)),a=d(n(2)),o=d(n(5)),s=d(n(1)),l=d(n(37)),u=d(n(8));function d(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,s,d){var c=this.context,f=(0,a.default)(c).getInstance(),h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=[],_=[],E=n,b=!1!==s;function T(){try{return m.buffered}catch(e){return p.error("getAllBufferRanges exception: "+e.message),null}}function w(){var e=this;if(_.length>0){g=!0;var t=_[0];_.splice(0,1);var n=[],i=function(){var i=T();!function(e,t,n,i){t&&t.length>0&&t.length<n.length&&function(e,t){for(var n=0;n<e.length;n++){var i=Math.round(e.start(n)),r=Math.round(e.end(n));if(r===t.start||i===t.end||t.start>=i&&t.end<=r)return!0}return!1}(t,i)&&f.trigger(o.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:n.end(n.length-2),to:n.start(n.length-1),unintended:!0})}(e,n,i,t),_.length>0?w.call(this):(g=!1,E&&E({chunk:t}))};try{0===t.bytes.length?i.call(this):(n=T(),m.appendBuffer?m.appendBuffer(t.bytes):m.append(t.bytes,t),R(i.bind(this)))}catch(e){p.fatal('SourceBuffer append failed "'+e+'"'),_.length>0?w():g=!1,E&&E({chunk:t,error:new r.default(e.code,e.message)})}}}function A(){if(y.length>0){var e=y.shift();m.updating?R(e):(e(),A())}}function S(){m.updating||A()}function x(){m.updating||A()}function M(){p.error("SourceBufferSink error",t.type)}function R(e){y.push(e),m.updating||A()}return h={getAllBufferRanges:T,getBuffer:function(){return m},append:function(e){e?(_.push(e),g||R(w.bind(this))):E({chunk:e,error:new r.default(u.default.APPEND_ERROR_CODE,u.default.APPEND_ERROR_MESSAGE)})},remove:function(t,n,i){var a=this;R(function(){try{t>=0&&n>t&&(i||"ended"!==e.readyState)&&m.remove(t,n),R(function(){f.trigger(o.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:t,to:n,unintended:!1})})}catch(e){f.trigger(o.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:a,from:t,to:n,unintended:!1,error:new r.default(e.code,e.message)})}})},abort:function(){try{("open"===e.readyState||m.setTextTrack&&"ended"===e.readyState)&&m.abort()}catch(e){p.error('SourceBuffer append abort failed: "'+e+'"')}_=[]},reset:function(t){if(m){if("function"==typeof m.removeEventListener&&(m.removeEventListener("updateend",x,!1),m.removeEventListener("error",M,!1),m.removeEventListener("abort",M,!1)),clearInterval(v),m.appendWindowEnd=1/0,!t){try{m.getClassName&&"TextSourceBuffer"===m.getClassName()||e.removeSourceBuffer(m)}catch(e){p.error("Failed to remove source buffer from media source.")}m=null}g=!1}_=[],E=null},updateTimestampOffset:function(e){m.timestampOffset===e||isNaN(e)||R(function(){m.timestampOffset=e})},hasDiscontinuitiesAfter:function(e){try{var t=T();if(t&&t.length>1)for(var n=0,i=t.length;n<i;n++)if(n>0&&e<t.start(n)&&t.start(n)>t.end(n-1)+.1)return!0}catch(e){p.error("hasDiscontinuities exception: "+e.message)}return!1},waitForUpdateEnd:R},function(){p=(0,i.default)(c).getInstance().getLogger(h),g=!1;var n=t.codec;try{if(n.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");(m=d||e.addSourceBuffer(n)).changeType&&d&&(p.debug("Doing period transition with changeType"),m.changeType(n)),b&&m&&(m.appendWindowEnd=e.duration);if("function"==typeof m.addEventListener)try{m.addEventListener("updateend",x,!1),m.addEventListener("error",M,!1),m.addEventListener("abort",M,!1)}catch(e){v=setInterval(S,50)}else v=setInterval(S,50)}catch(e){if(!t.isText&&-1===n.indexOf('codecs="stpp')&&-1===n.indexOf('codecs="wvtt'))throw e;var r=(0,l.default)(c).getInstance();m=r.getTextSourceBuffer()}}(),h}c.__dashjs_factory_name="SourceBufferSink";var f=s.default.getClassFactory(c);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i},o=n(14);function s(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n=0;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n=this.customTimeRangeArray[e],i=this.customTimeRangeArray[t];return n.start<=i.start&&i.start<=n.end&&n.end<=i.end?(n.end=i.end,this.customTimeRangeArray.splice(t,1),!0):i.start<=n.start&&n.start<=i.end&&i.end<=n.end?(n.start=i.start,this.customTimeRangeArray.splice(t,1),!0):i.start<=n.start&&n.start<=i.end&&n.end<=i.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=i.start&&i.start<=n.end&&i.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return(0,o.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,o.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}s.__dashjs_factory_name="CustomTimeRanges",t.default=a.default.getClassFactory(s)},function(e,t,n){t.generateISD=n(121).generateISD,t.fromXML=n(122).fromXML,t.renderHTML=n(136).render},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t,i){var r=n(31);e.exports=_;var a,o=n(69);_.ReadableState=y;n(42).EventEmitter;var s=function(e,t){return e.listeners(t).length},l=n(71),u=n(32).Buffer,d=(void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c=Object.create(n(24));c.inherits=n(20);var f=n(262),h=void 0;h=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=n(127),g=n(72);c.inherits(_,l);var v=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var i=t instanceof(a=a||n(18));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(45).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function _(e){if(a=a||n(18),!(this instanceof _))return new _(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function E(e,t,n,i,r){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,A(e)}(e,o)):(r||(a=function(e,t){var n;i=t,u.isBuffer(i)||i instanceof d||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var i;return n}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?b(e,o,t,!1):x(e,o)):b(e,o,t,!1))
vendor: 4,253 bytes, line 22
22):i||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function b(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&A(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=g.destroy,_.prototype._undestroy=g.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=u.from(e,t),t=""),n=!0),E(this,e,t,!1,n)},_.prototype.unshift=function(e){return E(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return p||(p=n(45).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var T=8388608;function w(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r.nextTick(S,e):S(e))}function S(e){h("emit readable"),e.emit("readable"),I(e)}function x(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(M,e,t))}function M(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function R(e){h("readable nexttick read 0"),e.read(0)}function C(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var i;e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,i=1,r=n.data;e-=r.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t):function(e,t){var n=u.allocUnsafe(e),i=t.head,r=1;i.data.copy(n),e-=i.data.length;for(;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0===(e-=o)){o===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++r}return t.length-=r,n}(e,t);return i}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,r.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}_.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):A(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&O(this),null;var i,r=t.needReadable;return h("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",r=!0),t.ended||t.reading?h("reading or ended",r=!1):r&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=w(n,t))),null===(i=e>0?L(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==i&&this.emit
vendor: 1,598 bytes, line 22
22("data",i),i},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?d:_;function u(t,i){h("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,h("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",g),e.removeListener("unpipe",u),n.removeListener("end",d),n.removeListener("end",_),n.removeListener("data",m),f=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function d(){h("onend"),e.end()}a.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",u);var c=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",c);var f=!1;var p=!1;function m(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!f&&(h("false write response, pause",a.awaitDrain),a.awaitDrain++,p=!0),n.pause())}function g(t){h("onerror",t),_(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",y),_()}function y(){h("onfinish"),e.removeListener("close",v),_()}function _(){h("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,n){if("function"==typeof e.prependListener)return e.prepe
vendor: 5,495 bytes, line 22
22ndListener(t,n);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",v),e.once("finish",y),e.emit("pipe",n),a.flowing||(h("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<r;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=P(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&A(this):r.nextTick(R,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),this},_.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){(h("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r)||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))}),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var a=0;a<v.length;a++)e.on(v[a],this.emit.bind(this,v[a]));return this._read=function(t){h("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=L}).call(this,n(12),n(16))},function(e,t,n){e.exports=n(42).EventEmitter},function(e,t,n){"use strict";var i=n(31);function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(r,this,e)):i.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,i.nextTick(r,n,e)):i.nextTick(r,n,e):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";e.exports=o;var i=n(18),r=Object.create(n(24));function a(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);i.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){l(e,t,n)}):l(this,null,null)}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}r.inherits=n(20),r.inherits(o,i),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var n=this;i.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";
vendor: 8,109 bytes, line 22
22Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,i=!!t&&t.publicOnly;for(var r in e)!e.hasOwnProperty(r)||this[r]&&!n||i&&-1===e[r].indexOf("public_")||(this[r]=e[r])}}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=_(n(76)),r=_(n(4)),a=_(n(10)),o=_(n(77)),s=_(n(28)),l=_(n(2)),u=_(n(5)),d=_(n(1)),c=_(n(147)),f=_(n(13)),h=_(n(148)),p=_(n(149)),m=_(n(150)),g=_(n(3)),v=n(9),y=n(14);function _(e){return e&&e.__esModule?e:{default:e}}function E(){var e=this.context,t=(0,g.default)(e).getInstance(),n=(0,l.default)(e).getInstance(),d=void 0,_=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0,S=void 0,x=void 0,M=void 0,R=void 0,C=void 0,I=void 0,L=void 0,O=void 0,D=void 0,P=void 0,N=void 0,k=void 0,F=void 0,B=void 0,U=void 0,j=void 0;function G(){(E=(0,i.default)(e).create({dashMetrics:U,mediaPlayerModel:O,settings:j})).initialize()}function V(){T={},w={},S={},A={},N={},B={},void 0===M&&(M=!1),P=void 0,k=void 0,F=void 0,clearTimeout(x),x=null}function H(e){e.mediaType===r.default.VIDEO&&(P=e.oldQuality,k.push(P,L.getPlaybackQuality()))}function z(e){e.metric!==a.default.HTTP_REQUEST||!e.value||e.value.type!==v.HTTPRequest.MEDIA_SEGMENT_TYPE||e.mediaType!==r.default.AUDIO&&e.mediaType!==r.default.VIDEO||F.push(e.mediaType,e.value,j.get().streaming.abr.useDeadTimeLatency),e.metric!==a.default.BUFFER_LEVEL||e.mediaType!==r.default.AUDIO&&e.mediaType!==r.default.VIDEO||function(e,t){var n=j.get().streaming.abr.ABRStrategy;if(n===r.default.ABR_STRATEGY_BOLA)return void(B[e]=!0);if(n===r.default.ABR_STRATEGY_THROUGHPUT)return void(B[e]=!1);var i=O.getStableBufferTime(),a=i,o=.5*i,s=B[e],l=t>(s?o:a);B[e]=l,l!==s&&(l?_.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+t.toFixed(3)+")."):_.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+t.toFixed(3)+")."))}(e.mediaType,.001*e.value.level)}function W(e,t){var n=void 0;return T[t]=T[t]||{},T[t].hasOwnProperty(e)||(T[t][e]=0),n=function(e,t){var n=e;if(!A[t])return n;var i=Y(t);void 0!==i&&(n=Math.max(e,i));var r=q(t);void 0!==r&&(n=Math.min(n,r));return n}(T[t][e],e),n=function(e,t,n){var i=j.get().streaming.abr.maxRepresentationRatio[t];if(isNaN(i)||i>=1||i<0)return e;return Math.min(e,Math.round(n*i))}(n,e,T[t][e]),n=function(e,t){if(t!==r.default.VIDEO||!j.get().streaming.abr.limitBitrateByPortal||!A[t])return e;M||te();var n=I.getAdaptationForType(0,t).Representation,i=e;if(R>0&&C>0){for(;i>0&&n[i]&&R<n[i].width&&R-n[i-1].width<n[i].width-R;)i-=1;for(;i<n.length-1&&n[i].width===n[i+1].width;)i+=1}return i}(n,e),n}function q(e){var t=function(e){return j.get().streaming.abr.maxBitrate[e]}(e);return t>-1?Z(A[e].getMediaInfo(),t):void 0}function Y(e){var t=function(e){return j.get().streaming.abr.minBitrate[e]}(e);if(t>-1){var n=A[e].getMediaInfo(),i=J(n),r=Z(n,t);return i[r]&&r<i.length-1&&i[r].bitrate<1e3*t&&r++,r}}function K(e,t,n,i){var r=t.id,a=ee(e);(0,y.checkInteger)(n);var o=W(e,r);n!==a&&n>=0&&n<=o&&X(e,a,n,o,i)}function X(e,t,i,r,a){if(e&&A[e]){var o=A[e].getStreamInfo(),s=o?o.id:null;if(j.get().debug.logLevel===g.default.LOG_LEVEL_DEBUG){var l=U.getCurrentBufferLevel(e,!0);_.info("["+e+"] switch from "+t+" to "+i+"/"+r+" (buffer: "+l+") "+(a?JSON.stringify(a):"."))}!function(e,t,n){w[t]=w[t]||{},w[t][e]=n}(e,s,i),n.trigger(u.default.QUALITY_CHANGE_REQUESTED,{mediaType:e,streamInfo:o,oldQuality:t,newQuality:i,reason:a});var d=F.getAverageThroughput(e);isNaN(d)||D.setSavedBitrateSettings(e,d)}}function Q(e,t){S[e].state=t}function Z(e,t,n){var i=e&&e.type?A[e.type].getRepresentationInfo():null;if(j.get().streaming.abr.useDeadTimeLatency&&n&&i&&i.fragmentDuration){n/=1e3;var r=i.fragmentDuration;if(n>r)return 0;t*=1-n/r}for(var a=J(e),o=a.length-1;o>=0;o--){if(1e3*t>=a[o].bitrate)return o}return 0}function J(e){var t=[];if(!e||!e.bitrateList)return t;for(var n=e.bitrateList,i=e.type,r=void 0,a=0,s=n.length;a<s;a++)(r=new o.default).mediaType=i,r.qualityIndex=a,r.bitrate=n[a].bandwidth,r.width=n[a].width,r.height=n[a].height,r.scanType=n[a].scanType,t.push(r);return t}function $(e){return B[e]}function ee(e){if(e&&A[e]){var t=A[e].getStreamInfo(),n=t?t.id:null;if(n)return w[n]=w[n]||{},w[n].hasOwnProperty(e)||(w[n][e]=0),w[n][e]}return 0}function te(){if(L){var e=j.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;R=L.getClientWidth()*e,C=L.getClientHeight()*e}}function ne(t){var n=t.request.mediaType;if(j.get().streaming.abr.autoSwitchBitrate[n]){var i=A[n];if(!i)return;var r=(0,c.default)(e).create({abrController:d,streamProcessor:i,currentRequest:t.request,useBufferOccupancyABR:$(n)}),o=E.shouldAbandonFragment(r);if(o.quality>f.default.NO_CHANGE){var l=i.getFragmentModel();l.getRequests({state:s.default.FRAGMENT_MODEL_LOADING,index:t.request.index})[0]&&(l.abortRequests(),Q(n,a.default.ABANDON_LOAD),N[n].reset(),N[n].push({oldValue:ee(n),newValue:o.quality,confidence:1,reason:o.reason}),K(n,b.getActiveStreamInfo(),o.quality,o.reason),clearTimeout(x),x=setTimeout(function(){Q(n,a.default.ALLOW_LOAD),x=null},j.get().streaming.abandonLoadTimeout))}}}return d={isPlayingAtTopQuality:function(e){var t=e?e.id:null,n=ee(r.default.AUDIO),i=ee(r.default.VIDEO);return n===W(r.default.AUDIO,t)&&i===W(r.default.VIDEO,t)},updateTopQualityIndex:function(e){var t=e.type,n=e.streamInfo.id,i=e.representationCount-1;return function(e,t,n){T[t]=T[t]||{},T[t][e]=n}(t,n,i),i},getThroughputHistory:function(){return F},getBitrateList:J,getQualityForBitrate:Z,getTopBitrateInfoFor:function(e){if(e&&A&&A[e]){var t=A[e].getStreamInfo();if(t&&t.id){var n=W(e,t.id),i=J(A[e].getMediaInfo());return i[n]?i[n]:null}}return null},getMaxAllowedIndexFor:q,getMinAllowedIndexFor:Y,getInitialBitrateFor:function(e){if(function(){if(!D||!D.hasOwnProperty("getSavedBitrateSettings"))throw new Error(r.default.MISSING_CONFIG_ERROR)}(),e===r.default.TEXT||e===r.default.FRAGMENTED_TEXT)return NaN;var t=D.getSavedBitrateSettings(e),n=j.get().streaming.abr.initialBitrate[e],i=j.get().streaming.abr.initialRepresentationRatio[e];if(-1===n)if(i>-1){var a=I.getAdaptationForType(0,e).Representation;if(Array.isArray(a))n=a[Math.max(Math.round(a.length*i)-1,0)].bandwidth;else n=0}else n=isNaN(t)?e===r.default.VIDEO?1e3:100:t;return n},getQualityFor:ee,getAbandonmentStateFor:function(e){return S[e]?S[e].state:null},setPlaybackQuality:K,checkPlaybackQuality:function(t){if(t&&A&&A[t]){var n=A[t].getStreamInfo(),i=n?n.id:null,r=ee(t),o=(0,c.default)(e).create({abrController:d,streamProcessor:A[t],currentValue:r,switchHistory:N[t],droppedFramesHistory:k,useBufferOccupancyABR:$(t)});if(k){var s=L.getPlaybackQuality();s&&k.push(P,s)}if(j.get().streaming.abr.autoSwitchBitrate[t]){var l=Y(t),u=W(t,i),h=E.getMaxQuality(o),p=h.quality;if(void 0!==l&&(p>f.default.NO_CHANGE?p:r)<l&&(p=l),p>u&&(p=u),N[t].push({oldValue:r,newValue:p}),p>f.default.NO_CHANGE&&p!=r)(S[t].state===a.default.ALLOW_LOAD||p>r)&&X(t,r,p,u,h.reason);else if(j.get().debug.logLevel===g.default.LOG_LEVEL_DEBUG){var m=U.getCurrentBufferLevel(t,!0);_.debug("["+t+"] stay on "+r+"/"+u+" (buffer: "+m+")")}}}},getTopQualityIndexFor:W,setElementSize:te,setWindowResizeEventCalled:function(e){M=e},createAbrRulesCollection:G,registerStreamType:function(t,i){N[t]=N[t]||(0,h.default)(e).create(),A[t]=i,S[t]=S[t]||{},S[t].state=a.default.ALLOW_LOAD,B[t]=!1,n.on(u.default.LOADING_PROGRESS,ne,this),t==r.default.VIDEO&&(n.on(u.default.QUALITY_CHANGE_RENDERED,H,this),k=k||(0,p.default)(e).create(),te()),n.on(u.default.METRIC_ADDED,z,this),n.on(u.default.PERIOD_SWITCH_COMPLETED,G,this),F=F||
vendor: 2,328 bytes, line 22
22(0,m.default)(e).create({settings:j})},unRegisterStreamType:function(e){delete A[e]},setConfig:function(e){e&&(e.streamController&&(b=e.streamController),e.domStorage&&(D=e.domStorage),e.mediaPlayerModel&&(O=e.mediaPlayerModel),e.dashMetrics&&(U=e.dashMetrics),e.adapter&&(I=e.adapter),e.videoModel&&(L=e.videoModel),e.settings&&(j=e.settings))},reset:function(){V(),n.off(u.default.LOADING_PROGRESS,ne,this),n.off(u.default.QUALITY_CHANGE_RENDERED,H,this),n.off(u.default.METRIC_ADDED,z,this),n.off(u.default.PERIOD_SWITCH_COMPLETED,G,this),E&&E.reset()}},_=t.getLogger(d),V(),d}E.__dashjs_factory_name="AbrController";var b=d.default.getSingletonFactory(E);b.QUALITY_DEFAULT=0,d.default.updateSingletonFactory(E.__dashjs_factory_name,b),t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(141)),r=c(n(142)),a=c(n(143)),o=c(n(144)),s=c(n(145)),l=c(n(146)),u=c(n(1)),d=c(n(13));function c(e){return e&&e.__esModule?e:{default:e}}var f="qualitySwitchRules",h="abandonFragmentRules";function p(e){e=e||{};var t=this.context,n=e.mediaPlayerModel,u=e.dashMetrics,c=e.settings,p=void 0,m=void 0;function g(e){return e.filter(function(e){return e.quality>d.default.NO_CHANGE})}function v(e){var n,i={},r=void 0,a=void 0,o=void 0,s=void 0;if(0!==e.length){for(i[d.default.PRIORITY.STRONG]=d.default.NO_CHANGE,i[d.default.PRIORITY.WEAK]=d.default.NO_CHANGE,i[d.default.PRIORITY.DEFAULT]=d.default.NO_CHANGE,r=0,n=e.length;r<n;r+=1)(a=e[r]).quality!==d.default.NO_CHANGE&&(i[a.priority]=i[a.priority]>d.default.NO_CHANGE?Math.min(i[a.priority],a.quality):a.quality);return i[d.default.PRIORITY.WEAK]!==d.default.NO_CHANGE&&(o=i[d.default.PRIORITY.WEAK]),i[d.default.PRIORITY.DEFAULT]!==d.default.NO_CHANGE&&(o=i[d.default.PRIORITY.DEFAULT]),i[d.default.PRIORITY.STRONG]!==d.default.NO_CHANGE&&(o=i[d.default.PRIORITY.STRONG]),o!==d.default.NO_CHANGE&&(s=o),(0,d.default)(t).create(s)}}return{initialize:function(){p=[],m=[],c.get().streaming.abr.useDefaultABRRules&&(p.push((0,l.default)(t).create({dashMetrics:u,mediaPlayerModel:n,settings:c})),p.push((0,i.default)(t).create({dashMetrics:u})),p.push((0,r.default)(t).create({dashMetrics:u})),p.push((0,s.default)(t).create()),p.push((0,o.default)(t).create()),m.push((0,a.default)(t).create({dashMetrics:u,mediaPlayerModel:n,settings:c}
vendor: 6,236 bytes, line 22
22))),n.getABRCustomRules().forEach(function(e){e.type===f&&p.push(e.rule(t).create()),e.type===h&&m.push(e.rule(t).create())})},reset:function(){[p,m].forEach(function(e){e&&e.length&&e.forEach(function(e){return e.reset&&e.reset()})}),p=[],m=[]},getMaxQuality:function(e){return v(g(p.map(function(t){return t.getMaxIndex(e)})))||(0,d.default)(t).create()},shouldAbandonFragment:function(e){return v(g(m.map(function(t){return t.shouldAbandon(e)})))||(0,d.default)(t).create()}}}p.__dashjs_factory_name="ABRRulesCollection";var m=u.default.getClassFactory(p);m.QUALITY_SWITCH_RULES=f,m.ABANDON_FRAGMENT_RULES=h,u.default.updateSingletonFactory(p.__dashjs_factory_name,m),t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=h(n(11)),r=h(n(17)),a=n(9),o=h(n(5)),s=h(n(2)),l=h(n(1)),u=h(n(3)),d=h(n(15)),c=n(21),f=h(n(158));function h(e){return e&&e.__esModule?e:{default:e}}function p(e){e=e||{};var t=this.context,n=(0,s.default)(t).getInstance(),l=(0,d.default)(t).getInstance(),h=e.type,p=e.streamInfo,m=e.timelineConverter,g=e.dashMetrics,v=e.baseURLController,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0,S=void 0;function x(){return h}function M(){E=-1,b=null}function R(){M(),w=0,T=null,S=null}function C(e,t,n){var i=v.resolve(n.path),r=void 0,a=void 0;return i&&t!==i.url&&l.isRelative(t)?(r=i.url,a=i.serviceLocation,t&&(r=l.resolve(t,r))):r=t,!l.isRelative(r)&&(e.url=r,e.serviceLocation=a,!0)}function I(e){var t,i,r;e.sender.getType()===x()&&(t=e.representation,i=t.hasInitialization(),r=t.hasSegments(),i&&r?n.trigger(o.default.REPRESENTATION_UPDATE_COMPLETED,{sender:y,representation:t}):S.update(t,x(),i,r))}function L(e,t){if(null==t)return null;var n=new r.default,i=t.representation,o=i.adaptation.period.mpd.manifest.Period_asArray[i.adaptation.period.index].AdaptationSet_asArray[i.adaptation.index].Representation_asArray[i.index].bandwidth,s=t.media;return s=(0,c.replaceTokenForTemplate)(s,"Number",t.replacementNumber),s=(0,c.replaceTokenForTemplate)(s,"Time",t.replacementTime),s=(0,c.replaceTokenForTemplate)(s,"Bandwidth",o),s=(0,c.replaceIDForTemplate)(s,i.id),s=(0,c.unescapeDollarsInTemplate)(s),n.mediaType=x(),n.type=a.HTTPRequest.MEDIA_SEGMENT_TYPE,n.range=t.mediaRange,n.startTime=t.presentationStartTime,n.duration=t.duration,n.timescale=i.timescale,n.availabilityStartTime=t.availabilityStartTime,n.availabilityEndTime=t.availabilityEndTime,n.wallStartTime=t.wallStartTime,n.quality=i.index,n.index=t.availabilityIdx,n.mediaInfo=e,n.adaptationIndex=i.adaptation.index,n.representationId=i.id,C(n,s,i)?n:void 0}function O(e){var t=!1;if(!e)return t;if(A){if(b){var n=parseFloat((b.presentationStartTime-e.adaptation.period.start).toFixed(5));t=(b.duration>0?n+1.5*b.duration:n)>=e.adaptation.period.duration}}else E>=e.availableSegmentsNumber&&(t=!0);return t}function D(e){var t=e.representation;t.segments&&n.trigger(o.default.REPRESENTATION_UPDATE_COMPLETED,{sender:this,representation:t})}function P(e){if(!e.error&&x()===e.mediaType){var t,i=e.segments,r=e.representation,a=[],s=0,l=void 0,u=void 0,d=void 0;for(l=0,t=i?i.length:0;l<t;l++)u=i[l],(d=(0,c.getTimeBasedSegment)(m,A,r,u.startTime,u.duration,u.timescale,u.media,u.mediaRange,s))&&(a.push(d),d=null,s++);if(a.length>0)if(r.segmentAvailabilityRange={start:a[0].presentationStartTime,end:a[a.length-1].presentationStartTime},r.availableSegmentsNumber=a.length,r.segments=a,A)!function(e){m.setExpectedLiveEdge(e),g.updateManifestUpdateInfo({presentationStartTime:e})}(a[a.length-1].presentationStartTime-8);r.hasInitialization()&&n.trigger(o.default.REPRESENTATION_UPDATE_COMPLETED,{sender:this,representation:r})}}return y={initialize:function(e){A=e,S.initialize(e)},getType:x,getStreamInfo:function(){return p},getInitRequest:function(e,t){return t?function(e,t,n){var i=new r.default,o=t.adaptation.period,s=o.start;if(i.mediaType=n,i.type=a.HTTPRequest.INIT_SEGMENT_TYPE,i.range=t.range,i.availabilityStartTime=m.calcAvailabilityStartTimeFromPresentationTime(s,o.mpd,A),i.availabilityEndTime=m.calcAvailabilityEndTimeFromPresentationTime(s+o.duration,o.mpd,A),i.quality=t.index,i.mediaInfo=e,i.representationId=t.id,C(i,t.initialization,t))return i.url=(0,c.replaceTokenForTemplate)(i.url,"Bandwidth",t.bandwidth),i}(e,t,x()):null},getSegmentRequestForTime:function(e,t,n,a){var o=null;if(!t||!t.segmentInfoType)return o;var s=E,l=!!a&&a.keepIdx,u=!(!a||!a.ignoreIsFinished);T!==n&&(T=n,_.debug("Getting the request for time : "+n));var d=S.getSegmentByTime(t,n);return d?(E=d.availabilityIdx,b=d,_.debug("Index for time "+n+" is "+E),o=L(e,d)):!u&&O(t)&&((o=new r.default).action=r.default.ACTION_COMPLETE,o.index=E-1,o.mediaType=h,o.mediaInfo=e,_.debug("Signal complete in getSegmentRequestForTime")),l&&s>=0&&(E=t.segmentInfoType===i.default.SEGMENT_TIMELINE&&A?E:s),o},getNextSegmentRequest:function(e,t){var n=null;if(!t||!t.segmentInfoType)return null;T=null;var i=E+1;_.debug("Getting the next request at index: "+i);var a=S.getSegmentByIndex(t,i,b?b.mediaStartTime:-1);return!a&&function(e){return!isFinite(e.adaptation.period.duration)}(t)?(_.debug("No segment found at index: "+i+". Wait for next loop"),null):(a?(n=L(e,a),E=a.availabilityIdx):E=A?i-1:i,a?b=a:O(t)&&((n=new r.default).action=r.default.ACTION_COMPLETE,n.index=E-1,n.mediaType=x(),n.mediaInfo=e,_.debug("Signal complete")),n)},setCurrentTime:function(e){w=e},getCurrentTime:function(){return w},reset:function(){R(),n.off(o.default.INITIALIZATION_LOADED,D,y),n.off(o.default.SEGMENTS_LOADED,P,y),n.off(o.default.REPRESENTATION_UPDATE_STARTED,I,y)},resetIndex:M},_=(0,u.default)(t).getInstance().getLogger(y),R(),S=(0,f.default)(t).create(e),n.on(o.default.INITIALIZATION_LOADED,D,y),n.on(o.default.SEGMENTS_LOADED,P,y),n.on(o.default.REPRESENTATION_UPDATE_STARTED,I,y),y}p.__dashjs_factory_name="DashHandler",t.default=l.default.getClassFactory(p)},function(e,t,n){"use strict";
vendor: 4,139 bytes, line 22
22Object.defineProperty(t,"__esModule",{value:!0});var i=p(n(33)),r=p(n(49)),a=p(n(7)),o=p(n(5)),s=p(n(2)),l=p(n(23)),u=p(n(1)),d=p(n(3)),c=p(n(17)),f=p(n(25)),h=p(n(8));function p(e){return e&&e.__esModule?e:{default:e}}function m(){var e=this.context,t=(0,s.default)(e).getInstance(),n=void 0,u=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0;function b(){if(!E||!E.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function T(e){if(e.url){var t=new c.default;return t.setInfo(e),t}}function w(e,n,i){e?t.trigger(o.default.SEGMENTS_LOADED,{segments:e,representation:n,mediaType:i}):t.trigger(o.default.SEGMENTS_LOADED,{segments:null,representation:n,mediaType:i,error:new a.default(h.default.SEGMENT_BASE_LOADER_ERROR_CODE,h.default.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}return n={setConfig:function(e){e.baseURLController&&(E=e.baseURLController),e.dashMetrics&&(v=e.dashMetrics),e.mediaPlayerModel&&(y=e.mediaPlayerModel),e.errHandler&&(p=e.errHandler)},initialize:function(){m=(0,l.default)(e).getInstance(),g=(0,i.default)(e).getInstance(),_=(0,f.default)(e).create({errHandler:p,dashMetrics:v,mediaPlayerModel:y,requestModifier:g})},loadInitialization:function e(n,i){b();var r=null,a=n?E.resolve(n.path):null,s=i||{init:!0,url:a?a.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:n&&n.adaptation?n.adaptation.type:null};u.debug("Start searching for initialization.");var l=T(s);_.load({request:l,success:function(i){s.bytesLoaded=s.range.end,(r=m.findInitRange(i))?(n.range=r,t.trigger(o.default.INITIALIZATION_LOADED,{representation:n})):(s.range.end=s.bytesLoaded+s.bytesToLoad,e(n,s))},error:function(){t.trigger(o.default.INITIALIZATION_LOADED,{representation:n})}}),u.debug("Perform init search: "+s.url)},loadSegments:function e(t,n,i,a,o){if(b(),i&&(void 0===i.start||void 0===i.end)){var s=i?i.toString().split("-"):null;i=s?{start:parseFloat(s[0]),end:parseFloat(s[1])}:null}o=o||w;var l=null,d=null,c=!!i,f=t?E.resolve(t.path):null,h={init:!1,url:f?f.url:void 0,range:c?i:{start:0,end:1500},searching:!c,bytesLoaded:a?a.bytesLoaded:0,bytesToLoad:1500,mediaType:t&&t.adaptation?t.adaptation.type:null},p=T(h);_.load({request:p,success:function(i){var a=h.bytesToLoad,s=i.byteLength;if(h.bytesLoaded=h.range.end-h.range.start,l=m.parse(i),(d=l.getBox("sidx"))&&d.isComplete){var c=d.references,f=void 0,p=void 0;if(null!=c&&c.length>0&&(f=1===c[0].reference_type),f){u.debug("Initiate multiple SIDX load."),h.range.end=h.range.start+d.size;var g=void 0,v=void 0,y=void 0,_=void 0,E=[],b=0,T=(d.offset||h.range.start)+d.size,w=function(e){e?(E=E.concat(e),++b>=v&&(E.sort(function(e,t){return e.startTime-t.startTime<0?-1:0}),o(E,t,n))):o(null,t,n)};for(g=0,v=c.length;g<v;g++)y=T,_=T+c[g].referenced_size-1,T+=c[g].referenced_size,e(t,null,{start:y,end:_},h,w)}else u.debug("Parsing segments from SIDX. representation "+t.adaptation.type+" - id: "+t.id+" for range : "+h.range.start+" - "+h.range.end),p=function(e,t){for(var n=e.references,i=n.length,a=e.timescale,o=e.earliest_presentation_time,s=t.range.start+e.offset+e.first_offset+e.size,l=[],u=void 0,d=void 0,c=void 0,f=void 0,h=0;h<i;h++)c=n[h].subsegment_duration,f=n[h].referenced_size,(u=new r.default).duration=c,u.startTime=o,u.timescale=a,d=s+f-1,u.mediaRange=s+"-"+d,l.push(u),o+=c,s+=f;return l}(d,h),o(p,t,n)}else{if(d)h.range.start=d.offset||h.range.start,h.range.end=h.range.start+(d.size||a);else{if(s<h.bytesLoaded)return void o(null,t,n);var A=l.getLastBox();A&&A.size?(h.range.start=A.offset+A.size,h.range.end=h.range.start+a):h.range.end+=a}e(t,n,h.range,h,o)}},error:function(){o(null,t,n)}}),u.debug("Perform SIDX load: "+h.url+" with range : "+h.range.start+" - "+h.range.end)},reset:function(){_.abort(),_=null,p=null,m=null,g=null}},u=(0,d.default)(e).getInstance().getLogger(n),n}m.__dashjs_factory_name="SegmentBaseLoader",t.default=u.default.getSingletonFactory(m)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=f(n(2)),r=f(n(51)),a=f(n(1)),o=f(n(3)),s=f(n(52)),l=n(9),u=f(n(81)),d=f(n(53)),c=n(54);
vendor: 5,689 bytes, line 22
22function f(e){return e&&e.__esModule?e:{default:e}}var h="dash.js-v"+(0,c.getVersionString)(),p=null,m=1,g=2,v=3,y=4,_="m",E="a",b="v",T="i",w="c",A="d",S="s",x="v",M="l";function R(){var e=void 0,t=void 0,n=void 0,a=void 0,c=void 0,f=void 0,R=this.context,C=(0,i.default)(R).getInstance(),I=(0,s.default)(R).getInstance();function L(){n={pr:1,nor:null,st:null,sf:null,sid:""+d.default.generateUuid(),bs:{audio:m,video:m},cid:null,did:""+h}}function O(){var e={v:1};return e.sid=I.get().streaming.cmcd.sid?I.get().streaming.cmcd.sid:n.sid,e.cid=I.get().streaming.cmcd.cid?I.get().streaming.cmcd.cid:n.cid,e.did=I.get().streaming.cmcd.did?I.get().streaming.cmcd.did:n.did,e.sid='"'+e.sid+'"',e.cid='"'+e.cid+'"',e.did='"'+e.did+'"',isNaN(n.pr)||1===n.pr||null===n.pr||(e.pr=n.pr),n.st&&(e.st=n.st),n.sf&&(e.sf=n.sf),e}function D(e){try{n.pr=e.playbackRate}catch(e){}}function P(t){try{var i=e.getIsDynamic(t.data)?""+M:""+x,r=t.protocol&&"MSS"===t.protocol?""+S:""+A;n.st=""+i,n.sf=""+r}catch(e){}}function N(e){try{if(e.state&&e.mediaType){var t=null;switch(e.state){case r.default.BUFFER_LOADED:t=p;break;case r.default.BUFFER_EMPTY:f.isSeeking()&&(t=g),t=y}n.bs[e.mediaType]=t}}catch(e){}}return t={getQueryParameter:function(e){try{if(I.get().streaming.cmcd&&I.get().streaming.cmcd.enabled){var t=function(e){try{var t=null;return e.type===l.HTTPRequest.MPD_TYPE?(function(e){try{n.cid=""+d.default.generateHashCode(e.url)}catch(e){}}(e),(i=O()).ot=""+_,i):e.type===l.HTTPRequest.MEDIA_SEGMENT_TYPE?function(e){var t=O(),i=function(e){try{var t=e.quality,n=e.mediaInfo.bitrateList;return parseInt(n[t].bandwidth/1e3)}catch(e){return null}}(e),r=function(e){try{return isNaN(e.duration)?null:Math.round(1e3*e.duration)}catch(e){return null}}(e),o="video"===e.mediaType?""+b:"audio"===e.mediaType?""+E:"fragmentedText"===e.mediaType?""+w:null,s=function(e){try{return Math.round(a.getThroughputHistory().getSafeAverageThroughput(e))}catch(e){return null}}(e.mediaType),l=function(e){try{var t=n.pr,i=c.getCurrentBufferLevel(e,!0);return isNaN(t)||isNaN(i)?null:parseInt(i/t*1e3)}catch(e){return null}}(e.mediaType),u=function(e){try{var t=e.mediaType;return null!==n.bs[t]?n.bs[t]:c.getCurrentBufferLevel(t,!0)<e.duration?v:p}catch(e){}}(e);i&&(t.br=i);o&&(t.ot=o);isNaN(r)||(t.d=r);isNaN(s)||(t.mtp=s);isNaN(l)||(t.dl=l);isNaN(u)||null===u||(t.bs=u);return t}(e):e.type===l.HTTPRequest.INIT_SEGMENT_TYPE?function(){var e=O();return e.ot=""+T,e}():t}catch(e){return null}var i}(e),i=function(e){try{if(!e)return null;var t=Object.keys(e),n=t.length;return t.reduce(function(t,i,r){return t+=i+"="+e[i],r<n-1&&(t+=","),t},"")}catch(e){return null}}(t);return{key:"Common-Media-Client-Data",value:i}}return null}catch(e){return null}},setConfig:function(e){e&&(e.abrController&&(a=e.abrController),e.dashMetrics&&(c=e.dashMetrics),e.playbackController&&(f=e.playbackController))},reset:function(){C.off(r.default.PLAYBACK_RATE_CHANGED,D,this),C.off(r.default.MANIFEST_LOADED,P,this),C.off(r.default.BUFFER_LEVEL_STATE_CHANGED,N,t),L()},initialize:function(){C.on(r.default.PLAYBACK_RATE_CHANGED,D,t),C.on(r.default.MANIFEST_LOADED,P,t),C.on(r.default.BUFFER_LEVEL_STATE_CHANGED,N,t)}},(0,o.default)(R).getInstance().getLogger(t),e=(0,u.default)(R).getInstance(),L(),t}R.__dashjs_factory_name="CmcdModel",t.default=a.default.getSingletonFactory(R)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=E(n(4)),r=E(n(11)),a=E(n(164)),o=E(n(165)),s=E(n(166)),l=E(n(167)),u=E(n(82)),d=E(n(83)),c=E(n(84)),f=E(n(168)),h=E(n(85)),p=E(n(15)),m=E(n(1)),g=E(n(3)),v=E(n(7)),y=E(n(8)),_=n(86);function E(e){return e&&e.__esModule?e:{default:e}}function b(){var e=void 0,t=void 0,n=void 0,m=void 0,E=this.context,b=(0,p.default)(E).getInstance(),T=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function w(e,t){var n=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=!1,c=!1;if(!e)throw new Error("adaptation is not defined");if(!t)throw new Error("type is not defined");if(e.hasOwnProperty("ContentComponent_asArray")&&(s=e.ContentComponent_asArray),l=t!==i.default.TEXT?new RegExp(t):new RegExp("(vtt|ttml)"),e.Representation_asArray&&e.Representation_asArray.length&&e.Representation_asArray.length>0){var f=P(e.Representation_asArray[0]);if(f&&f.length>0&&_.THUMBNAILS_SCHEME_ID_URIS.indexOf(f[0].schemeIdUri)>=0)return t===i.default.IMAGE;if(e.Representation_asArray[0].hasOwnProperty(r.default.CODECS)&&(0===(u=e.Representation_asArray[0].codecs).search(i.default.STPP)||0===u.search(i.default.WVTT)))return t===i.default.FRAGMENTED_TEXT}if(s){if(s.length>1)return t===i.default.MUXED;s[0]&&s[0].contentType===t&&(d=!0,c=!0)}if(e.hasOwnProperty(r.default.MIME_TYPE)&&(d=l.test(e.mimeType),c=!0),!c)for(n=0,a=e.Representation_asArray&&e.Representation_asArray.length?e.Representation_asArray.length:0;!c&&n<a;)(o=e.Representation_asArray[n]).hasOwnProperty(r.default.MIME_TYPE)&&(d=l.test(o.mimeType),c=!0),n++;return d}function A(e){return w(e,i.default.AUDIO)}function S(e){return w(e,i.default.VIDEO)}function x(e){return w(e,i.default.FRAGMENTED_TEXT)}function M(e){return w(e,i.default.MUXED)}function R(e){return w(e,i.default.IMAGE)}function C(e){return"text/vtt"===e||"application/ttml+xml"===e}function I(){return function(e,t){return e.bandwidth-t.bandwidth}}function L(e){return e&&Array.isArray(e.Representation_asArray)&&e.Representation_asArray.sort(function(e,t){return e.bandwidth-t.bandwidth}),e}function O(e,t){return e&&e.Period_asArray&&T(t)&&e.Period_asArray[t]?e.Period_asArray[t].AdaptationSet_asArray:[]}function D(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===r.default.DYNAMIC),t}
vendor: 5,834 bytes, line 22
22function P(e){return e&&e.EssentialProperty_asArray&&e.EssentialProperty_asArray.length?e.EssentialProperty_asArray.map(function(e){return{schemeIdUri:e.schemeIdUri,value:e.value}}):null}function N(e){if(e&&e.period&&T(e.period.index)){var t=e.period.mpd.manifest.Period_asArray[e.period.index];if(t&&t.AdaptationSet_asArray&&T(e.index))return L(t.AdaptationSet_asArray[e.index])}}function k(e){var t=e.S_asArray[e.S_asArray.length-1];return!t.hasOwnProperty("r")||t.r>=0}function F(e){var t=e.presentationTimeOffset;return e.adaptation.period.start-t}function B(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=s.default.DEFAULT_ID+"_"+t;return e.hasOwnProperty(r.default.ID)&&e.id.length>0&&"__proto__"!==e.id&&(n=e.id),n}function U(e,t){var n=[],a=void 0;if(!e)return n;for(a=0;a<e.length;a++){var o=new f.default;if(o.timescale=1,o.representation=t,!e[a].hasOwnProperty(i.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");o.schemeIdUri=e[a].schemeIdUri,e[a].hasOwnProperty(r.default.TIMESCALE)&&(o.timescale=e[a].timescale),e[a].hasOwnProperty(r.default.VALUE)&&(o.value=e[a].value),n.push(o)}return n}function j(e){var t=[],n=e.BaseURL_asArray||[e.baseUri],i=!1;return n.some(function(n){if(n){var a=new c.default,o=n.__text||n;return b.isRelative(o)&&(i=!0,e.baseUri&&(o=b.resolve(o,e.baseUri))),a.url=o,n.hasOwnProperty(r.default.SERVICE_LOCATION)&&n.serviceLocation.length?a.serviceLocation=n.serviceLocation:a.serviceLocation=o,n.hasOwnProperty(r.default.DVB_PRIORITY)&&(a.dvb_priority=n[r.default.DVB_PRIORITY]),n.hasOwnProperty(r.default.DVB_WEIGHT)&&(a.dvb_weight=n[r.default.DVB_WEIGHT]),n.hasOwnProperty(r.default.AVAILABILITY_TIME_OFFSET)&&(a.availabilityTimeOffset=n[r.default.AVAILABILITY_TIME_OFFSET]),n.hasOwnProperty(r.default.AVAILABILITY_TIME_COMPLETE)&&(a.availabilityTimeComplete="false"!==n[r.default.AVAILABILITY_TIME_COMPLETE]),t.push(a),i}}),t}return e={getIsTypeOf:w,getIsTextTrack:C,getLanguageForAdaptation:function(e){var t="";return e&&e.hasOwnProperty(r.default.LANG)&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t},getViewpointForAdaptation:function(e){return e&&e.hasOwnProperty(r.default.VIEWPOINT)?e.Viewpoint:null},getRolesForAdaptation:function(e){return e&&e.hasOwnProperty(r.default.ROLE_ASARRAY)?e.Role_asArray:[]},getAccessibilityForAdaptation:function(e){return e&&e.hasOwnProperty(r.default.ACCESSIBILITY_ASARRAY)?e.Accessibility_asArray:[]},getAudioChannelConfigurationForAdaptation:function(e){return e&&e.hasOwnProperty(r.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAudioChannelConfigurationForRepresentation:function(e){return e&&e.hasOwnProperty(r.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAdaptationForIndex:function(e,t,n){var i=O(t,n);return i.length>0&&T(e)?i[e]:null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;for(var i=O(t,n),r=0;r<i.length;r++){if((0,h.default)(E).getInstance().areEqual(i[r],e))return r}return-1},getAdaptationForId:function(e,t,n){var i,a=O(t,n),o=void 0;for(o=0,i=a.length;o<i;o++)if(a[o].hasOwnProperty(r.default.ID)&&a[o].id===e)return a[o];return null},getAdaptationsForType:function(e,t,n){var i,r=O(e,t),a=void 0,o=[];for(a=0,i=r.length;a<i;a++)w(r[a],n)&&o.push(L(r[a]));return o},getCodec:function(e,t,n){var i=null;if(e&&e.Representation_asArray&&e.Representation_asArray.length>0){var r=T(t)&&t>=0&&t<e.Representation_asArray.length?e.Representation_asArray[t]:e.Representation_asArray[0];r&&(i=r.mimeType+';codecs="'+r.codecs+'"',n&&void 0!==r.width&&(i+=';width="'+r.width+'";height="'+r.height+'"'))}return i},getMimeType:function(e){return e&&e.Representation_asArray&&e.Representation_asArray.length>0?e.Representation_asArray[0].mimeType:null},getKID:function(e){return e&&e.hasOwnProperty(r.default.CENC_DEFAULT_KID)?e[r.default.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(e){if(!e||!Array.isArray(e.Label_asArray))return[];for(var t=[],n=0;n<e.Label_asArray.length;n++)t.push({lang:e.Label_asArray[n].lang,text:e.Label_asArray[n].__text||e.Label_asArray[n]});return t},getContentProtectionData:function(e){return e&&e.hasOwnProperty(r.default.CONTENTPROTECTION_ASARRAY)&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null},getIsDynamic:D,hasProfile:function(e,t){var n=!1;return e&&e.profiles&&e.profiles.length>0&&(n=-1!==e.profiles.indexOf(t)),n},getDuration:function(e){return e&&e.hasOwnProperty(r.default.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"==e.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getManifestUpdatePeriod:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=NaN;return e&&e.hasOwnProperty(r.default.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getRepresentationCount:function(e){return e&&Array.isArray(e.Representation_asArray)?e.Representation_asArray.length:0},getBitrateListForAdaptation:function(e){var t=L(e);return(t&&Array.isArray(t.Representation_asArray)?t.Representation_asArray:[]).map(function(e){return{bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null}})},getRepresentationFor:function(e,t){return t&&t.Representation_asArray&&t.Representation_asArray.length>0&&T(e)?t.Representation_asArray[e]:null},getRepresentationsForAdaptation:function(e){var t=[],n=N(e),i=void 0,o=void 0;if(n&&n.Representation_asArray){if(e&&e.period&&T(e.period.index)){var s=j(e.period.mpd.manifest);s&&(o=s[0])}for(var l=0,u=n.Representation_asArray.length;l<u;++l){var d=n.Representation_asArray[l],c=new a.default;if(c.index=l,c.adaptation=e,d.hasOwnProperty(r.default.ID)&&(c.id=d.id),d.hasOwnProperty(r.default.CODECS)&&(c.co
vendor: 12,810 bytes, line 22
22decs=d.codecs),d.hasOwnProperty(r.default.CODEC_PRIVATE_DATA)&&(c.codecPrivateData=d.codecPrivateData),d.hasOwnProperty(r.default.BANDWITH)&&(c.bandwidth=d.bandwidth),d.hasOwnProperty(r.default.WIDTH)&&(c.width=d.width),d.hasOwnProperty(r.default.HEIGHT)&&(c.height=d.height),d.hasOwnProperty(r.default.SCAN_TYPE)&&(c.scanType=d.scanType),d.hasOwnProperty(r.default.MAX_PLAYOUT_RATE)&&(c.maxPlayoutRate=d.maxPlayoutRate),d.hasOwnProperty(r.default.SEGMENT_BASE)?(i=d.SegmentBase,c.segmentInfoType=r.default.SEGMENT_BASE):d.hasOwnProperty(r.default.SEGMENT_LIST)?(i=d.SegmentList).hasOwnProperty(r.default.SEGMENT_TIMELINE)?(c.segmentInfoType=r.default.SEGMENT_TIMELINE,c.useCalculatedLiveEdgeTime=k(i.SegmentTimeline)):(c.segmentInfoType=r.default.SEGMENT_LIST,c.useCalculatedLiveEdgeTime=!0):d.hasOwnProperty(r.default.SEGMENT_TEMPLATE)?((i=d.SegmentTemplate).hasOwnProperty(r.default.SEGMENT_TIMELINE)?(c.segmentInfoType=r.default.SEGMENT_TIMELINE,c.useCalculatedLiveEdgeTime=k(i.SegmentTimeline)):c.segmentInfoType=r.default.SEGMENT_TEMPLATE,i.hasOwnProperty(r.default.INITIALIZATION_MINUS)&&(c.initialization=i.initialization.split("$Bandwidth$").join(d.bandwidth).split("$RepresentationID$").join(d.id))):c.segmentInfoType=r.default.BASE_URL,c.essentialProperties=P(d),i){if(i.hasOwnProperty(r.default.INITIALIZATION)){var f=i.Initialization;f.hasOwnProperty(r.default.SOURCE_URL)&&(c.initialization=f.sourceURL),f.hasOwnProperty(r.default.RANGE)&&(c.range=f.range)}else d.hasOwnProperty(r.default.MIME_TYPE)&&C(d.mimeType)&&(c.range=0);i.hasOwnProperty(r.default.TIMESCALE)&&(c.timescale=i.timescale),i.hasOwnProperty(r.default.DURATION)&&(c.segmentDuration=i.duration/c.timescale),i.hasOwnProperty(r.default.MEDIA)&&(c.media=i.media),i.hasOwnProperty(r.default.START_NUMBER)&&(c.startNumber=i.startNumber),i.hasOwnProperty(r.default.INDEX_RANGE)&&(c.indexRange=i.indexRange),i.hasOwnProperty(r.default.PRESENTATION_TIME_OFFSET)&&(c.presentationTimeOffset=i.presentationTimeOffset/c.timescale),i.hasOwnProperty(r.default.AVAILABILITY_TIME_OFFSET)?c.availabilityTimeOffset=i.availabilityTimeOffset:o&&void 0!==o.availabilityTimeOffset&&(c.availabilityTimeOffset=o.availabilityTimeOffset),i.hasOwnProperty(r.default.AVAILABILITY_TIME_COMPLETE)?c.availabilityTimeComplete="false"!==i.availabilityTimeComplete:o&&void 0!==o.availabilityTimeComplete&&(c.availabilityTimeComplete=o.availabilityTimeComplete)}c.MSETimeOffset=F(c),c.path=[e.period.index,e.index,l],t.push(c)}}return t},getAdaptationsForPeriod:function(e){var t=e&&T(e.index)?e.mpd.manifest.Period_asArray[e.index]:null,n=[],a=void 0,s=void 0,l=void 0;if(t&&t.AdaptationSet_asArray)for(l=0;l<t.AdaptationSet_asArray.length;l++)s=t.AdaptationSet_asArray[l],a=new o.default,s.hasOwnProperty(r.default.ID)&&(a.id=s.id),a.index=l,a.period=e,M(s)?a.type=i.default.MUXED:A(s)?a.type=i.default.AUDIO:S(s)?a.type=i.default.VIDEO:x(s)?a.type=i.default.FRAGMENTED_TEXT:R(s)?a.type=i.default.IMAGE:a.type=i.default.TEXT,n.push(a);return n},getRegularPeriods:function(e){var a,o=!!e&&D(e.manifest),l=[],u=null,d=null,c=null,f=null,h=void 0;for(h=0,a=e&&e.manifest&&e.manifest.Period_asArray?e.manifest.Period_asArray.length:0;h<a;h++)(d=e.manifest.Period_asArray[h]).hasOwnProperty(r.default.START)?(f=new s.default).start=d.start:null!==u&&u.hasOwnProperty(r.default.DURATION)&&null!==c?(f=new s.default).start=parseFloat((c.start+c.duration).toFixed(5)):0!==h||o||((f=new s.default).start=0),null!==c&&isNaN(c.duration)&&(null!==f?c.duration=parseFloat((f.start-c.start).toFixed(5)):t.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==f&&(f.id=B(d,h),f.index=h,f.mpd=e,d.hasOwnProperty(r.default.DURATION)&&(f.duration=d.duration),l.push(f),u=d,c=f),d=null,f=null;return 0===l.length||null!==c&&isNaN(c.duration)&&(c.duration=parseFloat((function(e){!function(){if(!n||!n.hasOwnProperty("error"))throw new Error(i.default.MISSING_CONFIG_ERROR)}();var t=D(e.mpd.manifest),r=void 0;e.mpd.manifest.mediaPresentationDuration?r=e.mpd.manifest.mediaPresentationDuration:e.duration?r=e.duration:t?r=Number.POSITIVE_INFINITY:n.error(new v.default(y.default.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",e));return r}(c)-c.start).toFixed(5))),l},getMpd:function(e){var t=new l.default;return e&&(t.manifest=e,e.hasOwnProperty(r.default.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(r.default.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(r.default.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(r.default.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(i.default.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(r.default.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(r.default.MAX_SEGMENT_DURATION)&&(t.maxSegmentDuration=e.maxSegmentDuration)),t},getEventsForPeriod:function(e){var t=e&&e.mpd&&e.mpd.manifest?e.mpd.manifest:null,n=t?t.Period_asArray:null,a=n&&e&&T(e.index)?n[e.index].EventStream_asArray:null,o=[],s=void 0,l=void 0;if(a)for(s=0;s<a.length;s++){var u=new f.default;if(u.period=e,u.timescale=1,!a[s].hasOwnProperty(i.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(u.schemeIdUri=a[s].schemeIdUri,a[s].hasOwnProperty(r.default.TIMESCALE)&&(u.timescale=a[s].timescale),a[s].hasOwnProperty(r.default.VALUE)&&(u.value=a[s].value),l=0;a[s].Event_asArray&&l<a[s].Event_asArray.length;l++){var c=new d.default;c.presentationTime=0,c.eventStream=u,a[s].Event_asArray[l].hasOwnProperty(r.default.PRESENTATION_TIME)&&(c.presentationTime=a[s].Event_asArray[l].presentationTime),a[s].Event_asArray[l].hasOwnProperty(r.default.DURATION)&&(c.duration=a[s].Event_asArray[l].duration),a[s].Event_asArray[l].hasOwnProperty(r.default.ID)&&(c.id=a[s].Event_asArray[l].id),a[s].Event_asArray[l].Signal&&a[s].Event_asArray[l].Signal.Binary?c.messageData=m.decodeArray(a[s].Event_asArray[l].Signal.Binary.toString()):c.messageData=a[s].Event_asArray[l].messageData||a[s].Event_asArray[l].__text,o.push(c)}}return o},getEventStreamForAdaptationSet:function(e,t){var n=void 0,i=void 0,r=void 0;return e&&e.Period_asArray&&t&&t.period&&T(t.period.index)&&(i=e.Period_asArray[t.period.index])&&i.AdaptationSet_asArray&&T(t.index)&&(r=i.AdaptationSet_asArray[t.index])&&(n=r.InbandEventStream_asArray),U(n,null)},getEventStreamForRepresentation:function(e,t){var n=void 0,i=void 0,r=void 0,a=void 0;return e&&e.Period_asArray&&t&&t.adaptation&&t.adaptation.period&&T(t.adaptation.period.index)&&(i=e.Period_asArray[t.adaptation.period.index])&&i.AdaptationSet_asArray&&T(t.adaptation.index)&&(r=i.AdaptationSet_asArray[t.adaptation.index])&&r.Representation_asArray&&T(t.index)&&(a=r.Representation_asArray[t.index])&&(n=a.InbandEventStream_asArray),U(n,t)},getUTCTimingSources:function(e){var t=D(e),n=!!e&&e.hasOwnProperty(r.default.AVAILABILITY_START_TIME),a=e?e.UTCTiming_asArray:null,o=[];return(t||n)&&a&&a.forEach(function(e){var t=new u.default;e.hasOwnProperty(i.default.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(r.default.VALUE)&&(t.value=e.value.toString(),o.push(t)))}),o},getBaseURLsFromElement:j,getRepresentationSortFunction:I,getLocation:function(e){if(e&&e.hasOwnProperty(i.default.LOCATION))return e.Location=e.Location_asArray[0],e.Location},getUseCalculatedLiveEdgeTimeForAdaptation:function(e){var t=N(e),n=t&&Array.isArray(t.Representation_asArray)?t.Representation_asArray[0]:null,i=void 0;if(n){if(n.hasOwnProperty(r.default.SEGMENT_LIST))return!(i=n.SegmentList).hasOwnProperty(r.default.SEGMENT_TIMELINE)||k(i.SegmentTimeline);if(n.hasOwnProperty(r.default.SEGMENT_TEMPLATE)&&(i=n.SegmentTemplate).hasOwnProperty(r.default.SEGMENT_TIMELINE))return k(i.SegmentTimeline)}return!1},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(r.default.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(r.default.AVAILABILITY_START_TIME)&&null!==e.availabilityStartTime?e.availabilityStartTime.getTime():null},getServiceDescriptions:function(e){var t=[];if(e&&e.hasOwnProperty(r.default.SERVICE_DESCRIPTION)){var n=!0,a=!1,o=void 0;try{for(var s,l=e.ServiceDescription_asArray[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var u=s.value,d=void 0,c=void 0,f=void 0,h=void 0;for(var p in u)u.hasOwnProperty(p)&&(p===r.default.ID?d=u[p]:p===r.default.SERVICE_DESCRIPTION_SCOPE?c=u[p].schemeIdUri:p===r.default.SERVICE_DESCRIPTION_LATENCY?f={target:u[p].target,max:u[p].max,min:u[p].min}:p===r.default.SERVICE_DESCRIPTION_PLAYBACK_RATE&&(h={max:u[p].max,min:u[p].min}));c===i.default.SERVICE_DESCRIPTION_LL_SCHEME&&(f||h)&&t.push({id:d,schemeIdUri:c,latency:f,playbackRate:h})}}catch(e){a=!0,o=e}finally{try{!n&&l.return&&l.return()}finally{if(a)throw o}}}return t},getSupplementalPropperties:function(e){var t={};if(e&&e.hasOwnProperty(r.default.SUPPLEMENTAL_PROPERTY)){var n=!0,a=!1,o=void 0;try{for(var s,l=e.SupplementalProperty_asArray[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var u=s.value;u.hasOwnProperty(i.default.SCHEME_ID_URI)&&u.hasOwnProperty(r.default.VALUE)&&(t[u[i.default.SCHEME_ID_URI]]=u[r.default.VALUE])}}catch(e){a=!0,o=e}finally{try{!n&&l.return&&l.return()}finally{if(a)throw o}}}return t},setConfig:function(e){e&&(e.errHandler&&(n=e.errHandler),e.BASE64&&(m=e.BASE64))}},t=(0,g.default)(E).getInstance().getLogger(e),e}b.__dashjs_factory_name="DashManifestModel",t.default=m.default.getSingletonFactory(b)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t,n,i,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t||"",this.serviceLocation=n||t||"",this.dvb_priority=i||1,this.dvb_weight=r||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0};i.DEFAULT_DVB_PRIORITY=1,i.DEFAULT_DVB_WEIGHT=1,t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(169));function a(e){return e&&e.__esModule?e:{default:e}}function o(){return{areEqual:function(e,t){return(0,r.default)(e,t)}}}o.__dashjs_factory_name="ObjectUtils",t.default=i.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.THUMBNAILS_SCHEME_ID_URIS=void 0;var i=h(n(4)),r=h(n(11)),a=h(n(1)),o=h(n(170)),s=h(n(15)),l=n(21),u=h(n(79)),d=h(n(23)),c=h(n(50)),f=h(n(78));function h(e){return e&&e.__esModule?e:{default:e}}var p=t.THUMBNAILS_SCHEME_ID_URIS=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];function m(e){var t,n=this.context,a=e.adapter,h=e.baseURLController,m=e.stream,g=e.timelineConverter,v=e.dashMetrics,y=e.mediaPlayerModel,_=e.errHandler,E=(0,s.default)(n).getInstance(),b=void 0,T=void 0,w=void 0,A=void 0,S=void 0,x=void 0,M=void 0;function R(){I(),S=(0,c.default)(n).create({}),M=(0,d.default)(n).getInstance(),(x=(0,u.default)(n).getInstance()).setConfig({baseURLController:h,dashMetrics:v,mediaPlayerModel:y,errHandler:_}),(T=(0,f.default)(n).create({timelineConverter:g,baseURLController:h})).initialize(!!a&&a.getIsDynamic()),function(){if(!m||!a)return;var e=m.getStreamInfo();if(!e)return;if(!(A=a.getMediaInfoForType(e,i.default.IMAGE)))return;var t=a.getVoRepresentations(A);t&&t.length>0&&t.forEach(function(e){(e.segmentInfoType===r.default.SEGMENT_TEMPLATE&&e.segmentDuration>0&&e.media||e.segmentInfoType===r.default.SEGMENT_TIMELINE)&&C(e),e.segmentInfoType===r.default.SEGMENT_BASE&&C(e,!0)});b.length>0&&(b.sort(function(e,t){return e.bitrate-t.bitrate}),w=b.length-1)}()}function C(e,t){var n=new o.default;n.id=e.id,n.bitrate=e.bandwidth,n.width=e.width,n.height=e.height,n.tilesHor=1,n.tilesVert=1,e.essentialProperties&&e.essentialProperties.forEac
vendor: 10,999 bytes, line 22
22h(function(e){if(p.indexOf(e.schemeIdUri)>=0&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(n.tilesHor=parseInt(t[0],10),n.tilesVert=parseInt(t[1],10))}}),t?x.loadSegments(e,i.default.IMAGE,e.indexRange,{},function(e,t){var i=[];e=function(e,t){var n,i=[],r=0,o=void 0,s=void 0,u=void 0;for(o=0,n=e.length;o<n;o++)s=e[o],(u=(0,l.getTimeBasedSegment)(g,a.getIsDynamic(),t,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,r))&&(i.push(u),u=null,r++);return i}(e,t),n.segmentDuration=e[0].duration,n.readThumbnail=function(n,r){var a=null;i.some(function(e){if(e.start<=n&&e.end>n)return a=e.url,!0}),a?r(a):e.some(function(e){if(e.mediaStartTime<=n&&e.mediaStartTime+e.duration>n){var a=h.resolve(t.path);return S.load({method:"get",url:a.url,request:{range:e.mediaRange,responseType:"arraybuffer"},onload:function(t){var n=M.getSamplesInfo(t.target.response),a=new Blob([t.target.response.slice(n.sampleList[0].offset,n.sampleList[0].offset+n.sampleList[0].size)],{type:"image/jpeg"}),o=window.URL.createObjectURL(a);i.push({start:e.mediaStartTime,end:e.mediaStartTime+e.duration,url:o}),r&&r(o)}}),!0}})}}):(n.startNumber=e.startNumber,n.segmentDuration=e.segmentDuration,n.timescale=e.timescale,n.templateUrl=function(e){var t=E.isRelative(e.media)?E.resolve(e.media,h.resolve(e.path).url):e.media;if(!t)return"";return(0,l.replaceIDForTemplate)(t,e.id)}(e)),n.tilesHor>0&&n.tilesVert>0&&(n.widthPerTile=n.width/n.tilesHor,n.heightPerTile=n.height/n.tilesVert,b.push(n))}function I(){b=[],w=-1,A=null}return t={initialize:R,getTracks:function(){return b},reset:I,setTrackByIndex:function(e){b&&0!==b.length&&(e>=b.length&&(e=b.length-1),w=e)},getCurrentTrack:function(){return w<0?null:b[w]},getCurrentTrackIndex:function(){return w},getThumbnailRequestForTime:function(e){for(var t=void 0,n=a.getVoRepresentations(A),i=0;i<n.length;i++)if(b[w].id===n[i].id){t=n[i];break}return T.getSegmentRequestForTime(A,t,e)}},R(),t}m.__dashjs_factory_name="ThumbnailTracks",t.default=a.default.getClassFactory(m)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(182)),r=d(n(183)),a=d(n(15)),o=d(n(84)),s=d(n(1)),l=d(n(2)),u=d(n(5));function d(e){return e&&e.__esModule?e:{default:e}}function c(){var e=void 0,t=void 0,n=this.context,s=(0,l.default)(n).getInstance(),d=(0,a.default)(n).getInstance(),c=void 0,f=void 0;function h(e){c.invalidateSelectedIndexes(e.entry)}return e={reset:function(){c.reset(),f.reset()},initialize:function(e){var n;c.setConfig({adapter:t}),n=e,c.update(n),f.chooseSelector(t.getIsDVB(n))},resolve:function(e){var t=c.getForPath(e).reduce(function(e,t){var n=f.select(t);return n?(d.isRelative(n.url)?e.url=d.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e):new o.default},new o.default);if(!d.isRelative(t.url))return t},setConfig:function(e){e.baseURLTreeModel&&(c=e.baseURLTreeModel),e.baseURLSelector&&(f=e.baseURLSelector),e.adapter&&(t=e.adapter)}},c=(0,i.default)(n).create(),f=(0,r.default)(n).create(),s.on(u.default.SERVICE_LOCATION_BLACKLIST_CHANGED,h,e),e}c.__dashjs_factory_name="BaseURLController",t.default=s.default.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(4));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.url=e||null,r.type=n||null,r.mediaType=i.default.STREAM,r.responseType="",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(n(17)).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0);void 0===e.attributePrefix&&(e.attributePrefix="_");e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0);e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0);void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0);e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1);e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1);void 0===e.ignoreRoot&&(e.ignoreRoot=!1)}();var t=1,n=3,i=4,r=8,a=9;function o(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function s(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):e}function l(e,t,n,i){for(var r=0;r<e.length;r++){var a=e[r];if("string"==typeof a){if(a==i)break}else if(a instanceof RegExp){if(a.test(i))break}else if("function"==typeof a&&a(t,n,i))break}return r!=e.length}function u(t,n,i){if("property"===e.arrayAccessForm)t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]];!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0&&l(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function d(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),i=t[5].split(".");if(n.setHours(t[3],t[4],i[0]),i.length>1&&n.setMilliseconds(i[1]),t[6]&&t[7]){var r=60*t[6]+Number(t[7]);r=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*r:r),n.setMinutes(n.getMinutes()-r-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function c(n,i,r,a){return!(i==t&&e.xmlElementsFilter.length>0)||l(e.xmlElementsFilter,n,r,a)}function f(s,h){if(s.nodeType==a){for(var p=new Object,m=s.childNodes,g=0;g<m.length;g++){if((y=m[g]).nodeType==t)if(e.ignoreRoot)p=f(y);else(p={})[_=o(y)]=f(y)}return p}if(s.nodeType==t){(p=new Object).__cnt=0;var v=[];for(m=s.childNodes,g=0;g<m.length;g++){var y,_=o(y=m[g]);if(y.nodeType!=r){var E=h+"."+_;if(c(p,y.nodeType,_,E))if(p.__cnt++,null==p[_]){var b=f(y,E);if("#text"!=_||/[^\s]/.test(b))(T={})[_]=b,v.push(T);p[_]=b,u(p,_,E)}else{null!=p[_]&&(p[_]instanceof Array||(p[_]=[p[_]],u(p,_,E)));var T;b=f(y,E);if("#text"!=_||/[^\s]/.test(b))(T={})[_]=b,v.push(T);p[_][p[_].length]=b}}}p.__children=v;for(var w=o(s),A=0;A<s.attributes.length;A++){var S=s.attributes[A];p.__cnt++;for(var x=S.value,M=0,R=e.matchers.length;M<R;M++){var C=e.matchers[M];C.test(S,w)&&(x=C.converter(S.value))}p[e.attributePrefix+S.name]=x}var I=function(e){return e.prefix}(s);return null!=I&&""!=I&&(p.__cnt++,p.__prefix=I),null!=p["#text"]&&(p.__text=p["#text"],p.__text instanceof Array&&(p.__text=p.__text.join("\n")),e.stripWhitespaces&&(p.__text=p.__text.trim()),delete p["#text"],"property"==e.arrayAccessForm&&delete p["#text_asArray"],p.__text=function(t,n,i){if(e.datetimeAccessFormPaths.length>0){var r=i.split(".#")[0];return l(e.datetimeAccessFormPaths,t,n,r)?d(t):t}return t}(p.__text,_,h+"."+_)),null!=p["#cdata-section"]&&(p.__cdata=p["#cdata-section"],delete p["#cdata-section"],"property"==e.arrayAccessForm&&delete p["#cdata-section_asArray"]),0==p.__cnt&&"text"==e.emptyNodeForm?p="":1==p.__cnt&&null!=p.__text?p=p.__text:1!=p.__cnt||null==p.__cdata||e.keepCData?p.__cnt>1&&null!=p.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==p.__text||""==p.__text.trim())&&delete p.__text:p=p.__cdata,delete p.__cnt,!e.enableToStringFunc||null==p.__text&&null==p.__cdata||(p.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),p}if(s.nodeType==n||s.nodeType==i)return s.nodeValue}function h(t,n,i,r){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=i)for(var o=0;o<i.length;o++){var l=i[o],u=t[l];e.escapeMode&&(u=s(u)),a+=" "+l.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?a+='"'+u+'"':a+="'"+u+"'"}return a+=r?"/>":">"}function p(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function m(t,n){return"property"==e.arrayAccessForm&&(i=n.toString(),r="_asArray",-1!==i.indexOf(r,i.length-r.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var i,r}function g(e){var t=0;if(e instanceof Object)for(var n in e)m(e,n)||t++;return t}function v(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||l(e.jsonPropertiesFilter,t,n,i)}function y(t){var n=[];if(t instanceof Object)for(var i in t)-1==i.toString().indexOf("__")&&0==i.toString().indexOf(e.attributePrefix)&&n.push(i);return n}function _(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(e.escapeMode?n+=s(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=s(t):n+=t),n}function E(e,t){return""===e?t:e+"."+t}function b(e,t,n,i){var r="";if(0==e.length)r+=h(e,t,n,!0);else for(var a=0;a<e.length;a++)r+=h(e[a],t,y(e[a]),!1),r+=T(e[a],E(i,t)),r+=p(e[a],t);return r}function T(e,t){var n="";if(g(e)>0)for(var i in e)if(!m(e,i)&&(""==t||v(e,i,E(t,i)))){var r=e[i],a=y(r);if(null==r||null==r)n+=h(r,i,a,!0);else if(r instanceof Object)if(r instanceof Array)n+=b(r,i,a,t);else if(r instanceof Date)n+=h(r,i,a,!1),n+=r.toISOString(),n+=p(r,i);else{g(r)>0||null!=r.__text||null!=r.__cdata?(n+=h(r,i,a,!1),n+=T(r,E(t,i)),n+=p(r,i)):n+=h(r,i,a,!0)}else n+=h(r,i,a,!1),n+=_(r),n+=p(r,i)}return n+=_(e)}this.parseXmlString=function(e){var t;window.ActiveXObject||window;if(void 0===e)return null;if(window.DOMParser){var n=new window.DOMParser;try{(t=n.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2json=function(e){return f(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return T(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}}},function(e,t,n){"use strict";
vendor: 8,086 bytes, lines 22-29
22Object.defineProperty(t,"__esModule",{value:!0});var i,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(198),o=(i=a)&&i.__esModule?i:{default:i};var s=function(){function e(t,n,i){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t||"",this._properties=[],this._children=i||[],Array.isArray(n)&&n.forEach(function(e){r._properties.push(new o.default(e))})}return r(e,[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(234),a=(i=r)&&i.__esModule?i:{default:i};function o(e){e=e||{};var t={"urn:dvb:dash:reporting:2014":a.default},n=this.context,i=void 0,r=e.debug?e.debug.getLogger(i):{},o=e.metricsConstants;return i={create:function(e,i){var a=void 0;try{(a=t[e.schemeIdUri](n).create({metricsConstants:o})).initialize(e,i)}catch(t){a=null,r.error("ReportingFactory: could not create Reporting with schemeIdUri "+e.schemeIdUri+" ("+t.message+")")}return a},register:function(e,n){t[e]=n},unregister:function(e){delete t[e]}}}o.__dashjs_factory_name="ReportingFactory",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(238)),r=s(n(239)),a=s(n(240)),o=s(n(241));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=void 0,n=(e=e||{}).debug?e.debug.getLogger(t):{},s=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,l=this.context,u={BufferLevel:i.default,DVBErrors:r.default,HttpList:a.default,PlayList:o.default,RepSwitchList:o.default,TcpList:o.default};return t={create:function(t,i){var r,a=t.match(s);if(a){try{(r=u[a[1]](l).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(a[1],i,a[3],a[5])}catch(e){r=null,n.error("MetricsHandlerFactory: Could not create handler for type "+a[1]+" with args "+a[3]+", "+a[5]+" ("+e.message+")")}return r}},register:function(e,t){u[e]=t},unregister:function(e){delete u[e]}}}l.__dashjs_factory_name="MetricsHandlerFactory",t.default=dashjs.FactoryMaker.getSingletonFactory(l)},function(e,t,n){"use strict";function i(){return{reconstructFullMetricName:function(e,t,n){var i=e;return t&&(i+="("+t,n&&n.length&&(i+=","+n),i+=")"),i},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}Object.defineProperty(t,"__esModule",{value:!0}),i.__dashjs_factory_name="HandlerHelpers",t.default=dashjs.FactoryMaker.getSingletonFactory(i)},function(e,t,n){(function(t,n){
23/*!
24 * @overview es6-promise - a tiny implementation of Promises/A+.
25 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
26 * @license   Licensed under MIT license
27 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
28 * @version   v4.2.8+1e68dce6
29 */var i;i=function(){"use strict";function e(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,a=void 0,o=void 0,s=function(e,t){p[r]=e,p[r+1]=t,2===(r+=2)&&(o?o(m):E())},l="undefined"!=typeof window?window:void 0,u=l||{},d=u.MutationObserver||u.WebKitMutationObserver,c="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(m,1)}}var p=new Array(1e3);function m(){for(var e=0;e<r;e+=2)(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0;r=0}var g,v,y,_,E=void 0;function b(e,t){var n=this,i=new this.constructor(A);void 0===i[w]&&F(i);var r=n._state;if(r){var a=arguments[r-1];s(function(){return N(r,i,a,n._result)})}else D(n,i,e,t);return i}function T(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return C(t,e),t}c?E=function(){return t.nextTick(m)}:d?(v=0,y=new d(m),_=document.createTextNode(""),y.observe(_,{characterData:!0}),E=function(){_.data=v=++v%2}):f?((g=new MessageChannel).port1.onmessage=m,E=function(){return g.port2.postMessage(0)}):E=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(a=e.runOnLoop||e.runOnContext)?function(){a(m)}:h()}catch(e){return h()}}():h();var w=Math.random().toString(36).substring(2);function A(){}var S=void 0,x=1,M=2;function R(t,n,i){n.constructor===t.constructor&&i===b&&n.constructor.resolve===T?function(e,t){t._state===x?L(e,t._result):t._state===M?O(e,t._result):D(t,void 0,function(t){return C(e,t)},function(t){return O(e,t)})}(t,n):void 0===i?L(t,n):e(i)?function(e,t,n){s(function(e){var i=!1,r=function(e,t,n,i){try{e.call(t,n,i)}catch(e){return e}}(n,t,function(n){i||(i=!0,t!==n?C(e,n):L(e,n))},function(t){i||(i=!0,O(e,t))},e._label);!i&&r&&(i=!0,O(e,r))},e)}(t,n,i):L(t,n)}function C(e,t){if(e===t)O(e,new TypeError("You cannot resolve a promise with itself"));else if(r=typeof(i=t),null===i||"object"!==r&&"function"!==r)L(e,t);else{var n=void 0;try{n=t.then}catch(t){return void O(e,t)}R(e,t,n)}var i,r}function I(e){e._onerror&&e._onerror(e._result),P(e)}function L(e,t){e._state===S&&(e._result=t,e._state=x,0!==e._subscribers.length&&s(P,e))}function O(e,t){e._state===S&&(e._state=M,e._result=t,s(I,e))}function D(e,t,n,i){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+x]=n,r[a+M]=i,0===a&&e._state&&s(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var i=void 0,r=void 0,a=e._result,o=0;o<t.length;o+=3)i=t[o],r=t[o+n],i?N(n,i,r,a):r(a);e._subscribers.length=0}}function N(t,n,i,r){var a=e(i),o=void 0,s=void 0,l=!0;if(a){try{o=i(r)}catch(e){l=!1,s=e}if(n===o)return void O(n,new TypeError("A promises callback cannot return that same promise."))}else o=r;n._state!==S||(a&&l?C(n,o):!1===l?O(n,s):t===x?L(n,o):t===M&&O(n,o))}var k=0;function F(e){e[w]=k++,e._state=void 0,e._result=void 0,e._subscribers=[]}var B=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[w]||F(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&L(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===S&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===T){var r=void 0,a=void 0,o=!1;try{r=e.then}catch(e){o=!0,a=e}if(r===b&&e._state!==S)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===U){var s=new n(A);o?O(s,a):R(s,e,r),this._willSettleAt(s,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},e.prototype._settledAt=function(e,t,n){var i=this.promise;i._state===S&&(this._remaining--,e===M?O(i,n):this._result[t]=n),0===this._remaining&&L(i,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;D(e,void 0,function(e){return n._settledAt(x,t,e)},function(e){return n._settledAt(M,t,e)})},e}(),U=function(){function t(e){this[w]=k++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t(function(t){C(e,t)},function(t){O(e,t)})}catch(t){O(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
29onstructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,i=n.constructor;return e(t)?n.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})}):n.then(t,t)},t}();return U.prototype.then=b,U.all=function(e){return new B(this,e).promise},U.race=function(e){var t=this;return i(e)?new t(function(n,i){for(var r=e.length,a=0;a<r;a++)t.resolve(e[a]).then(n,i)}):new t(function(e,t){return t(new TypeError("You must pass an array to race."))})},U.resolve=T,U.reject=function(e){var t=new this(A);return O(t,e),t},U._setScheduler=function(e){o=e},U._setAsap=function(e){s=e},U._asap=s,U.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===i&&!t.cast)return}e.Promise=U},U.Promise=U,U},e.exports=i()}).call(this,n(16),n(12))},function(e,t,n){"use strict";const i=[function(e,t){e.checkVPAIDInterface=e=>{const t=e;return!!(t.handshakeVersion&&"function"==typeof t.handshakeVersion&&t.initAd&&"function"==typeof t.initAd&&t.startAd&&"function"==typeof t.startAd&&t.stopAd&&"function"==typeof t.stopAd&&t.skipAd&&"function"==typeof t.skipAd&&t.resizeAd&&"function"==typeof t.resizeAd&&t.pauseAd&&"function"==typeof t.pauseAd&&t.resumeAd&&"function"==typeof t.resumeAd&&t.expandAd&&"function"==typeof t.expandAd&&t.collapseAd&&"function"==typeof t.collapseAd&&t.subscribe&&"function"==typeof t.subscribe&&t.unsubscribe&&"function"==typeof t.unsubscribe)},e.onVpaidAdPaused=()=>{e.vpaidTimeoutTimerClear(),e.debugMessage("onAdPaused")},e.onVpaidAdPlaying=()=>{e.vpaidTimeoutTimerClear(),e.debugMessage("onAdPlaying")},e.onVpaidAdError=t=>{e.debugMessage("onAdError: "+t),e.vpaidTimeoutTimerClear(),e.onVpaidEnded()},e.onVpaidAdLog=t=>{e.debugMessage("onAdLog: "+t)},e.onVpaidAdUserAcceptInvitation=()=>{e.debugMessage("onAdUserAcceptInvitation")},e.onVpaidAdUserMinimize=()=>{e.debugMessage("onAdUserMinimize")},e.onVpaidAdUserClose=()=>{e.debugMessage("onAdUserClose")},e.onVpaidAdSkippableStateChange=()=>{e.vpaidAdUnit&&e.debugMessage("Ad Skippable State Changed to: "+e.vpaidAdUnit.getAdSkippableState())},e.onVpaidAdExpandedChange=()=>{e.vpaidAdUnit&&e.debugMessage("Ad Expanded Changed to: "+e.vpaidAdUnit.getAdExpanded())},e.getVpaidAdExpanded=()=>{if(e.debugMessage("getAdExpanded"),e.vpaidAdUnit)return e.vpaidAdUnit.getAdExpanded()},e.getVpaidAdSkippableState=()=>{if(e.debugMessage("getAdSkippableState"),e.vpaidAdUnit)return e.vpaidAdUnit.getAdSkippableState()},e.onVpaidAdSizeChange=()=>{e.vpaidAdUnit&&e.debugMessage("Ad size changed to: w="+e.vpaidAdUnit.getAdWidth()+" h="+e.vpaidAdUnit.getAdHeight())},e.onVpaidAdDurationChange=()=>{e.vpaidAdUnit&&e.debugMessage("Ad Duration Changed to: "+e.vpaidAdUnit.getAdDuration())},e.onVpaidAdRemainingTimeChange=()=>{e.vpaidAdUnit&&e.debugMessage("Ad Remaining Time Changed to: "+e.vpaidAdUnit.getAdRemainingTime())},e.getVpaidAdRemainingTime=()=>{if(e.debugMessage("getAdRemainingTime"),e.vpaidAdUnit)return e.vpaidAdUnit.getAdRemainingTime()},e.onVpaidAdImpression=()=>{e.debugMessage("Ad Impression"),e.trackSingleEvent("impression")},e.onVpaidAdClickThru=(t,n,i)=>{e.debugMessage("Clickthrough portion of the ad was clicked"),i&&window.open(e.vastOptions.clickthroughUrl),e.pauseVpaidAd(),e.callUris(e.vastOptions.clicktracking)},e.onVpaidAdInteraction=t=>{e.debugMessage("A non-clickthrough event has occured")},e.onVpaidAdVideoStart=()=>{e.debugMessage("Video 0% completed"),e.trackSingleEvent("start")},e.onVpaidAdVideoFirstQuartile=()=>{e.debugMessage("Video 25% completed"),e.trackSingleEvent("firstQuartile")},e.onVpaidAdVideoMidpoint=()=>{e.debugMessage("Video 50% completed"),e.trackSingleEvent("midpoint")},e.onVpaidAdVideoThirdQuartile=()=>{e.debugMessage("Video 75% completed"),e.trackSingleEvent("thirdQuartile")},e.onVpaidAdVideoComplete=()=>{e.debugMessage("Video 100% completed"),e.trackSingleEvent("complete")},e.onVpaidAdLinearChange=()=>{const t=document.getElementsByClassName("fluid_vpaidNonLinear_ad")[0],n=document.getElementById("close_button_"+e.videoPlayerId),i=t.getAttribute("adlistid");if(e.debugMessage("Ad linear has changed: "+e.vpaidAdUnit.getAdLinear()),!e.vpaidAdUnit.getAdLinear())return;e.backupMainVideoContentTime(i),e.isCurrentlyPlayingAd=!0,n&&n.remove(),t.className="fluid_vpaid_slot",t.id=e.videoPlayerId+"_fluid_vpaid_slot",e.domRef.player.loop=!1,e.domRef.player.removeAttribute("controls");const r=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_currentprogress");for(let t=0;t<r.length;t++)r[t].style.backgroundColor=e.displayOptions.layoutControls.adProgressColor;e.toggleLoader(!1)},e.getVpaidAdLinear=()=>(e.debugMessage("getAdLinear"),e.vpaidAdUnit.getAdLinear()),e.startVpaidAd=()=>{e.debugMessage("startAd"),e.vpaidTimeoutTimerStart(),e.vpaidAdUnit.startAd()},e.onVpaidAdLoaded=()=>{e.debugMessage("ad has been loaded"),e.vpaidTimeoutTimerClear(),e.startVpaidAd()},e.onStartVpaidAd=()=>{e.debugMessage("Ad has started"),e.vpaidTimeoutTimerClear()},e.stopVpaidAd=()=>{e.vpaidTimeoutTimerStart(),e.vpaidAdUnit.stopAd()},e.hardStopVpaidAd=t=>{e.vpaidAdUnit&&(e.vpaidAdUnit.stopAd(),e.vpaidAdUnit=null);const n=document.getElementsByClassName("fluid_vpaid_iframe"),i=document.getElementsByClassName("fluid_vpaid_slot"),r=document.getElementsByClassName("fluid_vpaidNonLinear_ad");for(let e=0;e<n.length;e++)n[e].getAttribute("adListId")!==t&&n[e].remove();for(let e=0;e<i.length;e++)i[e].getAttribute("adListId")!==t&&i[e].remove();for(let e=0;e<r.length;e++)r[e].getAttribute("adListId")!==t&&r[e].remove()},e.onStopVpaidAd=()=>{e.debugMessage("Ad has stopped"),e.vpaidTimeoutTimerClear(),e.onVpaidEnded()},e.onSkipVpaidAd=()=>{e.debugMessage("Ad was skipped"),e.vpaidTimeoutTimerClear(),e.onVpaidEnded()},e.skipVpaidAd=()=>{e.vpaidTimeoutTimerStart(),e.vpaidAdUnit&&(e.vpaidAdUnit.skipAd(),e.vpaidTimeoutTimerClear(),e.onVpaidEnded())},e.setVpaidAdVolume=t=>{e.vpaidAdUnit&&e.vpaidAdUnit.setAdVolume(t)},e.getVpaidAdVolume=()=>{if(e.vpaidAdUnit)return e.vpaidAdUnit.getAdVolume()},e.onVpaidAdVolumeChange=()=>{e.vpaidAdUnit&&e.debugMessage("Ad Volume has changed to - "+e.vpaidAdUnit.getAdVolume())},e.resizeVpaidAuto=()=>
29{if(null!==e.vastOptions&&e.vastOptions.vpaid&&e.vastOptions.linear){const t=e.domRef.player.offsetWidth,n=e.domRef.player.offsetHeight,i=e.fullscreenMode?"fullscreen":"normal";e.resizeVpaidAd(t,n,i)}},e.resizeVpaidAd=(t,n,i)=>{e.vpaidAdUnit&&e.vpaidAdUnit.resizeAd(t,n,i)},e.pauseVpaidAd=()=>{e.vpaidTimeoutTimerStart(),e.vpaidAdUnit&&e.vpaidAdUnit.pauseAd()},e.resumeVpaidAd=()=>{e.vpaidTimeoutTimerStart(),e.vpaidAdUnit&&e.vpaidAdUnit.resumeAd()},e.expandVpaidAd=()=>{e.vpaidAdUnit&&e.vpaidAdUnit.expandAd()},e.collapseVpaidAd=()=>{e.vpaidAdUnit&&e.vpaidAdUnit.collapseAd()},e.vpaidTimeoutTimerClear=()=>{e.vpaidTimer&&clearTimeout(e.vpaidTimer)},e.vpaidTimeoutTimerStart=()=>{e.vpaidTimeoutTimerClear(),e.vpaidTimer=setTimeout(function(){e.announceLocalError("901"),e.onVpaidEnded()},e.displayOptions.vastOptions.vpaidTimeout)},e.vpaidCallbackListenersAttach=()=>{const t={AdStarted:e.onStartVpaidAd,AdStopped:e.onStopVpaidAd,AdSkipped:e.onSkipVpaidAd,AdLoaded:e.onVpaidAdLoaded,AdLinearChange:e.onVpaidAdLinearChange,AdSizeChange:e.onVpaidAdSizeChange,AdExpandedChange:e.onVpaidAdExpandedChange,AdSkippableStateChange:e.onVpaidAdSkippableStateChange,AdDurationChange:e.onVpaidAdDurationChange,AdRemainingTimeChange:e.onVpaidAdRemainingTimeChange,AdVolumeChange:e.onVpaidAdVolumeChange,AdImpression:e.onVpaidAdImpression,AdClickThru:e.onVpaidAdClickThru,AdInteraction:e.onVpaidAdInteraction,AdVideoStart:e.onVpaidAdVideoStart,AdVideoFirstQuartile:e.onVpaidAdVideoFirstQuartile,AdVideoMidpoint:e.onVpaidAdVideoMidpoint,AdVideoThirdQuartile:e.onVpaidAdVideoThirdQuartile,AdVideoComplete:e.onVpaidAdVideoComplete,AdUserAcceptInvitation:e.onVpaidAdUserAcceptInvitation,AdUserMinimize:e.onVpaidAdUserMinimize,AdUserClose:e.onVpaidAdUserClose,AdPaused:e.onVpaidAdPaused,AdPlaying:e.onVpaidAdPlaying,AdError:e.onVpaidAdError,AdLog:e.onVpaidAdLog};for(let n in t)e.vpaidAdUnit.subscribe(t[n],n,e)},e.loadVpaid=(t,n)=>{const i=document.createElement("iframe");i.id=e.videoPlayerId+"_"+t+"_fluid_vpaid_iframe",i.className="fluid_vpaid_iframe",i.setAttribute("adListId",t),i.setAttribute("frameborder","0"),e.domRef.player.parentNode.insertBefore(i,e.domRef.player.nextSibling),i.contentWindow.document.write('
29<script src="'+n+'"><\/script>'),e.tempVpaidCounter=0,e.getVPAIDAdInterval=setInterval(function(){const n=i.contentWindow.getVPAIDAd;if(n&&"function"==typeof n)e.vpaidAdUnit&&e.hardStopVpaidAd(t),e.vpaidAdUnit=n(),clearInterval(e.getVPAIDAdInterval),e.checkVPAIDInterface(e.vpaidAdUnit)&&(e.getVpaidAdLinear()?(e.isCurrentlyPlayingAd=!0,e.switchPlayerToVpaidMode(t)):(e.debugMessage("non linear vpaid ad is loaded"),e.loadVpaidNonlinearAssets(t)));else{if(e.tempVpaidCounter++,e.tempVpaidCounter>=20)return clearInterval(e.getVPAIDAdInterval),e.adList[t].error=!0,e.playMainVideoWhenVpaidFails(403),!1;e.debugMessage(e.tempVpaidCounter)}},100)},e.onVpaidEnded=t=>{t&&t.stopImmediatePropagation();const n=document.getElementById(e.videoPlayerId+"_fluid_vpaid_slot");e.vpaidAdUnit=null,clearInterval(e.getVPAIDAdInterval),n.remove(),e.checkForNextAd()},e.playMainVideoWhenVpaidFails=t=>{const n=document.getElementById(e.videoPlayerId+"_fluid_vpaid_slot");n&&n.remove(),clearInterval(e.getVPAIDAdInterval),e.playMainVideoWhenVastFails(t)},e.switchPlayerToVpaidMode=()=>{}},function(e,t){e.getClickThroughUrlFromLinear=t=>{const n=t.getElementsByTagName("VideoClicks");if(n.length){const t=n[0].getElementsByTagName("ClickThrough");if(t.length)return e.extractNodeData(t[0])}return!1},e.getVastAdTagUriFromWrapper=t=>{const n=t.getElementsByTagName("Wrapper");if(void 0!==n&&n.length){const t=n[0].getElementsByTagName("VASTAdTagURI");if(t.length)return e.extractNodeData(t[0])}return!1},e.hasInLine=e=>{const t=e.getElementsByTagName("InLine");return void 0!==t&&t.length},e.hasVastAdTagUri=e=>{const t=e.getElementsByTagName("VASTAdTagURI");return void 0!==t&&t.length},e.getClickThroughUrlFromNonLinear=t=>{let n="";if(t.getElementsByTagName("NonLinear").length){const i=t.getElementsByTagName("NonLinearClickThrough");i.length&&(n=e.extractNodeData(i[0]))}return n},e.getTrackingFromLinear=e=>{const t=e.getElementsByTagName("TrackingEvents");return t.length?t[0].getElementsByTagName("Tracking"):[]},e.getDurationFromLinear=t=>{const n=t.getElementsByTagName("Duration");if(n.length&&void 0!==n[0].childNodes[0]){const t=e.extractNodeData(n[0]);return e.convertTimeStringToSeconds(t)}return!1},e.getDurationFromNonLinear=t=>{let n=0;const i=t.getElementsByTagName("NonLinear");return i.length&&void 0!==i[0].getAttribute("minSuggestedDuration")&&(n=e.convertTimeStringToSeconds(i[0].getAttribute("minSuggestedDuration"))),n},e.getDimensionFromNonLinear=e=>{const t={width:null,height:null},n=e.getElementsByTagName("NonLinear");return n.length&&(void 0!==n[0].getAttribute("width")&&(t.width=n[0].getAttribute("width")),void 0!==n[0].getAttribute("height")&&(t.height=n[0].getAttribute("height"))),t},e.getCreativeTypeFromStaticResources=e=>{let t="";const n=e.getElementsByTagName("NonLinear");return n.length&&void 0!==n[0].childNodes[0]&&(t=n[0].getElementsByTagName("StaticResource")[0].getAttribute("creativeType")),t.toLowerCase()},e.getMediaFilesFromLinear=e=>{const t=e.getElementsByTagName("MediaFiles");return t.length?t[0].getElementsByTagName("MediaFile"):[]},e.getStaticResourcesFromNonLinear=e=>{let t=[];const n=e.getElementsByTagName("NonLinear");return n.length&&(t=n[0].getElementsByTagName("StaticResource")),t},e.extractNodeData=e=>{let t="";for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];8===i.nodeType||3===i.nodeType&&/^\s*$/.test(i.nodeValue)||(t+=i.nodeValue)}return t.replace(/(^\s+|\s+$)/g,"")},e.getAdParametersFromLinear=t=>{const n=t.getElementsByTagName("AdParameters");let i=null;return n.length&&(i=e.extractNodeData(n[0])),i},e.getMediaFileListFromLinear=t=>{const n=[],i=e.getMediaFilesFromLinear(t);if(!i.length)return n;for(let t=0;t<i.length;t++){let r=i[t].getAttribute("mediaType");r||(r="2D"),n.push({src:e.extractNodeData(i[t]),type:i[t].getAttribute("type"),apiFramework:i[t].getAttribute("apiFramework"),codec:i[t].getAttribute("codec"),id:i[t].getAttribute("codec"),fileSize:i[t].getAttribute("fileSize"),delivery:i[t].getAttribute("delivery"),width:i[t].getAttribute("width"),height:i[t].getAttribute("height"),mediaType:r.toLowerCase()})}return n},e.getIconClickThroughFromLinear=t=>{const n=t.getElementsByTagName("IconClickThrough");return n.length?e.extractNodeData(n[0]):""},e.getStaticResourceFromNonLinear=t=>{let n;const i=e.getStaticResourcesFromNonLinear(t);for(let t=0;t<i.length;t++)if(i[t].getAttribute("type")||(n=e.extractNodeData(i[t])),i[t].getAttribute("type")===e.displayOptions.staticResource)return e.extractNodeData(i[t]);return n},e.registerTrackingEvents=(t,n)=>{const i=e.getTrackingFromLinear(t);let r="",a=0;for(let t=0;t<i.length;t++)switch(r=i[t].getAttribute("event"),r){case"start":case"firstQuartile":case"midpoint":case"thirdQuartile":case"complete":void 0===n.tracking[r]&&(n.tracking[r]=[]),void 0===n.stopTracking[r]&&(n.stopTracking[r]=[]),n.tracking[r].push(i[t].childNodes[0].nodeValue),n.stopTracking[r]=!1;break;case"progress":void 0===n.tracking[r]&&(n.tracking[r]=[]),a=e.convertTimeStringToSeconds(i[t].getAttribute("offset")),void 0===n.tracking[r][a]&&(n.tracking[r][a]={elements:[],stopTracking:!1}),n.tracking[r][a].elements.push(i[t].childNodes[0].nodeValue)}},e.registerClickTracking=(e,t)=>
29{if(e&&e.length)for(let n=0;n<e.length;n++)""!==e[n]&&t.clicktracking.push(e[n])},e.registerImpressionEvents=(t,n)=>{if(t.length)for(let i=0;i<t.length;i++){const r=e.extractNodeData(t[i]);n.impression.push(r)}},e.registerErrorEvents=(e,t)=>{null!=e&&1===e.length&&1===e[0].childNodes.length&&(t.errorUrl=e[0].childNodes[0].nodeValue)},e.announceError=t=>{if(void 0===e.vastOptions.errorUrl||!e.vastOptions.errorUrl)return;const n=void 0!==t?parseInt(t):900,i=e.vastOptions.errorUrl.replace("[ERRORCODE]",n);e.callUris([i])},e.getClickTrackingEvents=t=>{const n=[],i=t.getElementsByTagName("VideoClicks");if(!i.length)return;const r=i[0].getElementsByTagName("ClickTracking");if(r.length){for(let t=0;t<r.length;t++){const i=e.extractNodeData(r[t]);n.push(i)}return n}},e.getNonLinearClickTrackingEvents=t=>{const n=[];if(!t.getElementsByTagName("NonLinear").length)return;const i=t.getElementsByTagName("NonLinearClickTracking");if(i.length){for(let t=0;t<i.length;t++){const r=e.extractNodeData(i[t]);n.push(r)}return n}},e.callUris=e=>{for(let t=0;t<e.length;t++)(new Image).src=e[t]},e.recalculateAdDimensions=()=>{const t=document.getElementById(e.videoPlayerId),n=document.getElementById("vast_clickthrough_layer_"+e.videoPlayerId);n&&(n.style.width=t.offsetWidth+"px",n.style.height=t.offsetHeight+"px");const i=e.checkFullscreenSupport("fluid_video_wrapper_"+e.videoPlayerId),r=document.getElementById(e.videoPlayerId+"_fluid_control_fullscreen"),a=document.getElementById(e.videoPlayerId+"context_option_fullscreen");if(i)null===document[i.isFullscreen]?e.fullscreenOff(r,a):e.fullscreenOn(r,a);else{const t=document.getElementById("fluid_video_wrapper_"+e.videoPlayerId);-1!==t.className.search(/\bpseudo_fullscreen\b/g)?(t.className+=" pseudo_fullscreen",e.fullscreenOn(r,a)):(t.className=t.className.replace(/\bpseudo_fullscreen\b/g,""),e.fullscreenOff(r,a))}},e.prepareVast=t=>{let n=e.findRoll(t);for(let i=0;i<n.length;i++){const r=n[i];!0!==e.adList[r].vastLoaded&&!0!==e.adList[r].error&&(e.processVastWithRetries(e.adList[r]),e.domRef.player.addEventListener("adId_"+r,e[t]))}},e.playMainVideoWhenVastFails=t=>{e.debugMessage("playMainVideoWhenVastFails called"),e.domRef.player.removeEventListener("loadedmetadata",e.switchPlayerToVastMode),e.domRef.player.pause(),e.toggleLoader(!1),e.displayOptions.vastOptions.vastAdvanced.noVastVideoCallback(),e.vastOptions&&void 0!==e.vastOptions.errorUrl?e.announceError(t):e.announceLocalError(t),e.switchToMainVideo()},e.switchPlayerToVastMode=()=>{},e.processVastXml=(t,n,i)=>{let r;if(!t)return void i(!1);const a=t.getElementsByTagName("Impression");null!==a&&e.registerImpressionEvents(a,n);const o=t.getElementsByTagName("Error");null!==o&&e.registerErrorEvents(o,n);const s=t.getElementsByTagName("Creative");if(void 0!==s&&s.length){const a=s[0].getElementsByTagName("Linear");if(null!=a&&a.length){const i=a[0];e.registerTrackingEvents(i,n),r=e.getClickTrackingEvents(i),e.registerClickTracking(r,n),!e.hasVastAdTagUri(t)&&e.hasInLine(t)&&(n.adFinished=!1,n.adType="linear",n.vpaid=!1,n.skipoffset=e.convertTimeStringToSeconds(i.getAttribute("skipoffset")),n.clickthroughUrl=e.getClickThroughUrlFromLinear(i),n.duration=e.getDurationFromLinear(i),n.mediaFileList=e.getMediaFileListFromLinear(i),n.adParameters=e.getAdParametersFromLinear(i),n.iconCl
29ick=e.getIconClickThroughFromLinear(i),n.adParameters&&(n.vpaid=!0))}const o=s[0].getElementsByTagName("NonLinearAds");if(null!=o&&o.length){const i=o[0];e.registerTrackingEvents(i,n),r=e.getNonLinearClickTrackingEvents(i),e.registerClickTracking(r,n),!e.hasVastAdTagUri(t)&&e.hasInLine(t)&&(n.adType="nonLinear",n.vpaid=!1,n.clickthroughUrl=e.getClickThroughUrlFromNonLinear(i),n.duration=e.getDurationFromNonLinear(i),n.dimension=e.getDimensionFromNonLinear(i),n.staticResource=e.getStaticResourceFromNonLinear(i),n.creativeType=e.getCreativeTypeFromStaticResources(i),n.adParameters=e.getAdParametersFromLinear(i),n.adParameters&&(n.vpaid=!0))}!e.hasVastAdTagUri(t)&&e.hasInLine(t)&&(void 0!==n.mediaFileList||void 0!==n.staticResource?i(!0,n):i(!1))}else i(!1)},e.processVastWithRetries=t=>{let n=t.vastTag;const i=t.id,r=function(a,o){if(a&&void 0!==o&&o.vpaid&&!e.displayOptions.vastOptions.allowVPAID&&(a=!1,e.announceLocalError("103","VPAID not allowed, so skipping this VAST tag.")),a){if("linear"===o.adType){void 0!==o.iconClick&&null!==o.iconClick&&o.iconClick.length&&(e.adList[i].landingPage=o.iconClick);const t=e.getSupportedMediaFileObject(o.mediaFileList);t&&(e.adList[i].mediaType=t.mediaType)}e.adList[i].adType=o.adType?o.adType:"unknown",e.adList[i].vastLoaded=!0,e.adPool[i]=Object.assign({},o);const t=document.createEvent("Event");if(t.initEvent("adId_"+i,!1,!0),e.domRef.player.dispatchEvent(t),e.displayOptions.vastOptions.vastAdvanced.vastLoadedCallback(),e.hasTitle()){document.getElementById(e.videoPlayerId+"_title").style.display="none"}}else e.announceLocalError("101"),t.hasOwnProperty("fallbackVastTags")&&t.fallbackVastTags.length>0?(n=t.fallbackVastTags.shift(),e.processUrl(n,r)):("preRoll"===t.roll&&e.preRollFail(t),e.adList[i].error=!0)};e.processUrl(n,r)},e.processUrl=(t,n)=>{e.resolveVastTag(t,0,{tracking:[],stopTracking:[],impression:[],clicktracking:[],vastLoaded:!1},n)}
29,e.resolveVastTag=(t,n,i,r)=>{if(!t||""===t)return void r(!1);const a=function(){const t=this;let a=!1;if(4!==t.readyState||404!==t.status)if(4!==t.readyState||0!==t.status){if(4===t.readyState&&200===t.status)if(4!==t.readyState||200===t.status){try{a=t.responseXML}catch(e){return void r(!1)}if(a){if(e.inLineFound=e.hasInLine(a),!e.inLineFound&&e.hasVastAdTagUri(a)){const t=e.getVastAdTagUriFromWrapper(a);if(!t)return void r(!1);e.resolveVastTag(t,n,i,r)}n>e.displayOptions.vastOptions.maxAllowedVastTagRedirects&&!e.inLineFound?r(!1):e.processVastXml(a,i,r)}else r(!1)}else r(!1)}else r(!1);else r(!1)};n<=e.displayOptions.vastOptions.maxAllowedVastTagRedirects&&e.sendRequest(t,!0,e.displayOptions.vastOptions.vastTimeout,a),n++},e.setVastList=()=>{const t={},n={preRoll:[],postRoll:[],midRoll:[],onPauseRoll:[]},i={id:null,roll:null,played:!1,vastLoaded:!1,error:!1,adText:null,adTextPosition:null};let r=0;const a=function(e){let t=!1;return"midRoll"===e.roll&&void 0===e.timer&&(t=!0),t},o=function(t){let n=!1;return t.vastTag||(e.announceLocalError(102,'"vastTag" property is missing from adList.'),n=!0),t.roll||(e.announceLocalError(102,'"roll" is missing from adList.'),n=!0),-1===e.availableRolls.indexOf(t.roll)&&(e.announceLocalError(102,"Only "+e.availableRolls.join(",")+" rolls are supported."),n=!0),t.size&&-1===e.supportedNonLinearAd.indexOf(t.size)&&(e.announceLocalError(102,"Only "+e.supportedNonLinearAd.join(",")+" size are supported."),n=!0),n};if(e.displayOptions.vastOptions.hasOwnProperty("adList"))for(let n in e.displayOptions.vastOptions.adList){let s=e.displayOptions.vastOptions.adList[n];if(o(s)){e.announceLocalError(102,"Wrong adList parameters.");continue}const l="ID"+r;t[l]=Object.assign({},i),t[l]=Object.assign(t[l],e.displayOptions.vastOptions.adList[n]),"midRoll"==s.roll&&(t[l].error=a("midRoll")),t[l].id=l,r++}Object.keys(t).map(function(e){t[e].roll.toLowerCase()==="preRoll".toLowerCase()?n.preRoll.push(t[e]):t[e].roll.toLowerCase()==="midRoll".toLowerCase()?n.midRoll.push(t[e]):t[e].roll.toLowerCase()==="postRoll".toLowerCase()?n.postRoll.push(t[e]):t[e].roll.toLowerCase()==="onPauseRoll".toLowerCase()&&n.onPauseRoll.push(t[e])}),e.adGroupedByRolls=n,e.adList=t},e.onVastAdEnded=t=>{t&&t.stopImmediatePropagation(),e.deleteVastAdElements(),e.checkForNextAd()},e.vastLogoBehaviour=t=>{if(!e.displayOptions.layoutControls.logo.showOverAds){const n=document.getElementById(e.videoPlayerId+"_logo"),i=document.getElementById(e.videoPlayerId+"_logo_image");if(!n||!i)return;n.style.display=t?"none":"inline"}},e.deleteVastAdElements=()=>{e.removeClickthrough(),e.removeSkipButton(),e.removeAdCountdown(),e.removeAdPlayingText(),e.removeCTAButton(),e.vastLogoBehaviour(!1)}},function(e,t){e.createCardboardJoystickButton=t=>{const n=document.getElementById(e.videoPlayerId+"_fluid_vr_joystick_panel"),i=document.createElement("div");return i.id=e.videoPlayerId+"_fluid_vr_joystick_"+t,i.className="fluid_vr_button fluid_vr_joystick_"+t,n.appendChild(i),i},e.cardboardRotateLeftRight=t=>{const n=e.vrROTATION_POSITION,i=-e.vrROTATION_POSITION,r={val:t<1?n:i};new TWEEN.Tween(r).to({val:0},e.vrROTATION_SPEED).easing(TWEEN.Easing.Quadratic.InOut).onUpdate(function(){e.vrViewer.OrbitControls.rotateLeft(r.val)}).start()},e.cardboardRotateUpDown=t=>{const n=e.vrROTATION_POSITION,i=-e.vrROTATION_POSITION,r={val:t<1?n:i};new TWEEN.Tween(r).to({val:0},e.vrROTATION_SPEED).easing(TWEEN.Easing.Quadratic.InOut).onUpdate(function(){e.vrViewer.OrbitControls.rotateUp(r.val)}).start()},e.createCardboardJoystick=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_vr_container"),n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_vr_joystick_panel",n.className="fluid_vr_joystick_panel",t.appendChild(n);const i=e.createCardboardJoystickButton("up"),r=e.createCardboardJoystickButton("left"),a=e.createCardboardJoystickButton("right"),o=e.createCardboardJoystickButton("down"),s=e.createCardboardJoystickButton("zoomdefault"),l=e.createCardboardJoystickButton("zoomin"),u=e.createCardboardJoystickButton("zoomout");i.addEventListener("click",function(){e.cardboardRotateUpDown(1)}),o.addEventListener("click",function(){e.cardboardRotateUpDown(0)}),a.addEventListener("click",function(){e.cardboardRotateLeftRight(0)}),r.addEventListener("click",function(){e.cardboardRotateLeftRight(1)}),s.addEventListener("click",function(){e.vrViewer.camera.fov=60,e.vrViewer.camera.updateProjectionMatrix()}),u.addEventListener("click",function(){e.vrViewer.camera.fov*=1.1,e.vrViewer.camera.updateProjectionMatrix()}),l.addEventListener("click",function(){e.vrViewer.camera.fov*=.9,e.vrViewer.camera.updateProjectionMatrix()})},e.cardBoardResize=()=>{e.domRef.player.addEventListener("theatreModeOn",function(){e.vrViewer.onWindowResize()}),e.domRef.player.addEventListener("theatreModeOff",function(){e.vrViewer.onWindowResize()})},e.cardBoardSwitchToNormal=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_vr_joystick_panel"),n=document.getElementById(e.videoPlayerId+"_fluid_controls_container"),i=e.domRef.player;e.vrViewer.enableEffect(PANOLENS.MODES.NORMAL),e.vrViewer.onWindowResize(),e.vrMode=!1;const r=i.parentNode.getElementsByClassName("fluid_vr2_controls_container")[0];i.parentNode.removeChild(r),e.displayOptions.layoutControls.showCardBoardJoystick&&t&&(t.style.display="block"),n.classList.remove("fluid_vr_controls_container");document.getElementById(e.videoPlayerId+"_fluid_control_volume_container").style.display="block";const a=document.getElementById("ad_countdown"+e.videoPlayerId),o=document.getElementById(e.videoPlayerId+"_fluid_cta"),s=document.getElementById(e.videoPlayerId+"_fluid_ad_playing"),l=document.getElementById("skip_button_"+e.videoPlayerId);a&&(a.style.display="block"),o&&(o.style.display="block"),s&&(s.style.display="block"),l&&(l.style.display="block")},e.cardBoardHideDefaultControls=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_vr_joystick_panel"),n=document.getElementById(e.videoPlayerId+"_fluid_initial_play"),i=document.getElementById(e.videoPlayerId+"_fluid_control_volume_container");e.displayOptions.layoutControls.showCardBoardJoystick&&t&&(t.style.display="none"),n&&(document.getElementById(e.videoPlayerId+"_fluid_initial_play").style.display="none",document.getElementById(e.videoPlayerId+"_fluid_initial_play_button").style.opacity="1"),i.style.display="none"}
29,e.cardBoardCreateVRControls=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_controls_container").cloneNode(!0);t.removeAttribute("id"),t.querySelectorAll("*").forEach(function(e){e.removeAttribute("id")}),t.classList.add("fluid_vr2_controls_container"),e.domRef.player.parentNode.insertBefore(t,e.domRef.player.nextSibling),e.copyEvents(t)},e.cardBoardSwitchToVR=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_controls_container");e.vrViewer.enableEffect(PANOLENS.MODES.CARDBOARD),e.vrViewer.onWindowResize(),e.vrViewer.disableReticleControl(),e.vrMode=!0,t.classList.add("fluid_vr_controls_container"),e.cardBoardHideDefaultControls(),e.cardBoardCreateVRControls();const n=document.getElementById("ad_countdown"+e.videoPlayerId),i=document.getElementById(e.videoPlayerId+"_fluid_cta"),r=document.getElementById(e.videoPlayerId+"_fluid_ad_playing"),a=document.getElementById("skip_button_"+e.videoPlayerId);n&&(n.style.display="none"),i&&(i.style.display="none"),r&&(r.style.display="none"),a&&(a.style.display="none")},e.cardBoardMoveTimeInfo=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_duration"),n=document.getElementById(e.videoPlayerId+"_fluid_controls_container");t.classList.add("cardboard_time"),n.appendChild(t),e.controlDurationUpdate=function(){const t=e.formatTime(e.domRef.player.currentTime),n=e.formatTime(e.currentVideoDuration),i=e.domRef.player.parentNode.getElementsByClassName("fluid_control_duration");let r="";if(e.isCurrentlyPlayingAd){r="<span class='ad_timer_prefix'>AD : </span>"+t+" / "+n;for(let e=0;e<i.length;e++)i[e].classList.add("ad_timer_prefix")}else{r=t+" / "+n;for(let e=0;e<i.length;e++)i[e].classList.remove("ad_timer_prefix")}for(let e=0;e<i.length;e++)i[e].innerHTML=r}},e.cardBoardAlterDefaultControls=()=>{e.cardBoardMoveTimeInfo()},e.createCardboardView=()=>{const t=document.createElement("div");t.id=e.videoPlayerId+"_fluid_vr_container",t.className="fluid_vr_container",e.domRef.player.parentNode.insertBefore(t,e.domRef.player.nextSibling),PANOLENS.VideoPanorama.prototype.pauseVideo=function(){},PANOLENS.VideoPanorama.prototype.playVideo=function(){},e.vrPanorama=new PANOLENS.VideoPanorama("",{videoElement:e.domRef.player,autoplay:e.displayOptions.layoutControls.autoPlay}),e.vrViewer=new PANOLENS.Viewer({container:t,controlBar:!0,controlButtons:[],enableReticle:!1}),e.vrViewer.add(e.vrPanorama),e.vrViewer.enableEffect(PANOLENS.MODES.NORMAL),e.vrViewer.onWindowResize(),"Android"!==e.getMobileOs().userOs&&"iOS"!==e.getMobileOs().userOs||e.vrViewer.enableControl(1),e.cardBoardAlterDefaultControls(),e.cardBoardResize(),e.vrViewer.initialCameraPosition=JSON.parse(JSON.stringify(e.vrViewer.camera.position)),e.displayOptions.layoutControls.showCardBoardJoystick&&("Android"!==e.getMobileOs().userOs&&"iOS"!==e.getMobileOs().userOs&&e.createCardboardJoystick(),e.vrViewer.OrbitControls.noZoom=!0),e.trackEvent(e.domRef.player.parentNode,"click",".fluid_control_cardboard",function(){e.vrMode?e.cardBoardSwitchToNormal():e.cardBoardSwitchToVR()})},e.createCardboard=()=>
29{e.displayOptions.layoutControls.showCardBoardView&&(document.getElementById(e.videoPlayerId+"_fluid_control_cardboard").style.display="inline-block",window.PANOLENS?e.createCardboardView():n.e(0).then(n.bind(null,264)).then(t=>{window.PANOLENS=t,e.createCardboardView()}))}},function(e,t){e.subtitleFetchParse=t=>{e.sendRequest(t.url,!0,e.displayOptions.vastOptions.vastTimeout,function(){const t=this;if(4===t.readyState&&200!==t.status)return;if(4!==t.readyState||200!==t.status)return;const n=t.responseText,i=new WebVTT.Parser(window,WebVTT.StringDecoder()),r=[],a=[];i.oncue=function(e){r.push(e)},i.onregion=function(e){a.push(e)},i.parse(n),i.flush(),e.subtitlesData=r})},e.createSubtitlesSwitch=()=>{const t="OFF";if(e.subtitlesData=[],!e.displayOptions.layoutControls.subtitlesEnabled)return void(document.getElementById(e.videoPlayerId+"_fluid_control_subtitles").style.display="none");const n=[];n.push({label:t,url:"na",lang:t});const i=e.domRef.player.querySelectorAll("track");[].forEach.call(i,function(e){"metadata"===e.kind&&e.src&&n.push({label:e.label,url:e.src,lang:e.srclang})}),e.subtitlesTracks=n;const r=document.getElementById(e.videoPlayerId+"_fluid_control_subtitles");r.style.display="inline-block";let a=!1;const o=document.createElement("div");o.id=e.videoPlayerId+"_fluid_control_subtitles_list",o.className="fluid_subtitles_list",o.style.display="none";let s=!0;e.subtitlesTracks.forEach(function(n){const i=s?"subtitle_selected":"";s=!1;const r=document.createElement("div");r.id="subtitle_"+e.videoPlayerId+"_"+n.label,r.className="fluid_subtitle_list_item",r.innerHTML='<span class="subtitle_button_icon '+i+'"></span>'+n.label,r.addEventListener("click",function(n){n.stopPropagation();const i=this,r=document.getElementsByClassName("subtitle_button_icon");for(let e=0;e<r.length;e++)r[e].className=r[e].className.replace("subtitle_selected","");i.firstChild.className+=" subtitle_selected",e.subtitlesTracks.forEach(function(n){n.label===i.innerText.replace(/(\r\n\t|\n|\r\t)/gm,"")&&(n.label===t?e.subtitlesData=[]:e.subtitleFetchParse(n))}),e.openCloseSubtitlesSwitch()}),o.appendChild(r),a=!0}),a?(r.appendChild(o),r.addEventListener("click",function(){e.openCloseSubtitlesSwitch()})):document.getElementById(e.videoPlayerId+"_fluid_control_subtitles").style.display="none";e.domRef.player.addEventListener("timeupdate",function(){e.renderSubtitles()})},e.renderSubtitles=()=>{const t=e.domRef.player;let n=Math.floor(t.currentTime),i=!1,r=document.getElementById(e.videoPlayerId+"_fluid_subtitles_container");if(e.isCurrentlyPlayingAd)r.innerHTML="";else{for(let t=0;t<e.subtitlesData.length;t++)n>=e.subtitlesData[t].startTime&&n<=e.subtitlesData[t].endTime&&(r.innerHTML="",r.appendChild(WebVTT.convertCueToDOMTree(window,e.subtitlesData[t].text)),i=!0);i||(r.innerHTML="")}},e.openCloseSubtitlesSwitch=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_subtitles_list");if(e.isCurrentlyPlayingAd)t.style.display="none";else if("none"===t.style.display){t.style.display="block";const e=function(n){t.removeEventListener("mouseleave",e),t.style.display="none"};t.addEventListener("mouseleave",e)}else t.style.display="none"},e.createSubtitles=()=>{const t=document.createElement("div");t.id=e.videoPlayerId+"_fluid_subtitles_container",t.className="fluid_subtitles_container",e.domRef.player.parentNode.insertBefore(t,e.domRef.player.nextSibling),e.displayOptions.layoutControls.subtitlesEnabled&&n.e(0).then(n.t.bind(null,265,7)).then(t=>{window.WebVTT=t.WebVTT,e.createSubtitlesSwitch()})}},function(e,t){e.setupThumbnailPreviewVtt=()=>{e.sendRequest(e.displayOptions.layoutControls.timelinePreview.file,!0,e.displayOptions.vastOptions.vastTimeout,function(){const t=this;if(4===t.readyState&&200!==t.status)return;if(4!==t.readyState||200!==t.status)return;const n=t.responseText,i=(new window.WebVTTParser).parse(n);e.timelinePreviewData=function(t){if(void 0===t.cues||!t.cues.length)return[];const n=[];let i=null,r=null;for(let a=0;a<t.cues.length;a++){i=t.cues[a].text.split("#");let o,s=0,l=0,u=122.5,d=69;2===i.length&&0===i[1].indexOf("xywh=")&&(r=i[1].substring(5),r=r.split(","),4===r.length&&(e.displayOptions.layoutControls.timelinePreview.spriteImage=!0,s=parseInt(r[0]),l=parseInt(r[1]),u=parseInt(r[2]),d=parseInt(r[3]))),!e.dis
29playOptions.layoutControls.timelinePreview.spriteRelativePath||-1===e.displayOptions.layoutControls.timelinePreview.file.indexOf("/")||void 0!==e.displayOptions.layoutControls.timelinePreview.sprite&&""!==e.displayOptions.layoutControls.timelinePreview.sprite?o=e.displayOptions.layoutControls.timelinePreview.sprite?e.displayOptions.layoutControls.timelinePreview.sprite:i[0]:(o=e.displayOptions.layoutControls.timelinePreview.file.substring(0,e.displayOptions.layoutControls.timelinePreview.file.lastIndexOf("/")),o+="/"+i[0]),n.push({startTime:t.cues[a].startTime,endTime:t.cues[a].endTime,image:o,x:s,y:l,w:u,h:d})}return n}(i)})},e.generateTimelinePreviewTags=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container"),n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_timeline_preview_container",n.className="fluid_timeline_preview_container",n.style.display="none",n.style.position="absolute",t.appendChild(n);const i=document.createElement("div");i.id=e.videoPlayerId+"_fluid_timeline_preview_container_shadow",i.className="fluid_timeline_preview_container_shadow",i.style.position="absolute",i.style.display="none",i.style.opacity=1,t.appendChild(i)},e.getThumbnailCoordinates=t=>{if(e.timelinePreviewData.length)for(let n=0;n<e.timelinePreviewData.length;n++)if(t>=e.timelinePreviewData[n].startTime&&t<=e.timelinePreviewData[n].endTime)return e.timelinePreviewData[n];return!1},e.drawTimelinePreview=t=>{const n=document.getElementById(e.videoPlayerId+"_fluid_timeline_preview_container"),i=document.getElementById(e.videoPlayerId+"_fluid_timeline_preview_container_shadow"),r=document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container"),a=r.clientWidth;if(e.isCurrentlyPlayingAd)return void("none"!==n.style.display&&(n.style.display="none"));const o=e.getEventOffsetX(t,r);let s=null;if(a){s=e.currentVideoDuration*o/a;const t=e.getThumbnailCoordinates(s);i.style.width=a+"px",i.style.display="block",!1!==t?(n.style.width=t.w+"px",n.style.height=t.h+"px",i.style.height=t.h+"px",n.style.background="url("+t.image+") no-repeat scroll -"+t.x+"px -"+t.y+"px",n.style.left=o-t.w/2+"px",n.style.display="block",e.displayOptions.layoutControls.timelinePreview.spriteImage||(n.style.backgroundSize="contain")):n.style.display="none"}},e.setupThumbnailPreview=()=>{if(e.displayOptions.layoutControls.timelinePreview&&"string"==typeof e.displayOptions.layoutControls.timelinePreview.file&&"string"==typeof e.displayOptions.layoutControls.timelinePreview.type){if("VTT"===e.displayOptions.layoutControls.timelinePreview.type){let t="mousemove",i="mouseleave";e.mobileInfo.userOs&&(t="touchmove",i="touchend"),document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container").addEventListener(t,e.drawTimelinePreview.bind(e),!1),document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container").addEventListener(i,function(t){const n=document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container");void 0!==t.clientX&&n.contains(document.elementFromPoint(t.clientX,t.clientY))||(document.getElementById(e.videoPlayerId+"_fluid_timeline_preview_container").style.display="none",document.getElementById(e.videoPlayerId+"_fluid_timeline_preview_container_shadow").style.display="none")},!1),e.generateTimelinePreviewTags(),n.e(0).then(n.bind(null,266)).then(t=>{window.WebVTTParser=t.default,e.setupThumbnailPreviewVtt()})}e.showTimeOnHover=!1}}},function(e,t){const n="2.0";e.renderLinearAd=(t,i)=>{e.toggleLoader(!0),e.vastOptions=e.adPool[t],i&&e.backupMainVideoContentTime(t);const r=()=>{if(e.adFinished)return void e.domRef.player.removeEventListener("timeupdate",r);const t=Math.floor(e.domRef.player.currentTime);0!==e.vastOptions.duration&&e.scheduleTrackingEvent(t,e.vastOptions.duration),t>=e.vastOptions.duration-1&&0!==e.vastOptions.duration&&(e.domRef.player.removeEventListener("timeupdate",r),e.adFinished=!0)};(t=>{e.switchPlayerToVpaidMode=t=>{e.debugMessage("starting function switchPlayerToVpaidMode");const i=e.videoPlayerId+"_"+t+"_fluid_vpaid_iframe",r={};r.AdParameters=e.adPool[t].adParameters;const a=document.createElement("div");a.id=e.videoPlayerId+"_fluid_vpaid_slot",a.className="fluid_vpaid_slot",a.setAttribute("adListId",t),e.domRef.player.parentNode.insertBefore(a,i.nextSibling);const o={slot:a,videoSlot:e.domRef.player,videoSlotCanAutoPlay:!0},s=e.vpaidAdUnit.handshakeVersion(n);if(1===e.compareVersion(n,s))return e.adList[t].error=!0,e.playMainVideoWhenVpaidFails(403),!1;!1!==e.vastOptions.skipoffset&&e.addSkipButton(),e.domRef.player.loop=!1,e.domRef.player.removeAttribute("controls"),e.vpaidCallbackListenersAttach();const l=e.fullscreenMode?"fullscreen":"normal",u=e.domRef.player.offsetWidth,d=e.domRef.player.offsetHeight;e.vpaidAdUnit.initAd(u,d,l,3e3,r,o);const c=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_currentprogress");for(let t=0;t<c.length;t++)c[t].style.backgroundColor=e.displayOptions.layoutControls.adProgressColor;e.toggleLoader(!1),e.adList[t].played=!0,e.adFinished=!1},e.switchPlayerToVastMode=()=>{if(e.vastOptions.duration||(e.vastOptions.duration=e.domRef.player.duration),e.displayOptions.layoutControls.showCardBoardView)e.adList[t].landingPage?e.addCTAButton(e.adList[t].landingPage):e.addCTAButton(e.adPool[t].clickthroughUrl);else{(void 0!==e.adList[t].adClickable?e.adList[t].adClickable:e.displayOptions.vastOptions.adClickable)&&e.addClickthroughLayer(e.videoPlayerId),e.addCTAButton(e.adList[t].landingPage)}!1!==e.vastOptions.skipoffset&&e.addSkipButton(),e.domRef.player.loop=!1,e.addAdCountdown(),e.domRef.player.removeAttribute("controls"),e.vastLogoBehaviour(!0);const n=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_currentprogress");for(let t=0;t<n.length;t++)n[t].style.backgroundColor=e.displayOptions.layoutControls.adProgressColor;if(e.displayOptions.vastOptions.adText||e.adList[t].adText){const n=null!==e.adList[t].adText?e.adList[t].adText:e.displayOptions.vastOptions.adText;e.addAdPlayingText(n)}if(e.positionTextElements(e.adList[t]),e.toggleLoader(!1),e.adList[t].played=!0,e.adFinished=!1,e.domRef.player.play(),e.trackSingleEvent("impression"),e.domRef.player.removeEventListener("loadedmetadata",e.switchPlayerToVastMode),!e.vrMode){const t=document.getElementById("ad_countdown"+e.videoPlayerId),n=document.getElementById(e.videoPlayerId+"_fluid_cta"),i=document.getElementById(e.videoPlayerId+"_fluid_ad_playing"),r=document.getElementById("skip_button_"+e.videoPlayerId);t&&(t.style.display="none"),n&&(n.style.display="none"),i&&(i.style.display="none"),r&&(r.style.display="none")}},e.domRef.player.pause(),e.detachStreamers();
29const i=e.getSupportedMediaFileObject(e.vastOptions.mediaFileList);if(e.displayOptions.layoutControls.showCardBoardView&&"360"!==e.adList[t].mediaType)return e.adList[t].error=!0,e.playMainVideoWhenVastFails(403),!1;if(e.vastOptions.vpaid)e.loadVpaid(t,i.src),e.displayOptions.vastOptions.showProgressbarMarkers&&e.hideAdMarkers();else{if(!1===i.src)return e.adList[t].error=!0,e.playMainVideoWhenVastFails(403),!1;e.domRef.player.addEventListener("loadedmetadata",e.switchPlayerToVastMode),e.domRef.player.src=i.src,e.isCurrentlyPlayingAd=!0,e.displayOptions.vastOptions.showProgressbarMarkers&&e.hideAdMarkers(),e.domRef.player.load(),e.domRef.player.addEventListener("ended",e.onVastAdEnded)}})(t),e.domRef.player.addEventListener("timeupdate",r)},e.playRoll=t=>{for(let n=0;n<t.length;n++){if(!e.adPool.hasOwnProperty(t[n]))return void e.announceLocalError(101);e.temporaryAdPods.push(e.adList[t[n]])}if(null!==e.vastOptions&&"linear"===e.vastOptions.adType.toLowerCase())return;const n=e.getNextAdPod();null!==n&&e.renderLinearAd(n,!0)},e.backupMainVideoContentTime=t=>{switch(e.adList[t].roll){case"midRoll":e.domRef.player.mainVideoCurrentTime=e.domRef.player.currentTime-1;break;case"postRoll":e.domRef.player.mainVideoCurrentTime=e.mainVideoDuration,e.autoplayAfterAd=!1,e.domRef.player.currentTime=e.mainVideoDuration;break;case"preRoll":e.domRef.player.currentTime>0&&(e.domRef.player.mainVideoCurrentTime=e.domRef.player.currentTime-1)}},e.getSupportedMediaFileObject=t=>{let n=null,i=!1;if(t.length)for(let r=0;r<t.length;r++){if("VPAID"===t[r].apiFramework){n=t[r],i=!0;break}{const a=e.getMediaFileTypeSupportLevel(t[r].type);if("maybe"!==a&&"probably"!==a||(n=t[r],i=!0),"probably"===a)break}}return!1!==i&&n},e.getMediaFileTypeSupportLevel=e=>{if(null===e)return null;let t=document.createElement("video").canPlayType(e);return t||"no"},e.scheduleTrackingEvent=(t,n)=>{0===t&&e.trackSingleEvent("start"),void 0!==e.vastOptions.tracking.progress&&e.vastOptions.tracking.progress.length&&void 0!==e.vastOptions.tracking.progress[t]&&e.trackSingleEvent("progress",t),t===Math.floor(n/4)&&e.trackSingleEvent("firstQuartile"),t===Math.floor(n/2)&&e.trackSingleEvent("midpoint"),t===Math.floor(3*n/4)&&e.trackSingleEvent("thirdQuartile"),t>=n-1&&e.trackSingleEvent("complete")},e.trackSingleEvent=(t,n)=>{if(void 0===e.vastOptions||null===e.vastOptions)return;let i=[];switch(i.length=0,t){case"start":case"firstQuartile":case"midpoint":case"thirdQuartile":case"complete":!1===e.vastOptions.stopTracking[t]&&(null!==e.vastOptions.tracking[t]&&(i=e.vastOptions.tracking[t]),e.vastOptions.stopTracking[t]=!0);break;case"progress":e.vastOptions.tracking.progress[n].elements.forEach(function(t,r){!1===e.vastOptions.tracking.progress[n].stopTracking&&e.vastOptions.tracking.progress[n].elements.length&&(i=e.vastOptions.tracking.progress[n].elements),e.vastOptions.tracking.progress[n].stopTracking=!0});break;case"impression":void 0!==e.vastOptions.impression&&null!==e.vastOptions.impression&&void 0!==e.vastOptions.impression.length&&(i=e.vastOptions.impression)}e.callUris(i)},e.completeNonLinearStatic=t=>{e.closeNonLinear(t),!1===e.adFinished&&(e.adFinished=!0,e.trackSingleEvent("complete")),clearInterval(e.nonLinearTracking)},e.createNonLinearStatic=t=>{if(!e.adPool.hasOwnProperty(t)||!0===e.adPool[t].error)return void e.announceLocalError(101);if(e.vastOptions=e.adPool[t],e.createBoard(t),!0===e.adList[t].error)return;if(e.adFinished=!1,!e.vastOptions.vpaid){e.trackSingleEvent("start");const n=e.adList[t].nonLinearDuration?e.adList[t].nonLinearDuration:e.vastOptions.duration;e.nonLinearTracking=setInterval(function(){if(!0===e.adFinished)return;const t=Math.floor(e.domRef.player.currentTime);e.scheduleTrackingEvent(t,n),t>=n-1&&(e.adFinished=!0)},400)}const n=parseInt(e.getCurrentTime())+parseInt(void 0);e.scheduleTask({time:n,closeStaticAd:t})},e.createVpaidNonLinearBoard=t=>{const i=e.adPool[t];e.loadVpaidNonlinearAssets=function(t){e.debugMessage("starting function switchPlayerToVpaidMode");const r=e.adList[t].vAlign?e.adList[t].vAlign:e.nonLinearVerticalAlign,a=e.adList[t].vpaidNonLinearCloseButton?e.adList[t].vpaidNonLinearCloseButton:e.vpaidNonLinearCloseButton,o=e.videoPlayerId+"_"+t+"_fluid_vpaid_iframe",s={};s.AdParameters=e.adPool[t].adParameters;const l=document.createElement("div");l.id="fluid_vpaidNonLinear_"+t,l.className="fluid_vpaidNonLinear_"+r,l.className+=" fluid_vpaidNonLinear_ad",l.
29setAttribute("adListId",t);let u=Math.min(468,e.domRef.player.offsetWidth),d=Math.min(60,Math.floor(e.domRef.player.offsetHeight/4));if(void 0!==e.adList[t].size){const n=e.adList[t].size.split("x");u=n[0],d=n[1]}else i.dimension.width&&i.dimension.height&&(u=i.dimension.width,d=i.dimension.height);if(l.style.width="100%",l.style.height=d+"px",a){const n=document.createElement("div");n.className="fluid_vpaidNonLinear_frame",n.style.width=u+"px",n.style.height=d+"px",l.appendChild(n);const i=document.createElement("div");i.id="close_button_"+e.videoPlayerId,i.className="close_button",i.innerHTML="",i.title=e.displayOptions.layoutControls.closeButtonCaption;const r=t;i.onclick=function(t){if(e.hardStopVpaidAd(""),void 0!==t.stopImmediatePropagation&&t.stopImmediatePropagation(),e.adFinished=!0,"onPauseRoll"===e.adList[r].roll&&e.onPauseRollAdPods[0]){const t=e.onPauseRollAdPods[0];e.createBoard(t),e.currentOnPauseRollAd=e.onPauseRollAdPods[0],delete e.onPauseRollAdPods[0]}return!1},n.appendChild(i)}const c=document.createElement("iframe");c.id=e.videoPlayerId+"non_linear_vapid_slot_iframe",c.className="fluid_vpaid_nonlinear_slot_iframe",c.setAttribute("width",u+"px"),c.setAttribute("height",d+"px"),c.setAttribute("sandbox","allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"),c.setAttribute("frameborder","0"),c.setAttribute("scrolling","no"),c.setAttribute("marginwidth","0"),c.setAttribute("marginheight","0"),l.appendChild(c),e.domRef.player.parentNode.insertBefore(l,o.nextSibling);const f=c.contentWindow.document.createElement("div");c.contentWindow.document.body.appendChild(f),e.vastOptions.slotIframe=c,e.vastOptions.slotFrame=void 0;const h={slot:f,videoSlot:e.domRef.player,videoSlotCanAutoPlay:!0};e.debugMessage(e.adList[t]);const p=e.vpaidAdUnit.handshakeVersion(n);if(1===e.compareVersion(n,p))return e.adList[t].error=!0,e.playMainVideoWhenVpaidFails(403),!1;e.domRef.player.loop=!1,e.domRef.player.removeAttribute("controls"),e.vpaidCallbackListenersAttach();const m=e.fullscreenMode?"fullscreen":"normal";e.vpaidAdUnit.initAd(u,d,m,3e3,s,h),e.toggleLoader(!1),e.adList[t].played=!0,e.adFinished=!1},e.loadVpaid(t,i.staticResource),e.debugMessage("create non linear vpaid")},e.createNonLinearBoard=t=>{const n=e.adPool[t];e.adList[t].played=!0;const i=e.domRef.player.clientWidth,r=(e.domRef.player.clientHeight,document.createElement("div")),a=e.adList[t].vAlign?e.adList[t].vAlign:e.nonLinearVerticalAlign,o=new Image;o.src=n.staticResource,o.id="fluid_nonLinear_imgCreative_"+t+"_"+e.videoPlayerId,o.onerror=function(){e.adList[t].error=!0,e.announceError(500)},o.onload=function(){let r,a,s,l;void 0!==e.adList[t].size?(r=e.adList[t].size.split("x")[0],a=e.adList[t].size.split("x")[1]):n.dimension.width&&n.dimension.height?(r=n.dimension.width,a=n.dimension.height):(r=o.width,a=o.height),r>i?(s=i-5,l=a*s/r):(s=r,l=a),"onPauseRoll"!==e.adList[t].roll&&(document.getElementById("fluid_nonLinear_"+t).style.display="");const u=document.getElementById(o.id);u.width=s,u.height=l,e.trackSingleEvent("impression")},r.id="fluid_nonLinear_"+t,r.className="fluid_nonLinear_"+a,r.className+=" fluid_nonLinear_ad",r.innerHTML=o.outerHTML,r.style.display="none",r.onclick=function(){void 0!==n.clickthroughUrl&&window.open(n.clickthroughUrl),void 0!==n.clicktracking&&e.callUris([n.clicktracking])},void 0!==n.clickthroughUrl&&(r.style.cursor="pointer");const s=document.createElement("div");s.id="close_button_"+e.videoPlayerId,s.className="close_button",s.innerHTML="",s.title=e.displayOptions.layoutControls.closeButtonCaption;const l=t;s.onclick=function(t){if(this.parentElement.removeChild(this),void 0!==t.stopImmediatePropagation&&t.stopImmediatePropagation(),e.adFinished=!0,clearInterval(e.nonLinearTracking),"onPauseRoll"===e.adList[l].roll&&e.onPauseRollAdPods[0]){const t=e.onPauseRollAdPods[0];e.createBoard(t),e.currentOnPauseRollAd=e.onPauseRollAdPods[0],delete e.onPauseRollAdPods[0]}return!1},r.appendChild(s),e.domRef.player.parentNode.insertBefore(r,e.domRef.player.nextSibling)},e.createBoard=t=>{const n=e.adPool[t];if(n.vpaid)e.hardStopVpaidAd(""),e.createVpaidNonLinearBoard(t);else{if(void 0===n.staticResource||-1===e.supportedStaticTypes.indexOf(n.creativeType))return e.adList[t].error=!0,void(e.vastOptions&&void 0!==e.vastOptions.errorUrl?e.announceError(503):e.announce
29LocalError(503));e.createNonLinearBoard(t)}},e.closeNonLinear=e=>{const t=document.getElementById("fluid_nonLinear_"+e);t&&t.remove()},e.rollGroupContainsLinear=t=>{let n=!1;for(let i=0;i<t.length;i++)if(e.adList[t[i].id].adType&&"linear"===e.adList[t[i].id].adType){n=!0;break}return n},e.rollGroupContainsNonlinear=t=>{let n=!1;for(let i=0;i<t.length;i++)if("nonlinear"===e.adList[t[i].id].adType.toLowerCase()){n=!0;break}return n},e.preRollFail=()=>{const t=e.preRollAdPodsLength;e.preRollVastResolved++,e.preRollVastResolved===t&&e.preRollAdsPlay()},e.preRollSuccess=()=>{const t=e.preRollAdPodsLength;e.preRollVastResolved++,e.preRollVastResolved===t&&e.preRollAdsPlay()},e.preRollAdsPlay=()=>{const t=e.preRollAdPods,n={linear:[],nonLinear:[]};e.firstPlayLaunched=!0;for(let i=0;i<t.length;i++){if(!0===e.adList[t[i]].played)return;"linear"===e.adList[t[i]].adType&&n.linear.push(t[i]),"nonLinear"===e.adList[t[i]].adType&&(n.nonLinear.push(t[i]),e.scheduleTask({time:0,playRoll:"midRoll",adListId:n.nonLinear.shift()}))}n.linear.length>0?(e.toggleLoader(!0),e.playRoll(n.linear)):e.playMainVideoWhenVastFails(900)},e.preRoll=t=>{const n=t.vastObj;e.domRef.player.removeEventListener(t.type,e.preRoll);const i=[];i[0]=t.type.replace("adId_","");!0!==e.adList[i[0]].played&&(e.preRollAdPods.push(i[0]),e.preRollSuccess(n))},e.createAdMarker=(t,n)=>{const i=document.getElementById(e.videoPlayerId+"_ad_markers_holder"),r=document.createElement("div");r.id="ad_marker_"+e.videoPlayerId+"_"+t,r.className="fluid_controls_ad_marker",r.style.left=n/e.mainVideoDuration*100+"%",e.isCurrentlyPlayingAd&&(r.style.display="none"),i.appendChild(r)},e.hideAdMarker=t=>{const n=document.getElementById("ad_marker_"+e.videoPlayerId+"_"+t);n&&(n.style.display="none")},e.showAdMarkers=()=>{const t=document.getElementById(e.videoPlayerId+"_ad_markers_holder").getElementsByClassName("fluid_controls_ad_marker"),n="ad_marker_"+e.videoPlayerId+"_";for(let i=0;i<t.length;++i){const r=t[i],a=r.id.replace(n,"");!1===e.adList[a].played&&(r.style.display="")}},e.hideAdMarkers=()=>{const t=document.getElementById(e.videoPlayerId+"_ad_markers_holder").getElementsByClassName("fluid_controls_ad_marker");for(let e=0;e<t.length;++e){t[e].style.display="none"}},e.midRoll=t=>{e.domRef.player.removeEventListener(t.type,e.midRoll);const n=t.type.replace("adId_","");if(!0===e.adList[n].played)return;let i=e.adList[n].timer;"string"==typeof i&&-1!==i.indexOf("%")&&(i=i.replace("%",""),i=Math.floor(e.mainVideoDuration/100*i)),e.displayOptions.vastOptions.showProgressbarMarkers&&"nonLinear"===e.adList[n].adType&&e.createAdMarker(n,i),e.scheduleTask({time:i,playRoll:"midRoll",adListId:n})},e.postRoll=t=>{e.domRef.player.removeEventListener(t.type,e.postRoll);const n=t.type.replace("adId_","");e.scheduleTask({time:Math.floor(e.mainVideoDuration),playRoll:"postRoll",adListId:n})},e.onPauseRoll=t=>{e.domRef.player.removeEventListener(t.type,e.onPauseRoll);const n=t.type.replace("adId_","");if("nonLinear"===e.adList[n].adType){if(!e.adPool.hasOwnProperty(n)||!0===e.adPool[n].error)return void e.announceLocalError(101);if(document.getElementsByClassName("fluid_nonLinear_ad")[0])e.onPauseRollAdPods.push(n);else{e.createBoard(n),e.currentOnPauseRollAd=n;let t=document.getElementById("fluid_nonLinear_"+n);t&&(t.style.display="none")}}},e.hasValidOnPauseAd=()=>{const t=e.findRoll("onPauseRoll");return 0!==t.length&&e.adList[t[0]]&&!1===e.adList[t[0]].error},e.toggleOnPauseAd=()=>{if(e.hasValidOnPauseAd()&&!e.isCurrentlyPlayingAd){const t=e.findRoll("onPauseRoll");let n;n=""!==e.currentOnPauseRollAd?e.currentOnPauseRollAd:t[0],e.vastOptions=e.adPool[n];const i=document.getElementById("fluid_nonLinear_"+n);i&&e.domRef.player.paused?setTimeout(function(){i.style.display="flex",e.adList[n].played=!1,e.trackingOnPauseNonLinearAd(n,"start")},500):i&&!e.domRef.player.paused&&(i.style.display="none",e.adFinished=!0,e.trackingOnPauseNonLinearAd(n,"complete"))}},e.trackingOnPauseNonLinearAd=(t,n)=>{e.adPool.hasOwnProperty(t)&&!0!==e.adPool[t].error?(e.vastOptions=e.adPool[t],e.trackSingleEvent(n)):e.announce
29LocalError(101)},e.getLinearAdsFromKeyTime=t=>{const n=[];for(let i=0;i<t.length;i++)!1===e.adList[t[i].adListId].played&&n.push(t[i].adListId);return n},e.adKeytimePlay=t=>{if(!e.timerPool[t]||e.isCurrentlyPlayingAd)return;const n=e.timerPool[t].closeStaticAd.length,i=e.timerPool[t].linear.length,r=e.timerPool[t].nonLinear.length;if(0!==n||0!==i||0!==r){if(n>0){for(let i=0;i<n;i++){const n=e.timerPool[t].closeStaticAd[i].closeStaticAd;!0===e.adList[n].played&&e.completeNonLinearStatic(n)}e.timerPool[t].closeStaticAd=[]}if(i>0){const n=e.getLinearAdsFromKeyTime(e.timerPool[t].linear);if(n.length>0)return e.playRoll(n),void(e.timerPool[t].linear=[])}if(r>0)for(let n=0;n<r;n++){const i=e.timerPool[t].nonLinear[n].adListId;e.adPool[i];if(!1===e.adList[i].played&&!e.displayOptions.layoutControls.showCardBoardView)return e.createNonLinearStatic(i),e.displayOptions.vastOptions.showProgressbarMarkers&&e.hideAdMarker(i),void e.timerPool[t].nonLinear.splice(n,1)}}else delete e.timerPool[t]},e.adTimer=()=>{e.isTimer||(e.isTimer=!e.isTimer,e.timer=setInterval(function(){const t=Math.floor(e.getCurrentTime());e.adKeytimePlay(t)},800))},e.scheduleTask=t=>{e.timerPool.hasOwnProperty(t.time)||(e.timerPool[t.time]={linear:[],nonLinear:[],closeStaticAd:[]}),t.hasOwnProperty("playRoll")&&"linear"===e.adList[t.adListId].adType?e.timerPool[t.time].linear.push(t):t.hasOwnProperty("playRoll")&&"nonLinear"===e.adList[t.adListId].adType?e.timerPool[t.time].nonLinear.push(t):t.hasOwnProperty("closeStaticAd")&&e.timerPool[t.time].closeStaticAd.push(t)},e.switchToMainVideo=()=>{e.debugMessage("starting main video"),e.domRef.player.src=e.originalSrc,e.initialiseStreamers();const t=void 0!==e.domRef.player.mainVideoCurrentTime?e.domRef.player.mainVideoCurrentTime:0;e.domRef.player.hasOwnProperty("currentTime")&&(e.domRef.player.currentTime=t),e.displayOptions.layoutControls.loop&&(e.domRef.player.loop=!0),e.setCurrentTimeAndPlay(t,e.autoplayAfterAd),e.isCurrentlyPlayingAd=!1,e.deleteVastAdElements(),e.adFinished=!0,e.displayOptions.vastOptions.vastAdvanced.vastVideoEndedCallback(),e.vastOptions=null,e.setBuffering();if(null!==document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container")){const t=e.displayOptions.layoutControls.primaryColor?e.displayOptions.layoutControls.primaryColor:"white",n=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_currentprogress");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t}if(e.domRef.player.removeEventListener("ended",e.onVastAdEnded),e.displayOptions.vastOptions.showProgressbarMarkers&&e.showAdMarkers(),e.hasTitle()){document.getElementById(e.videoPlayerId+"_title").style.display="inline"}},e.getNextAdPod=()=>{let t=null;if(e.temporaryAdPods.length>0){t=e.temporaryAdPods.shift().id}return t},e.checkForNextAd=()=>{const t=e.getNextAdPod();null===t?(e.switchToMainVideo(),e.vastOptions=null,e.adFinished=!0):(e.domRef.player.removeEventListener("ended",e.onVastAdEnded),e.isCurrentlyPlayingAd=!1,e.vastOptions=null,e.adFinished=!0,e.renderLinearAd(t,!1))},e.addSkipButton=()=>{const t=document.createElement("div");t.id="skip_button_"+e.videoPlayerId,t.className="skip_button skip_button_disabled",t.innerHTML=e.displayOptions.vastOptions.skipButtonCaption.replace("[seconds]",e.vastOptions.skipoffset),document.getElementById("fluid_video_wrapper_"+e.videoPlayerId).appendChild(t),e.domRef.player.addEventListener("timeupdate",e.decreaseSkipOffset,!1)},e.addAdCountdown=()=>{const t=document.getElementById("fluid_video_wrapper_"+e.videoPlayerId),n=document.createElement("div"),i=e.pad(parseInt(e.currentVideoDuration/60))+":"+e.pad(parseInt(e.currentVideoDuration%60)),r=parseInt(i);n.id="ad_countdown"+e.videoPlayerId,n.className="ad_countdown",n.innerHTML="<span class='ad_timer_prefix'>Ad - </span>"+r,t.appendChild(n),e.domRef.player.addEventListener("timeupdate",e.decreaseAdCountdown,!1),t.addEventListener("mouseover",function(){n.style.display="none"},!1)},e.decreaseAdCountdown=function(){const t=parseInt(e.currentVideoDuration)-parseInt(e.domRef.player.currentTime),n=document.getElementById("ad_countdown"+e.videoPlayerId);n?n.innerHTML="<span class='ad_timer_prefix'>Ad - </span> "+e.pad(parseInt(t/60))+":"+e.pad(parseInt(t%60)):e.domRef.player.removeEventListener("timeupdate",e.decreaseAdCountdown)},e.removeAdCountdown=()=>{const t=document.getElementById("ad_countdown"+e.videoPlayerId);t&&t.parentElement.removeChild(t)},e.toggleAdCountdown=t=>{const n=document.getElementById("ad_countdown"+e.videoPlayerId);n&&(n.style.display=t?"inline-block":"none")},e.addAdPlayingText=t=>{const n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_ad_playing",e.displayOptions.layoutControls.primaryColor&&(n.style.backgroundColor=e.displayOptions.layoutControls.primaryColor,n.style.opacity=1),n.className="fluid_ad_playing",n.innerText=t,document.getElementById("fluid_video_wrapper_"+e.videoPlayerId).appendChild(n)},e.positionTextElements=t=>{const n=["top left","top right","bottom left","bottom right"],i=document.getElementById("skip_button_"+e.videoPlayerId),r=document.getElementById(e.videoPlayerId+"_fluid_ad_playing"),a=document.getElementById(e.videoPlayerId+"_fluid_cta");let o=0,s=0;let l=!1,u=0,d=[];const c={top:{left:{h:34,v:34},right:{h:0,v:34}},bottom:{left:{h:34,v:50},right:{h:0,v:50}}};if(null!==i){u=i.offsetHeight+8;e.domRef.wrapper.classList.contains("mobile")&&(c.bottom.left.v=75,c.bottom.right.v=75)}let f,h,p;null!==a&&(f=e.displayOptions.vastOptions.adCTATextPosition.toLowerCase(),-1===n.indexOf(f)&&(console.log('[FP Error] Invalid position for CTAText. Reverting to "bottom right"'),f="bottom right"),d=f.split(" "),l="bottom"===d[0],a.style[d[0]]=c[d[0]][d[1]].v+"px",a.style[d[1]]=c[d[0]][d[1]].h+"px",l&&"right"===d[1]&&(a.style[d[0]]=c[d[0]][d[1]].v+u+"px"),o=a.offsetHeight+8+"px"),null!==r&&(h=null!==t.adTextPosition?t.adTextPosition.toLowerCase():e.displayOptions.vastOptions.adTextPosition.toLowerCase(),-1===n.indexOf(h)&&(console.log('[FP Error] Invalid position for adText. Reverting to "top left"'),h="top left"),p=h.split(" "),r.style[p[0]]=c[p[0]][p[1]].v+"px",r.style[p[1]]=c[p[0]][p[1]].h+"px",s=r.offsetHeight+8+"px"),o>0&&s>0&&f===h&&(l?"right"===d[1]?r.style.bottom=c[p[0]][p[1]].v+u+o+"px":r.style.bottom=c[p[0]][p[1]].v+o+"px":a.style.top=c[d[0]][d[1]].v+s+"px")},e.removeAdPlayingText=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_ad_playing");t&&t.parentElement.removeChild(t)},e.addCTAButton=t=>{if(!t)return;const n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_cta",n.className="fluid_ad_cta";const i=document.createElement("span");i.innerHTML=e.displayOptions.vastOptions.adCTAText+'<br/><span class="add_icon_clickthrough">'+t+"</span>",n.addEventListener("click",()=>{e.domRef.player.paused||e.domRef.player.pause();return window.open(e.vastOptions.clickthroughUrl,"_blank").focus(),!0},!1),n.appendChild(i),document.getElementById("fluid_video_wrapper_"+e.videoPlayerId).appendChild(n)},e.removeCTAButton=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_cta");t&&t.parentElement.removeChild(t)},e.decreaseSkipOffset=()=>{let t=e.vastOptions.skipoffset-Math.floor(e.domRef.player.currentTime);const n=document.getElementById("skip_button_"+e.videoPlayerId);if(!n)return void e.domRef.player.removeEventListener("timeupdate",e.decreaseSkipOffset);if(t>=1)return void(n.innerHTML=e.displayOptions.vastOptions.skipButtonCaption.replace("[seconds]",t));const i=document.createElement("a");i.href="#",i.id="skipHref_"+e.videoPlayerId,i.innerHTML=e.displayOptions.vastOptions.skipButtonClickCaption,i.onclick=t=>{t.preventDefault(),t.stopPropagation(),e.pressSkipButton()},n.innerHTML="",n.appendChild(i),n.className=n.className.replace(/\bski
vendor: 5,745 bytes, line 29
29p_button_disabled\b/,""),e.domRef.player.removeEventListener("timeupdate",e.decreaseSkipOffset)},e.pressSkipButton=()=>{if(e.removeSkipButton(),e.removeAdPlayingText(),e.removeCTAButton(),e.vastOptions.vpaid)return void e.skipVpaidAd();e.displayOptions.vastOptions.vastAdvanced.vastVideoSkippedCallback();const t=document.createEvent("Event");t.initEvent("ended",!1,!0),e.domRef.player.dispatchEvent(t)},e.removeSkipButton=()=>{const t=document.getElementById("skip_button_"+e.videoPlayerId);t&&t.parentElement.removeChild(t)},e.addClickthroughLayer=()=>{const t=e.domRef.wrapper,n=document.createElement("div");n.className="vast_clickthrough_layer",n.id="vast_clickthrough_layer_"+e.videoPlayerId,n.setAttribute("style","position: absolute; cursor: pointer; top: 0; left: 0; width: "+e.domRef.player.offsetWidth+"px; height: "+e.domRef.player.offsetHeight+"px;"),t.appendChild(n);const i=function(){window.open(e.vastOptions.clickthroughUrl),void 0!==e.vastOptions.clicktracking&&e.callUris(e.vastOptions.clicktracking)},r=document.getElementById("vast_clickthrough_layer_"+e.videoPlayerId),a="iPhone"===e.mobileInfo.device&&!1!==e.mobileInfo.userOsMajor&&e.mobileInfo.userOsMajor<=9;r.onclick=()=>{e.domRef.player.paused?a&&!e.suppressClickthrough?(i(),e.suppressClickthrough=!0):e.domRef.player.play():(i(),e.domRef.player.pause())}},e.removeClickthrough=()=>{const t=document.getElementById("vast_clickthrough_layer_"+e.videoPlayerId);t&&t.parentNode.removeChild(t)}},function(e,t){e.initialiseStreamers=()=>{switch(e.detachStreamers(),e.displayOptions.layoutControls.mediaType){case"application/dash+xml":e.dashScriptLoaded||window.dashjs?e.initialiseDash():(e.dashScriptLoaded=!0,Promise.all([n.e(0),n.e(1)]).then(n.t.bind(null,267,7)).then(t=>{window.dashjs=t.default,e.initialiseDash()}));break;case"application/x-mpegurl":e.hlsScriptLoaded||window.Hls?e.initialiseHls():(e.hlsScriptLoaded=!0,n.e(0).then(n.t.bind(null,268,7)).then(t=>{window.Hls=t.default,e.initialiseHls()}))}},e.initialiseDash=()=>{if("function"==typeof(window.MediaSource||window.WebKitMediaSource)){const n=e.autoplayAfterAd?e.displayOptions.layoutControls.autoPlay:e.autoplayAfterAd,i=dashjs.MediaPlayer().create();i.updateSettings({debug:{logLevel:t.debug?dashjs.Debug.LOG_LEVEL_DEBUG:dashjs.Debug.LOG_LEVEL_FATAL}}),i.initialize(e.domRef.player,e.originalSrc,n),e.dashPlayer=i}else e.nextSource(),console.log("[FP_WARNING] Media type not supported by this browser using DASH.js. (application/dash+xml)")},e.initialiseHls=()=>{if(Hls.isSupported()){const t=new Hls(e.displayOptions.hlsjsConfig);t.attachMedia(e.domRef.player),t.loadSource(e.originalSrc),e.hlsPlayer=t,!e.firstPlayLaunched&&e.displayOptions.layoutControls.autoPlay&&e.domRef.player.play()}else e.nextSource(),console.log("[FP_WARNING] Media type not supported by this browser using HLS.js. (application/x-mpegURL)")},e.detachStreamers=()=>{e.dashPlayer?(e.dashPlayer.reset(),e.dashPlayer=!1):e.hlsPlayer&&(e.hlsPlayer.detachMedia(),e.hlsPlayer=!1)}},function(e,t){e.isTouchDevice=()=>!(!("ontouchstart"in window)&&!navigator.maxTouchPoints),e.getMobileOs=()=>{const e=navigator.userAgent||"",t={device:!1,userOs:!1,userOsVer:!1,userOsMajor:!1};let n;if(e.match(/Android/i)?(t.userOs="Android",n=e.indexOf("Android ")):e.match(/iPhone/i)?(t.device="iPhone",t.userOs="iOS",n=e.indexOf("OS ")):e.match(/iPad/i)?(t.device="iPad",t.userOs="iOS",n=e.indexOf("OS ")):t.userOs=!1,"iOS"===t.userOs&&n>-1){const i=e.substr(n+3);-1!==i.indexOf(" ")&&(t.userOsVer=i.substring(0,i.indexOf(" ")).replace(/_/g,"."),t.userOsMajor=parseInt(t.userOsVer))}else"Android"===t.userOs&&n>-1?t.userOsVer=e.substr(n+8,3):t.userOsVer=!1;return t},e.getBrowserVersion=()=>{const e=navigator.userAgent||"",t={browserName:!1,fullVersion:!1,majorVersion:!1,userOsMajor:!1};let n,i;try{t.browserName=navigator.appName,-1!==(n=e.indexOf("OPR/"))?(t.browserName="Opera",t.fullVersion=e.substring(n+4)):-1!==(n=e.indexOf("Opera"))?(t.browserName="Opera",t.fullVersion=e.substring(n+6),-1!==(n=e.indexOf("Version"))&&(t.fullVersion=e.substring(n+8))):-1!==(n=e.indexOf("MSIE"))?(t.browserName="Microsoft Internet Explorer",t.fullVersion=e.substring(n+5)):-1!==(n=e.indexOf("Chrome"))?(t.browserName="Google Chrome",t.fullVersion=e.substring(n+7)):-1!==(n=e.indexOf("Safari"))?(t.browserName="Safari",t.fullVersion=e.substring(n+7),-1!==(n=e.indexOf("Version"))&&(t.fullVersion=e.substring(n+8))):-1!==(n=e.indexOf("Firefox"))?(t.browserName="Mozilla Firefox",t.fullVersion=e.substring(n+8)):(i=e.lastIndexOf(" ")+1)<(n=e.lastIndexOf("/"))&&(t.browserName=e.substring(i,n),t.fullVersion=e.substring(n+1),t.browserName.toLowerCase()===t.browserName.toUpperCase()&&(t.browserName=navigator.appName)),-1!==(i=t.fullVersion.indexOf(";"))&&(t.fullVersion=t.fullVersion.substring(0,i)),-1!==(i=t.fullVersion.indexOf(" "))&&(t.fullVersion=t.fullVersion.substring(0,i)),t.majorVersion=parseInt(""+t.fullVersion,10),isNaN(t.majorVersion)&&(t.fullVersion=""+parseFloat(navigator.appVersion),t.majorVersion=parseInt(navigator.appVersion,10))}catch(e){}return t},e.compareVersion=(e,t)=>{if("string"!=typeof e)return!1;if("string"!=typeof t)return!1;e=e.split("."),t=t.split(".");const n=Math.min(e.length,t.length);for(let i=0;i<n;++i){if(e[i]=parseInt(e[i],10),t[i]=parseInt(t[i],10),e[i]>t[i])return 1;if(e[i]<t[i])return-1}return e.length===t.length?0:e.length<t.length?-1:1},e.convertTimeStringToSeconds=e=>{if(!e||!e.match(/^(\d){2}(:[0-5][0-9]){2}(.(\d){1,3})?$/))return!1;const t=e.split(":");return 3600*parseInt(t[0],10)+60*parseInt(t[1],10)+parseInt(t[2],10)},e.formatTime=t=>{const n=new Date(1e3*t),i=e.pad(n.getUTCHours()),r=e.pad(n.getUTCMinutes()),a=e.pad(n.getSeconds());return i>=1?i+":"+r+":"+a:r+":"+a},e.pad=e=>e<10?"0"+e:e}
29],r="undefined"!=typeof FP_ENV&&"development"===FP_ENV,a="undefined"!=typeof FP_DEBUG&&!0===FP_DEBUG;let o=0;const s=function(){const e=this;e.domRef={player:null},e.version="undefined"!=typeof FP_BUILD_VERSION?FP_BUILD_VERSION:"",e.homepage="undefined"!=typeof FP_HOMEPAGE?FP_HOMEPAGE+"/?utm_source=player&utm_medium=context_menu&utm_campaign=organic":"",e.destructors=[],e.init=(t,n)=>{const s={development:r,debug:a};for(const t of i)t(e,s);let l;if(t instanceof HTMLVideoElement)l=t,t.id||(t.id="fluid_player_instance_"+(o++).toString());else{if(!("string"==typeof t||t instanceof String))throw"Invalid initializer - player target must be HTMLVideoElement or ID";l=document.getElementById(t)}if(!l)throw"Could not find a HTML node to attach to for target "+t+'"';l.setAttribute("playsinline",""),l.setAttribute("webkit-playsinline",""),e.domRef.player=l,e.vrROTATION_POSITION=.1,e.vrROTATION_SPEED=80,e.vrMode=!1,e.vrPanorama=null,e.vrViewer=null,e.vpaidTimer=null,e.vpaidAdUnit=null,e.vastOptions=null,e.videoPlayerId=l.id,e.originalSrc=e.getCurrentSrc(),e.isCurrentlyPlayingAd=!1,e.recentWaiting=!1,e.latestVolume=1,e.currentVideoDuration=0,e.firstPlayLaunched=!1,e.suppressClickthrough=!1,e.timelinePreviewData=[],e.mainVideoCurrentTime=0,e.mainVideoDuration=0,e.isTimer=!1,e.timer=null,e.timerPool={},e.adList={},e.adPool={},e.adGroupedByRolls={},e.onPauseRollAdPods=[],e.currentOnPauseRollAd="",e.preRollAdsResolved=!1,e.preRollAdPods=[],e.preRollAdPodsLength=0,e.preRollVastResolved=0,e.temporaryAdPods=[],e.availableRolls=["preRoll","midRoll","postRoll","onPauseRoll"],e.supportedNonLinearAd=["300x250","468x60","728x90"],e.autoplayAfterAd=!0,e.nonLinearDuration=15,e.supportedStaticTypes=["image/gif","image/jpeg","image/png"],e.inactivityTimeout=null,e.isUserActive=null,e.nonLinearVerticalAlign="bottom",e.vpaidNonLinearCloseButton=!0,e.showTimeOnHover=!0,e.initialAnimationSet=!0,e.theatreMode=!1,e.theatreModeAdvanced=!1,e.fullscreenMode=!1,e.originalWidth=l.offsetWidth,e.originalHeight=l.offsetHeight,e.dashPlayer=!1,e.hlsPlayer=!1,e.dashScriptLoaded=!1,e.hlsScriptLoaded=!1,e.isPlayingMedia=!1,e.isSwitchingSource=!1,e.isLoading=!1,e.isInIframe=e.inIframe(),e.mainVideoReadyState=!1,e.xmlCollection=[],e.inLineFound=null,e.fluidStorage={},e.fluidPseudoPause=!1,e.mobileInfo=e.getMobileOs(),e.events={},e.displayOptions={layoutControls:{mediaType:e.getCurrentSrcType(),primaryColor:!1,posterImage:!1,posterImageSize:"contain",adProgressColor:"#f9d300",playButtonShowing:!0,playPauseAnimation:!0,closeButtonCaption:"Close",fillToContainer:!1,autoPlay:!1,preload:"auto",mute:!1,loop:null,keyboardControl:!0,allowDownload:!1,playbackRateEnabled:!1,subtitlesEnabled:!1,showCardBoardView:!1,showCardBoardJoystick:!1,allowTheatre:!0,doubleclickFullscreen:!0,theatreSettings:{width:"100%",height:"60%",marginTop:0,horizontalAlign:"center",keepPosition:!1},theatreAdvanced:!1,title:null,logo:{imageUrl:null,position:"top left",clickUrl:null,opacity:1,mouseOverImageUrl:null,imageMargin:"2px",hideWithControls:!1,showOverAds:!1},controlBar:{autoHide:!1,autoHideTimeout:3,animated:!0},timelinePreview:{spriteImage:!1,spriteRelativePath:!1},htmlOnPauseBlock:{html:null,height:null,width:null},layout:"default",playerInitCallback:function(){},persistentSettings:{volume:!0,quality:!0,speed:!0,theatre:!0}},vastOptions:{adList:{},skipButtonCaption:"Skip ad in [seconds]",skipButtonClickCaption:'Skip Ad <span class="skip_button_icon"></span>',adText:null,adTextPosition:"top left",adCTAText:"Visit now!",adCTATextPosition:"bottom right",adClickable:!0,vastTimeout:5e3,showProgressbarMarkers:!1,allowVPAID:!1,showPlayButton:!1,maxAllowedVastTagRedirects:3,vpaidTimeout:3e3,vastAdvanced:{vastLoadedCallback:function(){},noVastVideoCallback:function(){},vastVideoSkippedCallback:function(){},vastVideoEndedCallback:function(){}}},hlsjsConfig:{debug:a,p2pConfig:{logLevel:!1},enableWebVTT:!1,enableCEA708Captions:!1},captions:{play:"Play",pause:"Pause",mute:"Mute",unmute:"Unmute",fullscreen:"Fullscreen",subtitles:"Subtitles",exitFullscreen:"Exit Fullscreen"},debug:a};for(let t in n)if(n.hasOwnProperty(t))if("object"==typeof n[t])for(let i in n[t])n[t].hasOwnProperty(i)&&(e.displayOptions[t][i]=n[t][i]);else e.displayOptions[t]=n[t];e.domRef.wrapper=e.setupPlayerWrapper(),l.addEventListener("webkitfullscreenchange",e.re
29calculateAdDimensions),l.addEventListener("fullscreenchange",e.recalculateAdDimensions),l.addEventListener("waiting",e.onRecentWaiting),l.addEventListener("pause",e.onFluidPlayerPause),l.addEventListener("loadedmetadata",e.mainVideoReady),l.addEventListener("error",e.onErrorDetection),l.addEventListener("ended",e.onMainVideoEnded),l.addEventListener("durationchange",()=>{e.currentVideoDuration=e.getCurrentVideoDuration()}),e.displayOptions.layoutControls.showCardBoardView&&l.setAttribute("crossOrigin","anonymous"),e.currentVideoDuration=e.getCurrentVideoDuration(),!isNaN(e.currentVideoDuration)&&isFinite(e.currentVideoDuration)||(e.currentVideoDuration=0),e.setLayout(),e.latestVolume=l.volume,e.initialAnimationSet=e.displayOptions.layoutControls.playPauseAnimation,e.handleFullscreen(),e.initLogo(),e.initTitle(),e.initMute(),e.initLoop(),e.displayOptions.layoutControls.playerInitCallback(),e.createVideoSourceSwitch(),e.createSubtitles(),e.createCardboard(),e.userActivityChecker(),e.setVastList(),e.setPersistentSettings();const u=e.findRoll("preRoll");u&&0!==u.length||e.initialiseStreamers();const d=l.play;l.play=function(){let t=null;e.displayOptions.layoutControls.showCardBoardView&&"undefined"!=typeof DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission&&DeviceOrientationEvent.requestPermission().then(function(t){"granted"===t&&e.debugMessage("DeviceOrientationEvent permission granted!")}).catch(console.error);try{t=d.apply(this,arguments),null!=t&&(t.then(()=>{e.isPlayingMedia=!0,clearTimeout(e.promiseTimeout)}).catch(t=>{console.error(t);void 0!==t.name&&"AbortError"===t.name||e.announceLocalError(202,"Failed to play video."),clearTimeout(e.promiseTimeout)}),e.promiseTimeout=setTimeout(function(){!1===e.isPlayingMedia&&e.announceLocalError(204,"Timeout error. Failed to play video.")},5e3))}catch(t){console.error(t),e.announceLocalError(201,"Failed to play video.")}};const c=l.pause;if(l.pause=function(){if(!0===e.isPlayingMedia)return e.isPlayingMedia=!1,c.apply(this,arguments);if(e.isCurrentlyPlayingVideo(e.domRef.player))try{return e.isPlayingMedia=!1,c.apply(this,arguments)}catch(t){e.announceLocalError(203,"Failed to play video.")}},e.displayOptions.layoutControls.autoPlay&&!e.dashScriptLoaded&&!e.hlsScriptLoaded){if("Safari"===e.getBrowserVersion().browserName)return;l.play()}const f=document.getElementById("fluid_video_wrapper_"+l.id);e.mobileInfo.userOs?(e.hideControlBar(),f.addEventListener("touchstart",e.showControlBar,!1)):(f.addEventListener("mouseleave",e.handleMouseleave,!1),f.addEventListener("mouseenter",e.showControlBar,!1),f.addEventListener("mouseenter",e.showTitle,!1)),e.displayOptions.layoutControls.keyboardControl&&e.keyboardControl(),e.displayOptions.layoutControls.controlBar.autoHide&&e.linkControlBarUserActivity();try{if(e.domRef.player.textTracks)for(const t of e.domRef.player.textTracks)t.mode="hidden"}catch(e){}},e.getCurrentVideoDuration=()=>e.domRef.player?e.domRef.player.duration:0,e.toggleLoader=t=>{e.isLoading=!!t;document.getElementById("vast_video_loading_"+e.videoPlayerId).style.display=t?"table":"none"},e.sendRequest=(e,t,n,i)=>{const r=new XMLHttpRequest;r.onreadystatechange=i,r.open("GET",e,!0),r.withCredentials=t,r.timeout=n,r.send()},e.announceLocalError=(e,t)=>{let n="[Error] ("+(void 0!==e?parseInt(e):900)+"): ";n+=t||"Failed to load Vast",console.warn(n)},e.debugMessage=t=>{e.displayOptions.debug&&console.log(t)},e.onMainVideoEnded=t=>{t&&!e.isCurrentlyPlayingAd&&t.stopImmediatePropagation(),e.debugMessage("onMainVideoEnded is called"),e.isCurrentlyPlayingAd&&e.autoplayAfterAd||(Math.floor(e.getCurrentTime())>=Math.floor(e.mainVideoDuration)&&(e.adKeytimePlay(Math.floor(e.mainVideoDuration)),clearInterval(e.timer)),e.displayOptions.layoutControls.loop&&(e.switchToMainVideo(),e.playPauseToggle()))},e.getCurrentTime=()=>e.isCurrentlyPlayingAd?e.mainVideoCurrentTime:e.domRef.player.currentTime,e.getCurrentSrc=()=>{const t=e.domRef.player.getElementsByTagName("source");return t.length?t[0].getAttribute("src"):null},e.getCurrentSrcType=()=>{const t=e.domRef.player.getElementsByTagName("source");if(!t.length)return null;for(let n=0;n<t.length;n++)if(t[n].getAttribute("src")===e.originalSrc)return t[n].getAttribute("type").toLowerCase();return null},e.onRecentWaiting=()=>{e.recentWaiting=!0,setTimeout(function(){e.recentWaiting=!1},1e3)},e.onFluidPlayerPause=()=>{setTimeout(function(){if(e.recentWaiting)return;const t=document.createEvent("CustomEvent");
29t.initEvent("fluidplayerpause",!1,!0),e.domRef.player.dispatchEvent(t)},100)},e.checkShouldDisplayVolumeBar=()=>"iOS"!==e.getMobileOs().userOs,e.generateCustomControlTags=t=>{const n={};return n.loader=document.createElement("div"),n.loader.className="vast_video_loading",n.loader.id="vast_video_loading_"+e.videoPlayerId,n.loader.style.display="none",n.root=document.createElement("div"),n.root.className="fluid_controls_container",n.root.id=e.videoPlayerId+"_fluid_controls_container",t.displayVolumeBar||(n.root.className="fluid_controls_container no_volume_bar"),n.leftContainer=document.createElement("div"),n.leftContainer.className="fluid_controls_left",n.root.appendChild(n.leftContainer),n.playPause=document.createElement("div"),n.playPause.className="fluid_button fluid_button_play fluid_control_playpause",n.playPause.id=e.videoPlayerId+"_fluid_control_playpause",n.leftContainer.appendChild(n.playPause),n.progressContainer=document.createElement("div"),n.progressContainer.className="fluid_controls_progress_container fluid_slider",n.progressContainer.id=e.videoPlayerId+"_fluid_controls_progress_container",n.root.appendChild(n.progressContainer),n.progressWrapper=document.createElement("div"),n.progressWrapper.className="fluid_controls_progress",n.progressContainer.appendChild(n.progressWrapper),n.progressCurrent=document.createElement("div"),n.progressCurrent.className="fluid_controls_currentprogress",n.progressCurrent.id=e.videoPlayerId+"_vast_control_currentprogress",n.progressCurrent.style.backgroundColor=t.primaryColor,n.progressWrapper.appendChild(n.progressCurrent),n.progress_current_marker=document.createElement("div"),n.progress_current_marker.className="fluid_controls_currentpos",n.progress_current_marker.id=e.videoPlayerId+"_vast_control_currentpos",n.progressCurrent.appendChild(n.progress_current_marker),n.bufferedIndicator=document.createElement("div"),n.bufferedIndicator.className="fluid_controls_buffered",n.bufferedIndicator.id=e.videoPlayerId+"_buffered_amount",n.progressContainer.appendChild(n.bufferedIndicator),n.adMarkers=document.createElement("div"),n.adMarkers.className="fluid_controls_ad_markers_holder",n.adMarkers.id=e.videoPlayerId+"_ad_markers_holder",n.progressContainer.appendChild(n.adMarkers),n.rightContainer=document.createElement("div"),n.rightContainer.className="fluid_controls_right",n.root.appendChild(n.rightContainer),n.fullscreen=document.createElement("div"),n.fullscreen.id=e.videoPlayerId+"_fluid_control_fullscreen",n.fullscreen.className="fluid_button fluid_control_fullscreen fluid_button_fullscreen",n.rightContainer.appendChild(n.fullscreen),n.theatre=document.createElement("div"),n.theatre.id=e.videoPlayerId+"_fluid_control_theatre",n.theatre.className="fluid_button fluid_control_theatre fluid_button_theatre",n.rightContainer.appendChild(n.theatre),n.cardboard=document.createElement("div"),n.cardboard.id=e.videoPlayerId+"_fluid_control_cardboard",n.cardboard.className="fluid_button fluid_control_cardboard fluid_button_cardboard",n.rightContainer.appendChild(n.cardboard),n.subtitles=document.createElement("div"),n.subtitles.id=e.videoPlayerId+"_fluid_control_subtitles",n.subtitles.className="fluid_button fluid_button_subtitles",n.rightContainer.appendChild(n.subtitles),n.videoSource=document.createElement("div"),n.videoSource.id=e.videoPlayerId+"_fluid_control_video_source",n.videoSource.className="fluid_button fluid_button_video_source",n.rightContainer.appendChild(n.videoSource),n.playbackRate=document.createElement("div"),n.playbackRate.id=e.videoPlayerId+"_fluid_control_playback_rate",n.playbackRate.className="fluid_button fluid_button_playback_rate",n.rightContainer.appendChild(n.playbackRate),n.download=document.createElement("div"),n.download.id=e.videoPlayerId+"_fluid_control_download",n.download.className="fluid_button fluid_button_download",n.rightContainer.appendChild(n.download),n.volumeContainer=document.createElement("div"),n.volumeContainer.id=e.videoPlayerId+"_fluid_control_volume_container",n.volumeContainer.className="fluid_control_volume_container fluid_slider",n.rightContainer.appendChild(n.volumeContainer),n.volume=document.createElement("div"),n.volume.id=e.videoPlayerId+"_fluid_control_volume",n.volume.className="fluid_control_volume",n.volumeContainer.appendChild(n.volume),n.volumeCurrent=document.createElement("div"),n.volumeCurrent.id=e.videoPlayerId+"_fluid_control_currentvolume",n.volumeCurrent.className="fluid_control_currentvolume",n.volume.appendChild(n.volumeCurrent),n.volumeCurrentPos=document.createElement("div"),n.volumeCurrentPos.id=e.videoPlayerId+"_fluid_control_volume_currentpos",n.volumeCurrentPos.className="fluid_control_volume_currentpos",n.volumeCurrent.appendChild(n.volumeCurrentPos),n.mute=document.createElement("div"),n.mute.id=e.videoPlayerId+"_fluid_control_mute",n.mute.className="fluid_button fluid_button_volume fluid_control_mute",n.rightContainer.appendChild(n.mute),n.duration=document.createElement("div"),n.duration.id=e.videoPlayerId+"_fluid_control_duration",n.duration.className="fluid_control_duration fluid_fluid_control_duration",n.duration.innerText="00:00 / 00:00",n.rightContainer.appendChild(n.duration),n},e.controlPlayPauseToggle=()=>{const t=e.domRef.player.parentNode.getElementsByClassName("fluid_control_playpause"),n=document.getElementById(e.videoPlayerId+"context_option_play"),i=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_container"),r=document.getElementById(e.videoPlayerId+"_logo");if(document.getElementById(e.videoPlayerId+"_fluid_initial_play")&&(
vendor: 10,884 bytes, line 29
29document.getElementById(e.videoPlayerId+"_fluid_initial_play").style.display="none",document.getElementById(e.videoPlayerId+"_fluid_initial_play_button").style.opacity="1"),!e.domRef.player.paused){for(let e=0;e<t.length;e++)t[e].className=t[e].className.replace(/\bfluid_button_play\b/g,"fluid_button_pause");for(let e=0;e<i.length;e++)i[e].classList.remove("initial_controls_show");return r&&r.classList.remove("initial_controls_show"),void(null!==n&&(n.innerHTML=e.displayOptions.captions.pause))}for(let e=0;e<t.length;e++)t[e].className=t[e].className.replace(/\bfluid_button_pause\b/g,"fluid_button_play");for(let e=0;e<i.length;e++)i[e].classList.add("initial_controls_show");e.isCurrentlyPlayingAd&&e.displayOptions.vastOptions.showPlayButton&&(document.getElementById(e.videoPlayerId+"_fluid_initial_play").style.display="block",document.getElementById(e.videoPlayerId+"_fluid_initial_play_button").style.opacity="1"),r&&r.classList.add("initial_controls_show"),null!==n&&(n.innerHTML=e.displayOptions.captions.play)},e.playPauseAnimationToggle=t=>{e.isCurrentlyPlayingAd||!e.displayOptions.layoutControls.playPauseAnimation||e.isSwitchingSource||(t?(document.getElementById(e.videoPlayerId+"_fluid_state_button").classList.remove("fluid_initial_pause_button"),document.getElementById(e.videoPlayerId+"_fluid_state_button").classList.add("fluid_initial_play_button")):(document.getElementById(e.videoPlayerId+"_fluid_state_button").classList.remove("fluid_initial_play_button"),document.getElementById(e.videoPlayerId+"_fluid_state_button").classList.add("fluid_initial_pause_button")),document.getElementById(e.videoPlayerId+"_fluid_initial_play").classList.add("transform-active"),setTimeout(function(){document.getElementById(e.videoPlayerId+"_fluid_initial_play").classList.remove("transform-active")},800))},e.contolProgressbarUpdate=()=>{const t=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_currentprogress");for(let n=0;n<t.length;n++)t[n].style.width=e.domRef.player.currentTime/e.currentVideoDuration*100+"%"},e.controlDurationUpdate=()=>{const t=e.formatTime(e.domRef.player.currentTime);let n,i=!1;if(e.hlsPlayer&&(i=e.hlsPlayer.levels&&e.hlsPlayer.levels[e.hlsPlayer.currentLevel]&&e.hlsPlayer.levels[e.hlsPlayer.currentLevel].details.live),isNaN(e.currentVideoDuration)||!isFinite(e.currentVideoDuration)||i)n=t;else{n=t+" / "+e.formatTime(e.currentVideoDuration)}const r=e.domRef.player.parentNode.getElementsByClassName("fluid_control_duration");for(let e=0;e<r.length;e++)r[e].innerHTML=n},e.contolVolumebarUpdate=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_currentvolume"),n=document.getElementById(e.videoPlayerId+"_fluid_control_volume_currentpos"),i=document.getElementById(e.videoPlayerId+"_fluid_control_volume").clientWidth,r=n.clientWidth,a=e.domRef.player.parentNode.getElementsByClassName("fluid_control_mute"),o=document.getElementById(e.videoPlayerId+"context_option_mute");if(0!==e.domRef.player.volume?(e.latestVolume=e.domRef.player.volume,e.fluidStorage.fluidMute=!1):e.fluidStorage.fluidMute=!0,e.domRef.player.volume&&!e.domRef.player.muted){for(let e=0;e<a.length;e++)a[e].className=a[e].className.replace(/\bfluid_button_mute\b/g,"fluid_button_volume");null!==o&&(o.innerHTML=e.displayOptions.captions.mute)}else{for(let e=0;e<a.length;e++)a[e].className=a[e].className.replace(/\bfluid_button_volume\b/g,"fluid_button_mute");null!==o&&(o.innerHTML=e.displayOptions.captions.unmute)}t.style.width=e.domRef.player.volume*i+"px",n.style.left=e.domRef.player.volume*i-r/2+"px"},e.muteToggle=()=>{0===e.domRef.player.volume||e.domRef.player.muted?(e.domRef.player.volume=e.latestVolume,e.domRef.player.muted=!1):(e.domRef.player.volume=0,e.domRef.player.muted=!0),e.fluidStorage.fluidVolume=e.latestVolume,e.fluidStorage.fluidMute=e.domRef.player.muted},e.checkFullscreenSupport=t=>{const n=document.getElementById(t);return n.mozRequestFullScreen?{goFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen",isFullscreen:"mozFullScreenElement"}:n.webkitRequestFullscreen?{goFullscreen:"webkitRequestFullscreen",exitFullscreen:"webkitExitFullscreen",isFullscreen:"webkitFullscreenElement"}:n.msRequestFullscreen?{goFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen",isFullscreen:"msFullscreenElement"}:n.requestFullscreen?{goFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",isFullscreen:"fullscreenElement"}:!!e.domRef.player.webkitSupportsFullscreen&&{goFullscreen:"webkitEnterFullscreen",exitFullscreen:"webkitExitFullscreen",isFullscreen:"webkitDisplayingFullscreen"}},e.fullscreenOff=(t,n)=>{for(let e=0;e<t.length;e++)t[e].className=t[e].className.replace(/\bfluid_button_fullscreen_exit\b/g,"fluid_button_fullscreen");null!==n&&(n.innerHTML="Fullscreen"),e.fullscreenMode=!1},e.fullscreenOn=(t,n)=>{for(let e=0;e<t.length;e++)t[e].className=t[e].className.replace(/\bfluid_button_fullscreen\b/g,"fluid_button_fullscreen_exit");null!==n&&(n.innerHTML=e.displayOptions.captions.exitFullscreen),e.fullscreenMode=!0},e.fullscreenToggle=()=>{const t=e.domRef.player,n=document.getElementById("fluid_video_wrapper_"+e.videoPlayerId),i=e.checkFullscreenSupport("fluid_video_wrapper_"+e.videoPlayerId),r=t.parentNode.getElementsByClassName("fluid_control_fullscreen"),a=document.getElementById(e.videoPlayerId+"context_option_fullscreen");let o;e.theatreMode&&e.theatreToggle(),i?"webkitEnterFullscreen"===i.goFullscreen?t[i.isFullscreen]||(o="videoPlayerTag."+i.goFullscreen+"();",e.fullscreenOn(r,a),new Function("videoPlayerTag",o)(t)):(null===document[i.isFullscreen]?(o="videoPlayerTag."+i.goFullscreen+"();",e.fullscreenOn(r,a)):(o="document."+i.exitFullscreen+"();",e.fullscreenOff(r,a)),new Function("videoPlayerTag",o)(n)):-1!==n.className.search(/\bpseudo_fullscreen\b/g)?(n.className=n.className.replace(/\bpseudo_fullscreen\b/g,""),e.fullscreenOff(r,a)):(n.className+=" pseudo_fullscreen",e.fullscreenOn(r,a)),e.resizeVpaidAuto()},e.findClosestParent=(e,t)=>{let n,i=null;if(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(e){return"function"==typeof document.body[e]&&(i=e,!0)}),e[i](t))return e;for(;e;){if(n=e.parentElement,n&&n[i](t))return n;e=n}return null},e.getTranslateX=e=>{let t=null;try{const n=e.style.transform.match(/translate3d\((-?\d+px,\s?){2}-?\d+px\)/);n&&n.length&&(t=n[0].replace("translate3d(","").replace(")","").replace(/\s/g,"").replace(/px/g,"").split(","))}catch(e){t=null}return t&&3===t.length?parseInt(t[0]):0},e.getEventOffsetX=(t,n)=>{let i,r=0,a=0;for(;n&&!isNaN(n.offsetLeft);)a=e.getTranslateX(n),"BODY"===n.tagName?r+=n.offsetLeft+n.clientLeft+a-(n.scrollLeft||document.documentElement.scrollLeft):r+=n.offsetLeft+n.clientLeft+a-n.scrollLeft,n=n.offsetParent;return i=void 0!==t.touches&&void 0!==t.touches[0]?t.touches[0].clientX:t.clientX,i-r},e.getEventOffsetY=(t,n)=>{let i=1;const r=e.findClosestParent(n,'div[id^="fluid_video_wrapper_"]');if(r){const t=r.id.replace("fluid_video_wrapper_",""),n=e.checkFullscreenSupport("fluid_video_wrapper_"+t);n&&document[n.isFullscreen]&&(i=0)}let a=0;for(;n&&!isNaN(n.offsetTop);)"BODY"===n.tagName?a+=n.offsetTop-(n.scrollTop||document.documentElement.scrollTop)*i:a+=n.offsetTop-n.scrollTop*i,n=n.offsetParent;return t.clientY-a},e.onProgressbarMouseDown=t=>{let n;if(e.displayOptions.layoutControls.playPauseAnimation=!1,n=e.displayOptions.layoutControls.showCardBoardView?e.getEventOffsetX(t,t.target.parentNode):e.getEventOffsetX(t,document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container")),e.isCurrentlyPlayingAd)return;e.fluidPseudoPause=!0;const i=e.domRef.player.paused;i||e.domRef.player.pause();const r=t=>{const n=document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container").clientWidth;n&&(e.domRef.player.currentTime=e.currentVideoDuration*t/n)},a=t=>{const i=e.getEventOffsetX(t,t.target.parentNode);n=NaN,r(i),e.contolProgressbarUpdate(e.videoPlayerId),e.controlDurationUpdate(e.videoPlayerId)},o=t=>{document.removeEventListener("mousemove",a),document.removeEventListener("touchmove",a),document.removeEventListener("mouseup",o),document.removeEventListener("touchend",o);let s=e.getEventOffsetX(t,t.target.parentNode);isNaN(s)&&!isNaN(n)&&(s=n),isNaN(s)||r(s),i||e.play(),e.initialAnimationSet&&setTimeout(()=>{e.displayOptions.layoutControls.playPauseAnimation=e.initialAnimationSet},200),e.fluidPseudoPause=!1};document.addEventListener("mouseup",o),document.addEventListener("touchend",o),document.addEventListener("mousemove",a),document.addEventListener("touchmove",a)},e.onVolumeBarMouseDown=()=>{const t=t=>{const n=e.domRef.controls.volumeContainer.clientWidth;if(n){let i=t/n;i<.05?(i=0,e.domRef.player.muted=!0):i>.95&&(i=1),e.domRef.player.muted&&i>0&&(e.domRef.player.muted=!1),e.setVolume(i)}},n=n=>{const i=e.getEventOffsetX(n,e.domRef.controls.volumeContainer);t(i)},i=r=>{document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i);const a=e.getEventOffsetX(r,e.domRef.controls.volumeContainer);isNaN(a)||t(a)};document.addEventListener("mouseup",i),document.addEventListener("touchend",i),document.addEventListener("mousemove",n),document.addEventListener("touchmove",n)},e.findRoll=t=>{const n=[];if(n.length=0,t&&e.hasOwnProperty("adList")){for(let i in e.adList)e.adList.hasOwnProperty(i)&&e.adList[i].roll===t&&n.push(i);return n}},e.onKeyboardVolumeChange=t=>{let n=e.domRef.player.volume;"asc"===t?n+=.05:"desc"===t&&(n-=.05),n<.05?n=0:n>.95&&(n=1),e.setVolume(n)},e.onKeyboardSeekPosition=t=>{e.isCurrentlyPlayingAd||(e.domRef.player.currentTime=e.getNewCurrentTimeValueByKeyCode(t,e.domRef.player.currentTime,e.domRef.player.duration))},e.getNewCurrentTimeValueByKeyCode=(e,t,n)=>{let i=t;switch(e){case 37:i-=5,i=i<5?0:i;break;case 39:i+=5,i=i>n-5?n:i;break;case 35:i=n;break;case 36:i=0;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:if(e<58&&e>47){i=n*(10*(e-48))/100}}return i},e.handleMouseleave=t=>{void 0!==t.clientX&&e.domRef.wrapper.contains(document.elementFromPoint(t.clientX,t.clientY))||(e.hideControlBar(),e.hideTitle())},e.handleMouseenterForKeyboard=()=>{e.captureKey||(e.captureKey=t=>{t.stopPropagation();const n=t.keyCode;switch(n){case 70:e.fullscreenToggle(),t.preventDefault();break;case 13:case 32:e.playPauseToggle(),t.preventDefault();break;case 77:e.muteToggle(),t.preventDefault();break;case 38:e.onKeyboardVolumeChange("asc"),t.preventDefault();break;case 40:e.onKeyboardVolumeChange("desc"),t.preventDefault();break;case 37:case 39:case 35:case 36:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:e.onKeyboardSeekPosition(n),t.preventDefault()}return!1},document.addEventListener("keydown",e.captureKey,!0))}
29,e.keyboardControl=()=>{e.domRef.wrapper.addEventListener("click",e.handleMouseenterForKeyboard,!1);const t=e.handleWindowClick.bind(e);e.destructors.push(()=>{window.removeEventListener("click",t)}),window.addEventListener("click",t)},e.handleWindowClick=t=>{if(!e.domRef.wrapper)return void console.warn("Dangling click event listener should be collected for unknown wrapper "+e.videoPlayerId+". Did you forget to call destroy on player instance?");e.domRef.wrapper.contains(t.target)||t.target.id==="skipHref_"+e.videoPlayerId||(document.removeEventListener("keydown",e.captureKey,!0),delete e.captureKey,e.theatreMode&&!e.theatreModeAdvanced&&e.theatreToggle())},e.initialPlay=()=>{if(e.domRef.player.addEventListener("playing",()=>{e.toggleLoader(!1)}),e.domRef.player.addEventListener("timeupdate",()=>{e.toggleLoader(!1)}),e.domRef.player.addEventListener("waiting",()=>{e.toggleLoader(!0)}),!e.displayOptions.layoutControls.playButtonShowing){document.getElementById(e.videoPlayerId+"_fluid_controls_container").classList.remove("initial_controls_show");const t=document.getElementById(e.videoPlayerId+"_logo");t&&t.classList.remove("initial_controls_show")}e.firstPlayLaunched||(e.playPauseToggle(),e.domRef.player.removeEventListener("play",e.initialPlay))},e.playPauseToggle=()=>{const t=!e.firstPlayLaunched,n=e.findRoll("preRoll");if(t&&0!==n.length){e.isCurrentlyPlayingAd=!0;const t=e.getBrowserVersion(),i=!1!==e.mobileInfo.userOs&&"Android"===e.mobileInfo.userOs&&"Google Chrome"===t.browserName;("Safari"===t.browserName||i)&&(e.domRef.player.src="https://cdn.fluidplayer.com/static/blank.mp4",e.domRef.player.play(),e.playPauseAnimationToggle(!0)),e.firstPlayLaunched=!0,e.prepareVast("preRoll"),e.preRollAdPodsLength=n.length}else t&&0===n.length&&(e.firstPlayLaunched=!0,e.displayOptions.vastOptions.vastAdvanced.noVastVideoCallback()),e.domRef.player.paused?(e.isCurrentlyPlayingAd&&null!==e.vastOptions&&e.vastOptions.vpaid?e.resumeVpaidAd():e.dashPlayer?e.dashPlayer.play():e.domRef.player.play(),e.playPauseAnimationToggle(!0)):t||(e.isCurrentlyPlayingAd&&null!==e.vastOptions&&e.vastOptions.vpaid?e.pauseVpaidAd():e.domRef.player.pause(),e.playPauseAnimationToggle(!1)),e.toggleOnPauseAd();const i=()=>{e.prepareVast("onPauseRoll"),e.prepareVast("postRoll"),e.prepareVast("midRoll")};if(t){const t=document.getElementById(e.videoPlayerId+"_fluid_pseudo_poster");t&&t.parentNode.removeChild(t),e.mainVideoDuration>0?i():e.domRef.player.addEventListener("mainVideoDurationSet",i)}e.adTimer();const r=document.getElementById(e.videoPlayerId+"_fluid_html_on_pause");r&&!e.isCurrentlyPlayingAd&&(e.domRef.player.paused?r.style.display="flex":r.style.display="none")},e.setCustomControls=()=>{e.trackEvent(e.domRef.player.parentNode,"click",".fluid_control_playpause",()=>{e.firstPlayLaunched||e.domRef.player.removeEventListener("play",e.initialPlay),e.playPauseToggle()},!1),e.domRef.player.addEventListener("play",()=>{e.controlPlayPauseToggle(),e.contolVolumebarUpdate()},!1),e.domRef.player.addEventListener("fluidplayerpause",()=>{e.controlPlayPauseToggle()},!1),e.domRef.player.addEventListener("timeupdate",()=>{e.contolProgressbarUpdate(),e.controlDurationUpdate()});const t=e.getMobileOs().userOs?"touchstart":"mousedown";e.displayOptions.layoutControls.showCardBoardView?e.trackEvent(e.domRef.player.parentNode,t,".fluid_controls_progress_container",t=>e.onProgressbarMouseDown(t),!1):document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container").addEventListener(t,t=>e.onProgressbarMouseDown(t),!1),document.getElementById(e.videoPlayerId+"_fluid_control_volume_container").addEventListener(t,t=>e.onVolumeBarMouseDown(),!1),e.domRef.player.addEventListener("volumechange",()=>e.contolVolumebarUpdate()),e.trackEvent(e.domRef.player.parentNode,"click",".fluid_control_mute",()=>e.muteToggle()),e.setBuffering(),e.trackEvent(e.domRef.player.parentNode,"click",".fluid_control_fullscreen",()=>e.fullscreenToggle()),e.displayOptions.layoutControls.allowTheatre&&!e.isInIframe?(document.getElementById(e.videoPlayerId+"_fluid_control_theatre").style.display="inline-block",e.trackEvent(e.domRef.player.parentNode,"click",".fluid_control_theatre",()=>e.theatreToggle())):document.getElementById(e.videoPlayerId+"_fluid_control_theatre").style.display="none",e.domRef.player.addEventListener("ratechange",()=>{e.isCurrentlyPlayingAd&&(e.playbackRate=1)})},e.createTimePositionPreview=()=>
29{if(!e.showTimeOnHover)return;const t=document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container"),n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_timeline_preview",n.className="fluid_timeline_preview",n.style.display="none",n.style.position="absolute",t.appendChild(n),document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container").addEventListener("mousemove",t=>{const n=document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container"),i=n.clientWidth,r=document.getElementById(e.videoPlayerId+"_fluid_timeline_preview"),a=e.getEventOffsetX(t,n),o=e.currentVideoDuration*a/i;r.innerText=e.formatTime(o),r.style.display="block",r.style.left=o/e.domRef.player.duration*100+"%"},!1),document.getElementById(e.videoPlayerId+"_fluid_controls_progress_container").addEventListener("mouseout",()=>{document.getElementById(e.videoPlayerId+"_fluid_timeline_preview").style.display="none"},!1)},e.setCustomContextMenu=()=>{const t=e.domRef.wrapper,n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_context_menu",n.className="fluid_context_menu",n.style.display="none",n.style.position="absolute",n.innerHTML='<ul>    <li id="'+e.videoPlayerId+'context_option_play">'+e.displayOptions.captions.play+'</li>    <li id="'+e.videoPlayerId+'context_option_mute">'+e.displayOptions.captions.mute+'</li>    <li id="'+e.videoPlayerId+'context_option_fullscreen">'+e.displayOptions.captions.fullscreen+'</li>    <li id="'+e.videoPlayerId+'context_option_homepage">Fluid Player '+e.version+"</li></ul>",e.domRef.player.parentNode.insertBefore(n,e.domRef.player.nextSibling),t.addEventListener("contextmenu",function(t){t.preventDefault(),n.style.left=e.getEventOffsetX(t,e.domRef.player)+"px",n.style.top=e.getEventOffsetY(t,e.domRef.player)+"px",n.style.display="block"},!1),document.addEventListener("click",function(t){t.target===e.domRef.player&&2===t.button||(n.style.display="none")},!1);const i=document.getElementById(e.videoPlayerId+"context_option_play"),r=document.getElementById(e.videoPlayerId+"context_option_mute"),a=document.getElementById(e.videoPlayerId+"context_option_fullscreen"),o=document.getElementById(e.videoPlayerId+"context_option_homepage");i.addEventListener("click",()=>e.playPauseToggle(),!1),r.addEventListener("click",()=>e.muteToggle(),!1),a.addEventListener("click",()=>e.fullscreenToggle(),!1),o.addEventListener("click",()=>{window.open(e.homepage,"_blank").focus()},!1)},e.setDefaultLayout=()=>{e.domRef.wrapper.className+=" fluid_player_layout_"+e.displayOptions.layoutControls.layout,e.setCustomContextMenu();const t=e.generateCustomControlTags({displayVolumeBar:e.checkShouldDisplayVolumeBar(),primaryColor:e.displayOptions.layoutControls.primaryColor?e.displayOptions.layoutControls.primaryColor:"red"});e.domRef.player.removeAttribute("controls"),e.domRef.player.parentNode.insertBefore(t.root,e.domRef.player.nextSibling),e.domRef.player.parentNode.insertBefore(t.loader,e.domRef.player.nextSibling),e.domRef.controls=t;let n=100;let i=setInterval(function(){n?e.checkIfVolumebarIsRendered()?(clearInterval(i),e.contolVolumebarUpdate(e.videoPlayerId)):n--:clearInterval(i)},100);e.displayOptions.layoutControls.doubleclickFullscreen&&e.domRef.player.addEventListener("dblclick",e.fullscreenToggle),e.initHtmlOnPauseBlock(),e.setCustomControls(),e.setupThumbnailPreview(),e.createTimePositionPreview(),e.posterImage(),e.initPlayButton(),e.setVideoPreload(),e.createPlaybackList(),e.createDownload()},e.checkIfVolumebarIsRendered=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_volume_currentpos"),n=document.getElementById(e.videoPlayerId+"_fluid_control_volume").clientWidth;return t.clientWidth!==n},e.setLayout=()=>{const t=e.isTouchDevice()?"touchend":"click";e.domRef.player.addEventListener(t,()=>e.playPauseToggle(),!1),e.domRef.player.addEventListener("play",e.initialPlay,!1),e.setDefaultLayout()},e.handleFullscreen=()=>{void 0===document.vastFullsreenChangeEventListenersAdded&&(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(t=>{"object"==typeof document["on"+t]&&document.addEventListener(t,function(t){e.recalculateAdDimensions()},!1)}),document.vastFullsreenChangeEventListenersAdded=!0)},e.setupPlayerWrapper=()=>{const t=document.createElement("div");return t.id="fluid_video_wrapper_"+e.videoPlayerId,t.className=e.isTouchDevice()?"fluid_video_wrapper mobile":"fluid_video_wrapper",e.displayOptions.layoutControls.fillToContainer?(t.style.width="100%",t.style.height="100%"):(t.style.height=e.domRef.player.clientHeight+"px",t.style.width=e.domRef.player.clientWidth+"px"),e.domRef.player.style.height="100%",e.domRef.player.style.width="100%",e.domRef.player.parentNode.insertBefore(t,e.domRef.player),t.appendChild(e.domRef.player),t},e.onErrorDetection=()=>{e.domRef.player.networkState===e.domRef.player.NETWORK_NO_SOURCE&&e.isCurrentlyPlayingAd&&e.playMainVideoWhenVastFails(401)},e.createVideoSourceSwitch=()=>{const t=[],n=e.domRef.player.querySelectorAll("source");if([].forEach.call(n,e=>
vendor: 5,166 bytes, line 29
29{e.title&&e.src&&t.push({title:e.title,url:e.src,isHD:null!=e.getAttribute("data-fluid-hd")})}),e.videoSources=t,e.videoSources.length<=1)return;const i=document.getElementById(e.videoPlayerId+"_fluid_control_video_source");i.style.display="inline-block";let r=!1;const a=document.createElement("div");a.id=e.videoPlayerId+"_fluid_control_video_source_list",a.className="fluid_video_sources_list",a.style.display="none";let o=!0;for(const t of e.videoSources){const n=t.url.split(".").pop();if("iOS"===e.mobileInfo.userOs&&"mkv"===n)continue;const i=o?"source_selected":"",s=t.isHD?'<sup style="color:'+e.displayOptions.layoutControls.primaryColor+'" class="fp_hd_source"></sup>':"";o=!1;const l=document.createElement("div");l.id="source_"+e.videoPlayerId+"_"+t.title,l.className="fluid_video_source_list_item",l.innerHTML='<span class="source_button_icon '+i+'"></span>'+t.title+s,l.addEventListener("click",function(t){t.stopPropagation(),e.domRef.player.style.width=e.domRef.player.clientWidth+"px",e.domRef.player.style.height=e.domRef.player.clientHeight+"px";const n=this,i=document.getElementsByClassName("source_button_icon");for(let e=0;e<i.length;e++)i[e].className=i[e].className.replace("source_selected","");n.firstChild.className+=" source_selected",e.videoSources.forEach(t=>{t.title===n.innerText.replace(/(\r\n\t|\n|\r\t)/gm,"")&&(e.setBuffering(),e.setVideoSource(t.url),e.fluidStorage.fluidQuality=t.title)}),e.openCloseVideoSourceSwitch()}),a.appendChild(l),r=!0}r?(i.appendChild(a),i.addEventListener("click",()=>{e.openCloseVideoSourceSwitch()})):document.getElementById(e.videoPlayerId+"_fluid_control_video_source").style.display="none"},e.openCloseVideoSourceSwitch=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_video_source_list");if(e.isCurrentlyPlayingAd)return void(t.style.display="none");if("none"!==t.style.display)return void(t.style.display="none");t.style.display="block";const n=()=>{t.removeEventListener("mouseleave",n),t.style.display="none"};t.addEventListener("mouseleave",n)},e.setVideoSource=t=>{if("iOS"===e.mobileInfo.userOs&&t.indexOf(".mkv")>0)return console.log("[FP_ERROR] .mkv files not supported by iOS devices."),!1;if(e.isCurrentlyPlayingAd)return void(e.originalSrc=t);e.isSwitchingSource=!0;let n=!1;e.domRef.player.paused||(e.domRef.player.pause(),n=!0);const i=e.domRef.player.currentTime;e.setCurrentTimeAndPlay(i,n),e.domRef.player.src=t,e.originalSrc=t,e.displayOptions.layoutControls.mediaType=e.getCurrentSrcType(),e.initialiseStreamers()},e.setCurrentTimeAndPlay=(t,n)=>{const i=()=>{e.domRef.player.currentTime=t,e.domRef.player.removeEventListener("loadedmetadata",i),"iOS"!==e.mobileInfo.userOs&&"safari"!==e.getBrowserVersion().browserName.toLowerCase()||e.domRef.player.addEventListener("playing",r),n?e.domRef.player.play():(e.domRef.player.pause(),e.controlPlayPauseToggle(e.videoPlayerId)),e.isSwitchingSource=!1,e.domRef.player.style.width="100%",e.domRef.player.style.height="100%"};let r=()=>{e.currentTime=t,e.domRef.player.removeEventListener("playing",r)};e.domRef.player.addEventListener("loadedmetadata",i,!1),e.domRef.player.load()},e.initTitle=()=>{if(!e.displayOptions.layoutControls.title)return;const t=document.createElement("div");t.id=e.videoPlayerId+"_title",e.domRef.player.parentNode.insertBefore(t,null),t.innerHTML+=e.displayOptions.layoutControls.title,t.classList.add("fp_title")},e.hasTitle=()=>{const t=document.getElementById(e.videoPlayerId+"_title"),n=e.displayOptions.layoutControls.title;return t&&null!=n},e.hideTitle=()=>{const t=document.getElementById(e.videoPlayerId+"_title");e.hasTitle()&&t.classList.add("fade_out")},e.showTitle=()=>{const t=document.getElementById(e.videoPlayerId+"_title");e.hasTitle()&&t.classList.remove("fade_out")},e.initLogo=()=>{if(!e.displayOptions.layoutControls.logo.imageUrl)return;const t=document.createElement("div");t.id=e.videoPlayerId+"_logo";let n="logo_maintain_display";e.displayOptions.layoutControls.logo.hideWithControls&&(n="initial_controls_show"),t.classList.add(n,"fp_logo");const i=document.createElement("img");i.id=e.videoPlayerId+"_logo_image",e.displayOptions.layoutControls.logo.imageUrl&&(i.src=e.displayOptions.layoutControls.logo.imageUrl),i.style.position="absolute",i.style.margin=e.displayOptions.layoutControls.logo.imageMargin;const r=e.displayOptions.layoutControls.logo.position.toLowerCase();-1!==r.indexOf("bottom")?i.style.bottom=0:i.style.top=0,-1!==r.indexOf("right")?i.style.right=0:i.style.left=0,e.displayOptions.layoutControls.logo.opacity&&(i.style.opacity=e.displayOptions.layoutControls.logo.opacity),null!==e.displayOptions.layoutControls.logo.clickUrl&&(i.style.cursor="pointer",i.addEventListener("click",function(){window.open(e.displayOptions.layoutControls.logo.clickUrl,"_blank").focus()})),e.displayOptions.layoutControls.logo.mouseOverImageUrl&&(i.addEventListener("mouseover",function(){i.src=e.displayOptions.layoutControls.logo.mouseOverImageUrl},!1),i.addEventListener("mouseout",function(){i.src=e.displayOptions.layoutControls.logo.imageUrl},!1)),e.domRef.player.parentNode.insertBefore(t,null),t.appendChild(i,null)},e.initHtmlOnPauseBlock=()=>
29{if(e.hasValidOnPauseAd())return;if(!e.displayOptions.layoutControls.htmlOnPauseBlock.html)return;const t=document.createElement("div");t.id=e.videoPlayerId+"_fluid_html_on_pause",t.className="fluid_html_on_pause",t.style.display="none",t.innerHTML=e.displayOptions.layoutControls.htmlOnPauseBlock.html,t.onclick=function(t){e.playPauseToggle()},e.displayOptions.layoutControls.htmlOnPauseBlock.width&&(t.style.width=e.displayOptions.layoutControls.htmlOnPauseBlock.width+"px"),e.displayOptions.layoutControls.htmlOnPauseBlock.height&&(t.style.height=e.displayOptions.layoutControls.htmlOnPauseBlock.height+"px"),e.domRef.player.parentNode.insertBefore(t,null)},e.initPlayButton=()=>{const t=document.createElement("div");t.id=e.videoPlayerId+"_fluid_initial_play_button",t.className="fluid_html_on_pause";const n=e.displayOptions.layoutControls.primaryColor?e.displayOptions.layoutControls.primaryColor:"#333333";t.innerHTML='<div id="'+e.videoPlayerId+'_fluid_initial_play" class="fluid_initial_play" style="background-color:'+n+'"><div id="'+e.videoPlayerId+'_fluid_state_button" class="fluid_initial_play_button"></div></div>';const i=function(){e.playPauseToggle(),t.removeEventListener("click",i)};if(t.addEventListener("click",i),!e.displayOptions.layoutControls.playButtonShowing){document.getElementById(e.videoPlayerId+"_fluid_controls_container").classList.add("initial_controls_show"),t.style.opacity="0"}e.domRef.player.parentNode.insertBefore(t,null)},e.mainVideoReady=()=>{if(0!==e.mainVideoDuration||e.isCurrentlyPlayingAd||!1!==e.mainVideoReadyState)return;const t=new CustomEvent("mainVideoDurationSet");e.mainVideoDuration=e.domRef.player.duration,e.mainVideoReadyState=!0,e.domRef.player.dispatchEvent(t),e.domRef.player.removeEventListener("loadedmetadata",e.mainVideoReady)},e.userActivityChecker=()=>{const t=e.domRef.wrapper;e.newActivity=null;let n=!1;const i=t=>{"touchstart"!==t.type&&"mousedown"!==t.type||(n=!0),"touchend"!==t.type&&"mouseup"!==t.type||(n=!1),e.newActivity=!0};setInterval(()=>{if(!0===e.newActivity){if(n||e.isLoading||(e.newActivity=!1),!1===e.isUserActive||!e.isControlBarVisible()){let t=new CustomEvent("userActive");e.domRef.player.dispatchEvent(t),e.isUserActive=!0}clearTimeout(e.inactivityTimeout),e.inactivityTimeout=setTimeout(function(){if(!0!==e.newActivity){e.isUserActive=!1;let t=new CustomEvent("userInactive");e.domRef.player.dispatchEvent(t)}else clearTimeout(e.inactivityTimeout)},1e3*e.displayOptions.layoutControls.controlBar.autoHideTimeout)}},300);const r=e.isTouchDevice()?["touchstart","touchmove","touchend"]:["mousemove","mousedown","mouseup"];for(let e=0;e<r.length;e++)t.addEventListener(r[e],i)},e.hasControlBar=()=>!!document.getElementById(e.videoPlayerId+"_fluid_controls_container"),e.isControlBarVisible=()=>{if(!1===e.hasControlBar())return!1;const t=document.getElementById(e.videoPlayerId+"_fluid_controls_container"),n=window.getComputedStyle(t,null);return!(0===n.opacity||"hidden"===n.visibility)},e.setVideoPreload=()=>{e.domRef.player.setAttribute("preload",e.displayOptions.layoutControls.preload)},e.hideControlBar=()=>{if(e.isCurrentlyPlayingAd&&!e.domRef.player.paused&&e.toggleAdCountdown(!0),e.domRef.player.style.cursor="none",!e.hasControlBar())return;const t=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_container"),n=e.domRef.player.parentNode.getElementsByClassName("fp_logo");for(let n=0;n<t.length;n++)e.displayOptions.layoutControls.controlBar.animated?(t[n].classList.remove("fade_in"),t[n].classList.add("fade_out")):t[n].style.display="none";for(let t=0;t<n.length;t++)e.displayOptions.layoutControls.controlBar.animated?n[t]&&(n[t].classList.remove("fade_in"),n[t].classList.add("fade_out")):n[t]&&(n[t].style.display="none")},e.showControlBar=()=>{if(e.isCurrentlyPlayingAd&&!e.domRef.player.paused&&e.toggleAdCountdown(!1),e.isTouchDevice()||(e.domRef.player.style.cursor="default"),!e.hasControlBar())return;const t=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_container"),n=e.domRef.player.parentNode.getElementsByClassName("fp_logo");for(let n=0;n<t.length;n++)e.displayOptions.layoutControls.controlBar.animated?(t[n].classList.remove("fade_out"),t[n].classList.add("fade_in")):t[n].style.display="block";for(let t=0;t<n.length;t++)e.displayOptions.layoutControls.controlBar.animated?n[t]&&(n[t].classList.remove("fade_out"),n[t].classList.add("fade_in")):n[t]&&(n[t].style.display="block")},e.linkControlBarUserActivity=()=>{e.domRef.player.addEventListener("userInactive",e.hideControlBar),e.domRef.player.addEventListener("userActive",e.showControlBar),e.domRef.player.addEventListener("userInactive",e.hideTitle),e.domRef.player.addEventListener("userActive",e.showTitle)},e.initMute=()=>{!0===e.displayOptions.layoutControls.mute&&(e.domRef.player.volume=0)},e.initLoop=()=>{e.domRef.player.loop=!!e.displayOptions.layoutControls.loop},e.setBuffering=()=>{let t;const n=e.domRef.player.parentNode.getElementsByClassName("fluid_controls_buffered");for(let e=0;e<n.length;e++)n[e].style.width=0;t=setInterval(()=>{const i=e.domRef.player.duration;if(!(i<=0))for(let r=0;r<e.domRef.player.buffered.length;r++){if(e.domRef.player.buffered.start(e.domRef.player.buffered.length-1-r)>=e.domRef.player.currentTime)continue;const a=e.domRef.player.buffered.end(e.domRef.player.buffered.length-1-r)/i*100+"%";for(let e=0;e<n.length;e++)n[e].style.width=a;t&&1===e.domRef.player.buffered.end(e.domRef.player.buffered.length-1-r)/i&&clearInterval(t);break}},500)},e.createPlaybackList=()=>{if(!e.displayOptions.layoutControls.playbackRateEnabled)return;document.getElementById(e.videoPlayerId+"_fluid_control_playback_rate").style.display="inline-block";const t=document.getElementById(e.videoPlayerId+"_fluid_control_playback_rate"),n=document.createElement("div");n.id=e.videoPlayerId+"_fluid_control_video_playback_rate",n.className="fluid_video_playback_rates",n.style.display="none",["x2","x1.5","x1","x0.5"].forEach(function(t){const i=document.createElement("div");i.className="fluid_video_playback_rates_item",i.innerText=t,i.addEventListener("click",function(t){t.stopPropagation();let n=this.innerText.replace("x","");e.setPlaybackSpeed(n),e.openCloseVideoPlaybackRate()}),n.appendChild(i)}),t.appendChild(n),t.addEventListener("click",function(){e.openCloseVideoPlaybackRate()})},e.openCloseVideoPlaybackRate=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_video_playback_rate");if(e.isCurrentlyPlayingAd||"none"!==t.style.display)return void(t.style.display="none");t.style.display="block";const n=function(){t.removeEventListener("mouseleave",n),t.style.display="none"};t.addEventListener("mouseleave",n)},e.createDownload=()=>{const t=document.getElementById(e.videoPlayerId+"_fluid_control_download");if(!e.displayOptions.layoutControls.allowDownload)return;t.style.display="inline-block";let n=document.createElement("a");n.id=e.videoPlayerId+"_download",n.onclick=function(e){const t=this;void 0!==e.stopImmediatePropagation&&e.stopImmediatePropagation(),setInterval(function(){t.download="",t.href=""},100)},t.appendChild(n),t.addEventListener("click",function(){const t=document.getElementById(e.videoPlayerId+"_download");t.download=e.originalSrc,t.href=e.originalSrc,n.click()})},e.theatreToggle=()=>{if(e.isInIframe)return;if(e.fullscreenMode&&e.fullscreenToggle(),e.displayOptions.layoutControls.theatreAdvanced){const t=document.getElementById(e.displayOptions.layoutControls.theatreAdvanced.theatreElement),n=e.displayOptions.layoutControls.theatreAdvanced.classToApply;null!=t&&null!=n?(e.theatreMode?t.classList.remove(n):t.classList.add(n),e.theatreModeAdvanced=!e.theatreModeAdvanced):(console.log("[FP_ERROR] Theatre mode elements could not be found, defaulting behaviour."),e.defaultTheatre())}else e.defaultTheatre();e.theatreMode=!e.theatreMode,e.fluidStorage.fluidTheatre=e.theatreMode;const t=e.theatreMode?"theatreModeOn":"theatreModeOff",n=document.createEvent("CustomEvent");
vendor: 4,560 bytes, line 29
29n.initEvent(t,!1,!0),e.domRef.player.dispatchEvent(n),e.resizeVpaidAuto()},e.defaultTheatre=()=>{const t=document.getElementById("fluid_video_wrapper_"+e.videoPlayerId);if(e.theatreMode)return t.classList.remove("fluid_theatre_mode"),t.style.maxHeight="",t.style.marginTop="",t.style.left="",t.style.right="",t.style.position="",void(e.displayOptions.layoutControls.fillToContainer?(t.style.width="100%",t.style.height="100%"):(t.style.width=e.originalWidth+"px",t.style.height=e.originalHeight+"px"));t.classList.add("fluid_theatre_mode");const n=e.displayOptions.layoutControls.theatreSettings.width;let i="10px";switch(t.style.width=n,t.style.height=e.displayOptions.layoutControls.theatreSettings.height,t.style.maxHeight=screen.height+"px",t.style.marginTop=e.displayOptions.layoutControls.theatreSettings.marginTop+"px",e.displayOptions.layoutControls.theatreSettings.horizontalAlign){case"center":"string"==typeof n&&"%"===n.substr(n.length-1)?i=(100-parseInt(n.substring(0,n.length-1)))/2+"%":"string"==typeof n&&"px"===n.substr(n.length-2)?i=(screen.width-parseInt(n.substring(0,n.length-2)))/screen.width*100/2+"%":console.log("[FP_ERROR] Theatre width specified invalid."),t.style.left=i;break;case"right":t.style.right=i;break;default:t.style.left=i}},e.posterImage=()=>{if(!e.displayOptions.layoutControls.posterImage)return;const t=document.createElement("div");t.id=e.videoPlayerId+"_fluid_pseudo_poster",t.className="fluid_pseudo_poster",-1!==["auto","contain","cover"].indexOf(e.displayOptions.layoutControls.posterImageSize)?(t.style.background="url('"+e.displayOptions.layoutControls.posterImage+"') center center / "+e.displayOptions.layoutControls.posterImageSize+" no-repeat black",e.domRef.player.parentNode.insertBefore(t,null)):console.log("[FP_ERROR] Not allowed value in posterImageSize")},e.nextSource=()=>{const t=e.domRef.player.getElementsByTagName("source");if(!t.length)return null;for(let n=0;n<t.length-1;n++)if(t[n].getAttribute("src")===e.originalSrc&&t[n+1].getAttribute("src"))return void e.setVideoSource(t[n+1].getAttribute("src"))},e.inIframe=()=>{try{return window.self!==window.top}catch(e){return!0}},e.setPersistentSettings=()=>{if("undefined"==typeof Storage||"undefined"==typeof localStorage)return;const t="_fp_storage_enabled",n=localStorage;try{n.setItem(t,"1"),n.removeItem(t)}catch(e){return!1}if(e.fluidStorage=localStorage,void 0!==e.fluidStorage.fluidVolume&&e.displayOptions.layoutControls.persistentSettings.volume&&(e.setVolume(e.fluidStorage.fluidVolume),void 0!==e.fluidStorage.fluidMute&&"true"===e.fluidStorage.fluidMute&&e.muteToggle()),void 0!==e.fluidStorage.fluidQuality&&e.displayOptions.layoutControls.persistentSettings.quality){const t=document.getElementById("source_"+e.videoPlayerId+"_"+e.fluidStorage.fluidQuality),n=document.getElementById(e.videoPlayerId+"_fluid_control_video_source");t&&(t.click(),n.click())}void 0!==e.fluidStorage.fluidSpeed&&e.displayOptions.layoutControls.persistentSettings.speed&&e.setPlaybackSpeed(e.fluidStorage.fluidSpeed),void 0!==e.fluidStorage.fluidTheatre&&"true"===e.fluidStorage.fluidTheatre&&e.displayOptions.layoutControls.persistentSettings.theatre&&e.theatreToggle()},e.play=()=>{if(e.domRef.player.paused)return e.playPauseToggle(),!0},e.pause=()=>(e.domRef.player.paused||e.playPauseToggle(),!0),e.skipTo=t=>{e.domRef.player.currentTime=t},e.setPlaybackSpeed=t=>{e.isCurrentlyPlayingAd||(e.domRef.player.playbackRate=t,e.fluidStorage.fluidSpeed=t)},e.setVolume=t=>{e.domRef.player.volume=t;const n=0===t?1:t;e.latestVolume=n,e.fluidStorage.fluidVolume=n},e.isCurrentlyPlayingVideo=e=>e&&e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2,e.setHtmlOnPauseBlock=t=>{if("object"!=typeof t||void 0===t.html)return!1;const n=document.getElementById(e.videoPlayerId+"_fluid_html_on_pause");if(!n){const n=document.createElement("div");return n.id=e.videoPlayerId+"_fluid_html_on_pause",n.className="fluid_html_on_pause",n.style.display="none",n.innerHTML=t.html,n.onclick=function(){e.playPauseToggle()},t.width&&(n.style.width=t.width+"px"),t.height&&(n.style.height=t.height+"px"),void e.domRef.player.parentNode.insertBefore(n,null)}n.innerHTML=t.html,t.width&&(n.style.width=t.width+"px"),t.height&&(n.style.height=t.height+"px")},e.toggleControlBar=t=>{const n=document.getElementById(e.videoPlayerId+"fluid_controls_container");t?n.className+=" initial_controls_show":n.className=n.className.replace(" initial_controls_show","")},e.on=(t,n)=>{switch(t){case"play":e.domRef.player.onplay=n;break;case"seeked":e.domRef.player.onseeked=n;break;
29case"ended":e.domRef.player.onended=n;break;case"pause":e.domRef.player.addEventListener("pause",()=>{e.fluidPseudoPause||n()});break;case"playing":e.domRef.player.addEventListener("playing",n);break;case"theatreModeOn":e.domRef.player.addEventListener("theatreModeOn",n);break;case"theatreModeOff":e.domRef.player.addEventListener("theatreModeOff",n);break;case"timeupdate":e.domRef.player.addEventListener("timeupdate",()=>{n(e.getCurrentTime())});break;default:console.log("[FP_ERROR] Event not recognised")}},e.toggleLogo=t=>{if("object"!=typeof t||!t.imageUrl)return!1;const n=document.getElementById(e.videoPlayerId+"_logo");e.displayOptions.layoutControls.logo.imageUrl=t.imageUrl?t.imageUrl:null,e.displayOptions.layoutControls.logo.position=t.position?t.position:"top left",e.displayOptions.layoutControls.logo.clickUrl=t.clickUrl?t.clickUrl:null,e.displayOptions.layoutControls.logo.opacity=t.opacity?t.opacity:1,e.displayOptions.layoutControls.logo.mouseOverImageUrl=t.mouseOverImageUrl?t.mouseOverImageUrl:null,e.displayOptions.layoutControls.logo.imageMargin=t.imageMargin?t.imageMargin:"2px",e.displayOptions.layoutControls.logo.hideWithControls=!!t.hideWithControls&&t.hideWithControls,e.displayOptions.layoutControls.logo.showOverAds=!!t.showOverAds&&t.showOverAds,n&&n.remove(),e.initLogo()},e.trackEvent=(t,n,i,r)=>{void 0===e.events[i]&&(e.events[i]={}),void 0===e.events[i][n]&&(e.events[i][n]=[]),e.events[i][n].push(r),e.registerListener(t,n,i,r)},e.registerListener=(e,t,n,i)=>{const r=e.querySelectorAll(n);for(let e=0;e<r.length;e++)r[e].addEventListener(t,i)},e.copyEvents=t=>{for(let n in e.events)if(e.events.hasOwnProperty(n))for(let i in e.events[n])if(e.events[n].hasOwnProperty(i))for(let r=0;r<e.events[n][i].length;r++)e.registerListener(t,i,n,e.events[n][i][r])},e.destroy=()=>{const t=e.destructors.length;if(0===t)return;for(let n=0;n<t;++n)e.destructors[n].bind(this)();const n=document.getElementById("fluid_video_wrapper_"+e.videoPlayerId);n?"function"!=typeof n.remove?n.parentNode?n.parentNode.removeChild(n):console.error("Unable to remove wrapper element for Fluid Player instance - no parent"+e.videoPlayerId):n.remove():console.warn("Unable to remove wrapper element for Fluid Player instance - element not found "+e.videoPlayerId)}},l=function(e){this.play=()=>e.play(),this.pause=()=>e.pause(),this.skipTo=t=>e.skipTo(t),this.setPlaybackSpeed=t=>e.setPlaybackSpeed(t),this.setVolume=t=>e.setVolume(t),this.setHtmlOnPauseBlock=t=>e.setHtmlOnPauseBlock(t),this.toggleControlBar=t=>e.toggleControlBar(t),this.toggleFullScreen=t=>e.fullscreenToggle(t),this.destroy=()=>e.destroy(),this.dashInstance=()=>e.dashPlayer?e.dashPlayer:null,this.hlsInstance=()=>e.hlsPlayer?e.hlsPlayer:null,this.on=(t,n)=>e.on(t,n)};r&&console.log("Fluid Player - Development Build"+(a?" (in debug mode)":""));t.a=function(e,t){const n=new s;n.init(e,t);const i=new l(n);if(window&&r){const r={id:e,options:t,instance:i,internals:n};void 0===window.fluidPlayerDebug&&(window.fluidPlayerDebug=[]),window.fluidPlayerDebug.push(r),console.log("Created instance of Fluid Player. Debug API available at window.fluidPlayerDebug["+(window.fluidPlayerDebug.length-1)+"].",r)}return i}},,function(e,t,n){
30/*!
31  * Bootstrap v4.6.2 (https://getbootstrap.com/)
32  * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
33  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
34  */
35!function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(t),a=i(n);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l.apply(this,arguments)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}
vendor: 19,275 bytes, line 35
35function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var c="transitionend",f=1e6,h=1e3;function p(e){return null==e?""+e:{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()}function m(){return{bindType:c,delegateType:c,handle:function(e){if(r.default(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function g(e){var t=this,n=!1;return r.default(this).one(y.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||y.triggerTransitionEnd(t)},e),this}function v(){r.default.fn.emulateTransitionEnd=g,r.default.event.special[y.TRANSITION_END]=m()}var y={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(Math.random()*f)}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var t=r.default(e).css("transition-duration"),n=r.default(e).css("transition-delay"),i=parseFloat(t),a=parseFloat(n);return i||a?(t=t.split(",")[0],n=n.split(",")[0],(parseFloat(t)+parseFloat(n))*h):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){r.default(e).trigger(c)},supportsTransitionEnd:function(){return Boolean(c)},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],a=t[i],o=a&&y.isElement(a)?"element":p(a);if(!new RegExp(r).test(o))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+o+'" but expected type "'+r+'".')}},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?y.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if(void 0===r.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=r.default.fn.jquery.split(" ")[0].split("."),t=1,n=2,i=9,a=1,o=4;if(e[0]<n&&e[1]<i||e[0]===t&&e[1]===i&&e[2]<a||e[0]>=o)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};y.jQueryDetection(),v();var _="alert",E="4.6.2",b="bs.alert",T="."+b,w=".data-api",A=r.default.fn[_],S="alert",x="fade",M="show",R="close"+T,C="closed"+T,I="click"+T+w,L='[data-dismiss="alert"]',O=function(){function e(e){this._element=e}var t=e.prototype;return t.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},t.dispose=function(){r.default.removeData(this._element,b),this._element=null},t._getRootElement=function(e){var t=y.getSelectorFromElement(e),n=!1;return t&&(n=document.querySelector(t)),n||(n=r.default(e).closest("."+S)[0]),n},t._triggerCloseEvent=function(e){var t=r.default.Event(R);return r.default(e).trigger(t),t},t._removeElement=function(e){var t=this;if(r.default(e).removeClass(M),r.default(e).hasClass(x)){var n=y.getTransitionDurationFromElement(e);r.default(e).one(y.TRANSITION_END,function(n){return t._destroyElement(e,n)}).emulateTransitionEnd(n)}else this._destroyElement(e)},t._destroyElement=function(e){r.default(e).detach().trigger(C).remove()},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this),i=n.data(b);i||(i=new e(this),n.data(b,i)),"close"===t&&i[t](this)})},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(e,null,[{key:"VERSION",get:function(){return E}}]),e}();r.default(document).on(I,L,O._handleDismiss(new O)),r.default.fn[_]=O._jQueryInterface,r.default.fn[_].Constructor=O,r.default.fn[_].noConflict=function(){return r.default.fn[_]=A,O._jQueryInterface};var D="button",P="4.6.2",N="bs.button",k="."+N,F=".data-api",B=r.default.fn[D],U="active",j="btn",G="focus",V="click"+k+F,H="focus"+k+F+" blur"+k+F,z="load"+k+F,W='[data-toggle^="button"]',q='[data-toggle="buttons"]',Y='[data-toggle="button"]',K='[data-toggle="buttons"] .btn',X='input:not([type="hidden"])',Q=".active",Z=".btn",J=function(){function e(e){this._element=e,this.shouldAvoidTriggerChange=!1}var t=e.prototype;return t.toggle=function(){var e=!0,t=!0,n=r.default(this._element).closest(q)[0];if(n){var i=this._element.querySelector(X);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(U))e=!1;else{var a=n.querySelector(Q);a&&r.default(a).removeClass(U)}e&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains(U)),this.shouldAvoidTriggerChange||r.default(i).trigger("change")),i.focus(),t=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(t&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(U)),e&&r.default(this._element).toggleClass(U))},t.dispose=function(){r.default.removeData(this._element,N),this._element=null},e._jQueryInterface=function(t,n){return this.each(function(){var i=r.default(this),a=i.data(N);a||(a=new e(this),i.data(N,a)),a.shouldAvoidTriggerChange=n,"toggle"===t&&a[t]()})},s(e,null,[{key:"VERSION",get:function(){return P}}]),e}();r.default(document).on(V,W,function(e){var t=e.target,n=t;if(r.default(t).hasClass(j)||(t=r.default(t).closest(Z)[0]),!t||t.hasAttribute("disabled")||t.classList.contains("disabled"))e.preventDefault();else{var i=t.querySelector(X);if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void e.preventDefault();"INPUT"!==n.tagName&&"LABEL"===t.tagName||J._jQueryInterface.call(r.default(t),"toggle","INPUT"===n.tagName)}}).on(H,W,function(e){var t=r.default(e.target).closest(Z)[0];r.default(t).toggleClass(G,/^focus(in)?$/.test(e.type))}),r.default(window).on(z,function(){for(var e=[].slice.call(document.querySelectorAll(K)),t=0,n=e.length;t<n;t++){var i=e[t],r=i.querySelector(X);r.checked||r.hasAttribute("checked")?i.classList.add(U):i.classList.remove(U)}for(var a=0,o=(e=[].slice.call(document.querySelectorAll(Y))).length;a<o;a++){var s=e[a];"true"===s.getAttribute("aria-pressed")?s.classList.add(U):s.classList.remove(U)}}),r.default.fn[D]=J._jQueryInterface,r.default.fn[D].Constructor=J,r.default.fn[D].noConflict=function(){return r.default.fn[D]=B,J._jQueryInterface};var $="carousel",ee="4.6.2",te="bs.carousel",ne="."+te,ie=".data-api",re=r.default.fn[$],ae=37,oe=39,se=500,le=40,ue="carousel",de="active",ce="slide",fe="carousel-item-right",he="carousel-item-left",pe="carousel-item-next",me="carousel-item-prev",ge="pointer-event",ve="next",ye="prev",_e="left",Ee="right",be="slide"+ne,Te="slid"+ne,we="keydown"+ne,Ae="mouseenter"+ne,Se="mouseleave"+ne,xe="touchstart"+ne,Me="touchmove"+ne,Re="touchend"+ne,Ce="pointerdown"+ne,Ie="pointerup"+ne,Le="dragstart"+ne,Oe="load"+ne+ie,De="click"+ne+ie,Pe=".active",Ne=".active.carousel-item",ke=".carousel-item",Fe=".carousel-item img",Be=".carousel-item-next, .carousel-item-prev",Ue=".carousel-indicators",je="[data-slide], [data-slide-to]",Ge='[data-ride="carousel"]',Ve={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},He={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},ze={TOUCH:"touch",PEN:"pen"},We=function(){function e(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._element=e,this._indicatorsElement=this._element.querySelector(Ue),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=e.prototype;return t.next=function(){this._isSliding||this._slide(ve)},t.nextWhenVisible=function(){var e=r.default(this._element);!document.hidden&&e.is(":visible")&&"hidden"!==e.css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(ye)},t.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(Be)&&(y.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(e){var t=this;this._activeElement=this._element.querySelector(Ne);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)r.default(this._element).one(Te,function(){return t.to(e)});else{if(n===e)return this.pause(),void this.cycle();var i=e>n?ve:ye;this._slide(i,this._items[e])}},t.dispose=function(){r.default(this._element).off(ne),r.default.removeData(this._element,te),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(e){return e=l({},Ve,e),y.typeCheckConfig($,e,He),e},t._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=le)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&r.default(this._element).on(we,function(t){return e._keydown(t)}),"hover"===this._config.pause&&r.default(this._element).on(Ae,function(t){return e.pause(t)}).on(Se,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var t=function(t){e._pointerEvent&&ze[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},n=function(t){e.touchDeltaX=t.originalEvent.touches&&t.originalEvent.touches.length>1?0:t.originalEvent.touches[0].clientX-e.touchStartX},i=function(t){e._pointerEvent&&ze[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},se+e._config.interval))};r.default(this._element.querySelectorAll(Fe)).on(Le,function(e){return e.preventDefault()}),this._pointerEvent?(r.default(this._element).on(Ce,function(e){return t(e)}),r.default(this._element).on(Ie,function(e){return i(e)}),this._element.classList.add(ge)):(r.default(this._element).on(xe,function(e){return t(e)}),r.default(this._element).on(Me,function(e){return n(e)}),r.default(this._element).on(Re,function(e){return i(e)}))}},t._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case ae:e.preventDefault(),this.prev();break;case oe:e.preventDefault(),this.next()}},t._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(ke)):[],this._items.indexOf(e)},t._getItemByDirection=function(e,t){var n=e===ve,i=e===ye,r=this._getItemIndex(t),a=this._items.length-1;if((i&&0===r||n&&r===a)&&!this._config.wrap)return t;var o=(r+(e===ye?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},t._triggerSlideEvent=function(e,t){var n=this._getItemIndex(e),i=this._getItemIndex(this._element.querySelector(Ne)),a=r.default.Event(be,{relatedTarget:e,direction:t,from:i,to:n});return r.default(this._element).trigger(a),a},t._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var t=[].slice.call(this._indicatorsElement.querySelectorAll(Pe));r.default(t).removeClass(de);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&r.default(n).addClass(de)}},t._updateInterval=function(){var e=this._activeElement||this._element.querySelector(Ne);if(e){var t=parseInt(e.getAttribute("data-interval"),10);t?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=t):this._config.interval=this._config.defaultInterval||this._config.interval}},t._slide=function(e,t){var n,i,a,o=this,s=this._element.querySelector(Ne),l=this._getItemIndex(s),u=t||s&&this._getItemByDirection(e,s),d=this._getItemIndex(u),c=Boolean(this._interval);if(e===ve?(n=he,i=pe,a=_e):(n=fe,i=me,a=Ee),u&&r.default(u).hasClass(de))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&s&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u),this._activeElement=u;var f=r.default.Event(Te,{relatedTarget:u,direction:a,from:l,to:d});if(r.default(this._element).hasClass(ce)){r.default(u).addClass(i),y.reflow(u),r.default(s).addClass(n),r.default(u).addClass(n);var h=y.getTransitionDurationFromElement(s);r.default(s).one(y.TRANSITION_END,function(){r.default(u).removeClass(n+" "+i).addClass(de),r.default(s).removeClass(de+" "+i+" "+n),o._isSliding=!1,setTimeout(function(){return r.default(o._element).trigger(f)},0)}).emulateTransitionEnd(h)}else r.default(s).removeClass(de),r.default(u).addClass(de),this._isSliding=!1,r.default(this._element).trigger(f);c&&this.cycle()}},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this).data(te),i=l({},Ve,r.default(this).data());"object"==typeof t&&(i=l({},i,t));var a="string"==typeof t?t:i.slide;if(n||(n=new e(this,i),r.default(this).data(te,n)),"number"==typeof t)n.to(t);else if("string"==typeof a){if(void 0===n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())})},e._dataApiClickHandler=function(t){var n=y.getSelectorFromElement(this);if(n){var i=r.default(n)[0];if(i&&r.default(i).hasClass(ue)){var a=l({},r.default(i).data(),r.default(this).data()),o=this.getAttribute("data-slide-to");o&&(a.interval=!1),e._jQueryInterface.call(r.default(i),a),o&&r.default(i).data(te).to(o),t.preventDefault()}}},s(e,null,[{key:"VERSION",get:function(){return ee}},{key:"Default",get:function(){return Ve}}]),e}();r.default(document).on(De,je,We._dataApiClickHandler),r.default(window).on(Oe,function(){for(var e=[].slice.call(document.querySelectorAll(Ge)),t=0,n=e.length;t<n;t++){var i=r.default(e[t]);We._jQueryInterface.call(i,i.data())}}),r.default.fn[$]=We._jQueryInterface,r.default.fn[$].Constructor=We,r.default.fn[$].noConflict=function(){return r.default.fn[$]=re,We._jQueryInterface};var qe="collapse",Ye="4.6.2",Ke="bs.collapse",Xe="."+Ke,Qe=".data-api",Ze=r.default.fn[qe],Je="show",$e="collapse",et="collapsing",tt="collapsed",nt="width",it="height",rt="show"+Xe,at="shown"+Xe,ot="hide"+Xe,st="hidden"+Xe,lt="click"+Xe+Qe,ut=".show, .collapsing",dt='[data-toggle="collapse"]',ct={toggle:!0,parent:""},ft={toggle:"boolean",parent:"(string|element)"},ht=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(dt)),i=0,r=n.length;i<r;i++){var a=n[i],o=y.getSelectorFromElement(a),s=[].slice.call(document.querySelectorAll(o)).filter(function(t){return t===e});null!==o&&s.length>0&&(this._selector=o,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=e.prototype;return t.toggle=function(){r.default(this._element).hasClass(Je)?this.hide():this.show()},t.show=function(){var t,n,i=this;if(!(this._isTransitioning||r.default(this._element).hasClass(Je)||(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(ut)).filter(function(e){return"string"==typeof i._config.parent?e.getAttribute("data-parent")===i._config.parent:e.classList.contains($e)})).length&&(t=null),t&&(n=r.default(t).not(this._selector).data(Ke))&&n._isTransitioning))){var a=r.default.Event(rt);if(r.default(this._element).trigger(a),!a.isDefaultPrevented()){t&&(e._jQueryInterface.call(r.default(t).not(this._selector),"hide"),n||r.default(t).data(Ke,null));var o=this._getDimension();r.default(this._element).removeClass($e).addClass(et),this._element.style[o]=0,this._triggerArray.length&&r.default(this._triggerArray).removeClass(tt).attr("aria-expanded",!0),this.setTransitioning(!0);var s=function(){r.default(i._element).removeClass(et).addClass($e+" "+Je),i._element.style[o]="",i.setTransitioning(!1),r.default(i._element).trigger(at)},l="scroll"+(o[0].toUpperCase()+o.slice(1)),u=y.getTransitionDurationFromElement(this._element);r.default(this._element).one(y.TRANSITION_END,s).emulateTransitionEnd(u),this._element.style[o]=this._element[l]+"px"}}},t.hide=function(){var e=this;if(!this._isTransitioning&&r.default(this._element).hasClass(Je)){var t=r.default.Event(ot);if(r.default(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",y.reflow(this._element),r.default(this._element).addClass(et).removeClass($e+" "+Je);var i=this._triggerArray.length;if(i>0)for(var a=0;a<i;a++){var o=this._triggerArray[a],s=y.getSelectorFromElement(o);null!==s&&(r.default([].slice.call(document.querySelectorAll(s))).hasClass(Je)||r.default(o).addClass(tt).attr("aria-expanded",!1))}this.setTransitioning(!0);var l=function(){e.setTransitioning(!1),r.default(e._element).removeClass(et).addClass($e).trigger(st)};this._element.style[n]="";var u=y.getTransitionDurationFromElement(this._element);r.default(this._element).one(y.TRANSITION_END,l).emulateTransitionEnd(u)}}},t.setTransitioning=function(e){this._isTransitioning=e},t.dispose=function(){r.default.removeData(this._element,Ke),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(e){return(e=l({},ct,e)).toggle=Boolean(e.toggle),y.typeCheckConfig(qe,e,ft),e},t._getDimension=function(){return r.default(this._element).hasClass(nt)?nt:it},t._getParent=function(){var t,n=this;y.isElement(this._config.parent)?(t=this._config.parent,void 0!==this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',a=[].slice.call(t.querySelectorAll(i));return r.default(a).each(function(t,i){n._addAriaAndCollapsedClass(e._getTargetFromElement(i),[i])}),t},t._addAriaAndCollapsedClass=function(e,t){var n=r.default(e).hasClass(Je);t.length&&r.default(t).toggleClass(tt,!n).attr("aria-expanded",n)},e._getTargetFromElement=function(e){var t=y.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this),i=n.data(Ke),a=l({},ct,n.data(),"object"==typeof t&&t?t:{});if(!i&&a.toggle&&"string"==typeof t&&/show|hide/.test(t)&&(a.toggle=!1),i||(i=new e(this,a),n.data(Ke,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method n
35amed "'+t+'"');i[t]()}})},s(e,null,[{key:"VERSION",get:function(){return Ye}},{key:"Default",get:function(){return ct}}]),e}();r.default(document).on(lt,dt,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var t=r.default(this),n=y.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(n));r.default(i).each(function(){var e=r.default(this),n=e.data(Ke)?"toggle":t.data();ht._jQueryInterface.call(e,n)})}),r.default.fn[qe]=ht._jQueryInterface,r.default.fn[qe].Constructor=ht,r.default.fn[qe].noConflict=function(){return r.default.fn[qe]=Ze,ht._jQueryInterface};var pt="dropdown",mt="4.6.2",gt="bs.dropdown",vt="."+gt,yt=".data-api",_t=r.default.fn[pt],Et=27,bt=32,Tt=9,wt=38,At=40,St=3,xt=new RegExp(wt+"|"+At+"|"+Et),Mt="disabled",Rt="show",Ct="dropup",It="dropright",Lt="dropleft",Ot="dropdown-menu-right",Dt="position-static",Pt="hide"+vt,Nt="hidden"+vt,kt="show"+vt,Ft="shown"+vt,Bt="click"+vt,Ut="click"+vt+yt,jt="keydown"+vt+yt,Gt="keyup"+vt+yt,Vt='[data-toggle="dropdown"]',Ht=".dropdown form",zt=".dropdown-menu",Wt=".navbar-nav",qt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Yt="top-start",Kt="top-end",Xt="bottom-start",Qt="bottom-end",Zt="right-start",Jt="left-start",$t={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},en={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},tn=function(){function e(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=e.prototype;return t.toggle=function(){if(!this._element.disabled&&!r.default(this._element).hasClass(Mt)){var t=r.default(this._menu).hasClass(Rt);e._clearMenus(),t||this.show(!0)}},t.show=function(t){if(void 0===t&&(t=!1),!(this._element.disabled||r.default(this._element).hasClass(Mt)||r.default(this._menu).hasClass(Rt))){var n={relatedTarget:this._element},i=r.default.Event(kt,n),o=e._getParentFromElement(this._element);if(r.default(o).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar&&t){if(void 0===a.default)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=o:y.isElement(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&r.default(o).addClass(Dt),this._popper=new a.default(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===r.default(o).closest(Wt).length&&r.default(document.body).children().on("mouseover",null,r.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),r.default(this._menu).toggleClass(Rt),r.default(o).toggleClass(Rt).trigger(r.default.Event(Ft,n))}}},t.hide=function(){if(!this._element.disabled&&!r.default(this._element).hasClass(Mt)&&r.default(this._menu).hasClass(Rt)){var t={relatedTarget:this._element},n=r.default.Event(Pt,t),i=e._getParentFromElement(this._element);r.default(i).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),r.default(this._menu).toggleClass(Rt),r.default(i).toggleClass(Rt).trigger(r.default.Event(Nt,t)))}},t.dispose=function(){r.default.removeData(this._element,gt),r.default(this._element).off(vt),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;r.default(this._element).on(Bt,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(e){return e=l({},this.constructor.Default,r.default(this._element).data(),e),y.typeCheckConfig(pt,e,this.constructor.DefaultType),e},t._getMenuElement=function(){if(!this._menu){var t=e._getParentFromElement(this._element);t&&(this._menu=t.querySelector(zt))}return this._menu},t._getPlacement=function(){var e=r.default(this._element.parentNode),t=Xt;return e.hasClass(Ct)?t=r.default(this._menu).hasClass(Ot)?Kt:Yt:e.hasClass(It)?t=Zt:e.hasClass(Lt)?t=Jt:r.default(this._menu).hasClass(Ot)&&(t=Qt),t},t._detectNavbar=function(){return r.default(this._element).closest(".
35navbar").length>0},t._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets,e._element)),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),l({},e,this._config.popperConfig)},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this).data(gt);if(n||(n=new e(this,"object"==typeof t?t:null),r.default(this).data(gt,n)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},e._clearMenus=function(t){if(!t||t.which!==St&&("keyup"!==t.type||t.which===Tt))for(var n=[].slice.call(document.querySelectorAll(Vt)),i=0,a=n.length;i<a;i++){var o=e._getParentFromElement(n[i]),s=r.default(n[i]).data(gt),l={relatedTarget:n[i]};if(t&&"click"===t.type&&(l.clickEvent=t),s){var u=s._menu;if(r.default(o).hasClass(Rt)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&t.which===Tt)&&r.default.contains(o,t.target))){var d=r.default.Event(Pt,l);r.default(o).trigger(d),d.isDefaultPrevented()||("ontouchstart"in document.documentElement&&r.default(document.body).children().off("mouseover",null,r.default.noop),n[i].setAttribute("aria-expanded","false"),s._popper&&s._popper.destroy(),r.default(u).removeClass(Rt),r.default(o).removeClass(Rt).trigger(r.default.Event(Nt,l)))}}}},e._getParentFromElement=function(e){var t,n=y.getSelectorFromElement(e);return n&&(t=document.querySelector(n)),t||e.parentNode},e._dataApiKeydownHandler=function(t){if(!(/input|textarea/i.test(t.target.tagName)?t.which===bt||t.which!==Et&&(t.which!==At&&t.which!==wt||r.default(t.target).closest(zt).length):!xt.test(t.which))&&!this.disabled&&!r.default(this).hasClass(Mt)){var n=e._getParentFromElement(this),i=r.default(n).hasClass(Rt);if(i||t.which!==Et){if(t.preventDefault(),t.stopPropagation(),!i||t.which===Et||t.which===bt)return t.which===Et&&r.default(n.querySelector(Vt)).trigger("focus"),void r.default(this).trigger("click");var a=[].slice.call(n.querySelectorAll(qt)).filter(function(e){return r.default(e).is(":visible")});if(0!==a.length){var o=a.indexOf(t.target);t.which===wt&&o>0&&o--,t.which===At&&o<a.length-1&&o++,o<0&&(o=0),a[o].focus()}}}},s(e,null,[{key:"VERSION",get:function(){return mt}},{key:"Default",get:function(){return $t}},{key:"DefaultType",get:function(){return en}}]),e}();r.default(document).on(jt,Vt,tn._dataApiKeydownHandler).on(jt,zt,tn._dataApiKeydownHandler).on(Ut+" "+Gt,tn._clearMenus).on(Ut,Vt,function(e){e.preventDefault(),e.stopPropagation(),tn._jQueryInterface.call(r.default(this),"toggle")}).on(Ut,Ht,function(e){e.stopPropagation()}),r.default.fn[pt]=tn._jQueryInterface,r.default.fn[pt].Constructor=tn,r.default.fn[pt].noConflict=function(){return r.default.fn[pt]=_t,tn._jQueryInterface};var nn="modal",rn="4.6.2",an="bs.modal",on="."+an,sn=".data-api",ln=r.default.fn[nn],un=27,dn="modal-dialog-scrollable",cn="modal-scrollbar-measure",fn="modal-backdrop",hn="modal-open",pn="fade",mn="show",gn="modal-static",vn="hide"+on,yn="hidePrevented"+on,_n="hidden"+on,En="show"+on,bn="shown"+on,Tn="focusin"+on,wn="resize"+on,An="click.dismiss"+on,Sn="keydown.dismiss"+on,xn="mouseup.dismiss"+on,Mn="mousedown.dismiss"+on,Rn="click"+on+sn,Cn=".modal-dialog",In=".modal-body",Ln='[data-toggle="modal"]',On='[data-dismiss="modal"]',Dn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Pn=".sticky-top",Nn={backdrop:!0,keyboard:!0,focus:!0,show:!0},kn={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Fn=function(){function e(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(Cn),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var t=e.prototype;return t.toggle=function(e){return this._isShown?this.hide():this.show(e)},t.show=function(e){var t=this;if(!this._isShown&&!this._isTransitioning){var n=r.default.Event(En,{relatedTarget:e});r.default(this._element).trigger(n),n.isDefaultPrevented()||(this._isShown=!0,r.default(this._element).hasClass(pn)&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),r.default(this._element).on(An,On,function(e){return t.hide(e)}),r.default(this._dialog).on(Mn,function(){r.default(t._element).one(xn,function(e){r.default(e.target).is(t._element)&&(t._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return t._showElement(e)}))}},t.hide=function(e){var t=this;if(e&&e.preventDefault(),this._isShown&&!this._isTransitioning){var n=r.default.Event(vn);if(r.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=r.default(this._element).hasClass(pn);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),r.default(document).off(Tn),r.default(this._element).removeClass(mn),r.default(this._element).off(An),r.default(this._dialog).off(Mn),i){var a=y.getTransitionDurationFromElement(this._element);r.default(this._element).one(y.TRANSITION_END,function(e){return t._hideModal(e)}).emulateTransitionEnd(a)}else this._hideModal()}}},t.dispose=function(){[window,this._element,this._dialog].forEach(function(e){return r.default(e).off(on)}),r.default(document).off(Tn),r.default.removeData(this._element,an),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(e){return e=l({},Nn,e),y.typeCheckConfig(nn,e,kn),e},t._triggerBackdropTransition=function(){var e=this,t=r.default.Event(yn);if(r.default(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(gn);var i=y.getTransitionDurationFromElement(this._dialog);r.default(this._element).off(y.TRANSITION_END),r.default(this._element).one(y.TRANSITION_END,function(){e._element.classList.remove(gn),n||r.default(e._element).one(y.TRANSITION_END,function(){e._element.style.overflowY=""}).emulateTransitionEnd(e._element,i)}).emulateTransitionEnd(i),this._element.focus()}},t._showElement=function(e){var t=this,n=r.default(this._element).hasClass(pn),i=this._dialog?this._dialog.querySelector(In):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),r.default(this._dialog).hasClass(dn)&&i?i.scrollTop=0:this._element.scrollTop=0,n&&y.reflow(this._element),r.default(this._element).addClass(mn),this._config.focus&&this._enforceFocus();var a=r.default.Event(bn,{relatedTarget:e}),o=function(){t._config.focus&&t._element.focus(),t._isTransitioning=!1,r.default(t._element).trigger(a)};if(n){var s=y.getTransitionDurationFromElement(this._dialog);r.default(this._dialog).one(y.TRANSITION_END,o).emulateTransitionEnd(s)}else o()},t._enforceFocus=function(){var e=this;r.default(document).off(Tn).on(Tn,function(t){document!==t.target&&e._element!==t.target&&0===r.default(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown?r.default(this._element).on(Sn,function(t){e._config.keyboard&&t.which===un?(t.preventDefault(),e.hide()):e._config.keyboard||t.which!==un||e._triggerBackdropTransition()}):this._isShown||r.default(this._element).off(Sn)},t._setResizeEvent=function(){var e=this;this._isShown?r.default(window).on(wn,function(t){return e.handleUpdate(t)}):r.default(window).off(wn)},t._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){r.default(document.body).removeClass(hn),e._resetAdjustments(),e._resetScrollbar(),r.default(e._element).trigger(_n)})},t._removeBackdrop=function(){this._backdrop&&(r.default(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(e){var t=this,n=r.default(this._element).hasClass(pn)?pn:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=fn,n&&this._backdrop.classList.add(n),r.default(this._backdrop).appendTo(document.body),r.default(this._element).on(An,function(e){t._ignoreBackdropClick?t._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===t._config.backdrop?t._triggerBackdropTransition():t.hide())}),n&&y.reflow(this._backdrop),r.default(this._backdrop).addClass(mn),!e)return;if(!n)return void e();var i=y.getTransitionDurationFromElement(this._backdrop);r.default(this._backdrop).one(y.TRANSITION_END,e).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){r.default(this._backdrop).removeClass(mn);var a=function(){t._removeBackdrop(),e&&e()};if(r.default(this._element).hasClass(pn)){var o=y.getTransitionDurationFromElement(this._backdrop);r.default(this._backdrop).one(y.TRANSITION_END,a).emulateTransitionEnd(o)}else a()}else e&&e()},t._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(Dn)),n=[].slice.call(document.querySelectorAll(Pn));r.default(t).each(function(t,n){var i=n.style.paddingRight,a=r.default(n).css("padding-right");r.default(n).data("padding-right",i).css("padding-right",parseFloat(a)+e._scrollbarWidth+"px")}),r.default(n).each(function(t,n){var i=n.style.marginRight,a=r.default(n).css("margin-right");r.default(n).data("margin-right",i).css("margin-right",parseFloat(a)-e._scrollbarWidth+"px")});var i=document.body.style.paddingRight,a=r.default(document.body).css("padding-right");r.default(document.body).data("padding-right",i).css("padding-right",parseFloat(a)+this._scrollbarWidth+"px")}r.default(document.body).addClass(hn)},t._resetScrollbar=function(){var e=[].slice.call(document.querySelectorAll(Dn));r.default(e).each(function(e,t){var n=r.default(t).data("padding-right");r.default(t).removeData("padding-right"),t.style.paddingRight=n||""});var t=[].slice.call(document.querySelectorAll(""+Pn));r.default(t).each(function(e,t){var n=r.default(t).data("margin-right");void 0!==n&&r.default(t).css("margin-right",n).removeData("margin-right")});var n=r.default(document.body).data("padding-right");r.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var e=document.createElement("div");e.className=cn,document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},e._jQueryInterface=function(t,n){return this.each(function(){var i=r.default(this).data(an),a=l({},Nn,r.default(this).data(),"object"==typeof t&&t?t:{});if(i||(i=new e(this,a),r.default(this).data(an,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method n
35amed "'+t+'"');i[t](n)}else a.show&&i.show(n)})},s(e,null,[{key:"VERSION",get:function(){return rn}},{key:"Default",get:function(){return Nn}}]),e}();r.default(document).on(Rn,Ln,function(e){var t,n=this,i=y.getSelectorFromElement(this);i&&(t=document.querySelector(i));var a=r.default(t).data(an)?"toggle":l({},r.default(t).data(),r.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var o=r.default(t).one(En,function(e){e.isDefaultPrevented()||o.one(_n,function(){r.default(n).is(":visible")&&n.focus()})});Fn._jQueryInterface.call(r.default(t),a,this)}),r.default.fn[nn]=Fn._jQueryInterface,r.default.fn[nn].Constructor=Fn,r.default.fn[nn].noConflict=function(){return r.default.fn[nn]=ln,Fn._jQueryInterface};var Bn=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Un={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},jn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Gn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function Vn(e,t){var n=e.nodeName.toLowerCase();if(-1!==t.indexOf(n))return-1===Bn.indexOf(n)||Boolean(jn.test(e.nodeValue)||Gn.test(e.nodeValue));for(var i=t.filter(function(e){return e instanceof RegExp}),r=0,a=i.length;r<a;r++)if(i[r].test(n))return!0;return!1}function Hn(e,t,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);for(var i=(new window.DOMParser).parseFromString(e,"text/html"),r=Object.keys(t),a=[].slice.call(i.body.querySelectorAll("*")),o=function(e,n){var i=a[e],o=i.nodeName.toLowerCase();if(-1===r.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var s=[].slice.call(i.attributes),l=[].concat(t["*"]||[],t[o]||[]);s.forEach(function(e){Vn(e,l)||i.removeAttribute(e.nodeName)})},s=0,l=a.length;s<l;s++)o(s);return i.body.innerHTML}var zn="tooltip",Wn="4.6.2",qn="bs.tooltip",Yn="."+qn,Kn=r.default.fn[zn],Xn="bs-tooltip",Qn=new RegExp("(^|\\s)"+Xn+"\\S+","g"),Zn=["sanitize","whiteList","sanitizeFn"],Jn="fade",$n="show",ei="show",ti="out",ni=".tooltip-inner",ii=".arrow",ri="hover",ai="focus",oi="click",si="manual",li={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},ui={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Un,popperConfig:null},di={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},ci={HIDE:"hide"+Yn,HIDDEN:"hidden"+Yn,SHOW:"show"+Yn,SHOWN:"shown"+Yn,INSERTED:"inserted"+Yn,CLICK:"click"+Yn,FOCUSIN:"focusin"+Yn,FOCUSOUT:"focusout"+Yn,MOUSEENTER:"mouseenter"+Yn,MOUSELEAVE:"mouseleave"+Yn},fi=function(){function e(e,t){if(void 0===a.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var t=e.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(e){if(this._isEnabled)if(e){var t=this.constructor.DATA_KEY,n=r.default(e.currentTarget).data(t);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),r.default(e.currentTarget).data(t,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(r.default(this.getTipElement()).hasClass($n))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),r.default.removeData(this.element,this.constructor.DATA_KEY),r.default(this.element).off(this.constructor.EVENT_KEY),r.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&r.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===r.default(this.element).css("display"))throw new Error("Please use show on visible elements");var t=r.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){r.default(this.element).trigger(t);var n=y.findShadowRoot(this.element),i=r.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=y.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&r.default(o).addClass(Jn);var l="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,u=this._getAttachment(l);this.addAttachmentClass(u);var d=this._getContainer();r.default(o).data(this.constructor.DATA_KEY,this),r.default.contains(this.element.ownerDocument.documentElement,this.tip)||r.default(o).appendTo(d),r.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,o,this._getPopperConfig(u)),r.default(o).addClass($n),r.default(o).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&r.default(document.body).children().on("mouseover",null,r.default.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,r.default(e.element).trigger(e.constructor.Event.SHOWN),t===ti&&e._leave(null,e)};if(r.default(this.tip).hasClass(Jn)){var f=y.getTransitionDurationFromElement(this.tip);r.default(this.tip).one(y.TRANSITION_END,c).emulateTransitionEnd(f)}else c()}},t.hide=function(e){var t=this,n=this.getTipElement(),i=r.default.Event(this.constructor.Event.HIDE),a=function(){t._hoverState!==ei&&n.parentNode&&n.parentNode.removeChild(n),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),r.default(t.element).trigger(t.constructor.Event.HIDDEN),null!==t._popper&&t._popper.destroy(),e&&e()};if(r.default(this.element).trigger(i),!i.isDefaultPrevented()){if
vendor: 15,408 bytes, line 35
35(r.default(n).removeClass($n),"ontouchstart"in document.documentElement&&r.default(document.body).children().off("mouseover",null,r.default.noop),this._activeTrigger[oi]=!1,this._activeTrigger[ai]=!1,this._activeTrigger[ri]=!1,r.default(this.tip).hasClass(Jn)){var o=y.getTransitionDurationFromElement(n);r.default(n).one(y.TRANSITION_END,a).emulateTransitionEnd(o)}else a();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(e){r.default(this.getTipElement()).addClass(Xn+"-"+e)},t.getTipElement=function(){return this.tip=this.tip||r.default(this.config.template)[0],this.tip},t.setContent=function(){var e=this.getTipElement();this.setElementContent(r.default(e.querySelectorAll(ni)),this.getTitle()),r.default(e).removeClass(Jn+" "+$n)},t.setElementContent=function(e,t){"object"!=typeof t||!t.nodeType&&!t.jquery?this.config.html?(this.config.sanitize&&(t=Hn(t,this.config.whiteList,this.config.sanitizeFn)),e.html(t)):e.text(t):this.config.html?r.default(t).parent().is(e)||e.empty().append(t):e.text(r.default(t).text())},t.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},t._getPopperConfig=function(e){var t=this;return l({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:ii},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:y.isElement(this.config.container)?r.default(this.config.container):r.default(document).find(this.config.container)},t._getAttachment=function(e){return li[e.toUpperCase()]},t._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)r.default(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(t!==si){var n=t===ri?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,i=t===ri?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;r.default(e.element).on(n,e.config.selector,function(t){return e._enter(t)}).on(i,e.config.selector,function(t){return e._leave(t)})}}),this._hideModalHandler=function(){e.element&&e.hide()},r.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(e,t){var n=this.constructor.DATA_KEY;(t=t||r.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),r.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusin"===e.type?ai:ri]=!0),r.default(t.getTipElement()).hasClass($n)||t._hoverState===ei?t._hoverState=ei:(clearTimeout(t._timeout),t._hoverState=ei,t.config.delay&&t.config.delay.show?t._timeout=setTimeout(function(){t._hoverState===ei&&t.show()},t.config.delay.show):t.show())},t._leave=function(e,t){var n=this.constructor.DATA_KEY;(t=t||r.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),r.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusout"===e.type?ai:ri]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=ti,t.config.delay&&t.config.delay.hide?t._timeout=setTimeout(function(){t._hoverState===ti&&t.hide()},t.config.delay.hide):t.hide())},t._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},t._getConfig=function(e){var t=r.default(this.element).data();return Object.keys(t).forEach(function(e){-1!==Zn.indexOf(e)&&delete t[e]}),"number"==typeof(e=l({},this.constructor.Default,t,"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),y.typeCheckConfig(zn,e,this.constructor.DefaultType),e.sanitize&&(e.template=Hn(e.template,e.whiteList,e.sanitizeFn)),e},t._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},t._cleanTipClass=function(){var e=r.default(this.getTipElement()),t=e.attr("class").match(Qn);null!==t&&t.length&&e.removeClass(t.join(""))},t._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},t._fixTransition=function(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(r.default(e).removeClass(Jn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this),i=n.data(qn),a="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new e(this,a),n.data(qn,i)),"string"==typeof t)){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t]()}})},s(e,null,[{key:"VERSION",get:function(){return Wn}},{key:"Default",get:function(){return ui}},{key:"NAME",get:function(){return zn}},{key:"DATA_KEY",get:function(){return qn}},{key:"Event",get:function(){return ci}},{key:"EVENT_KEY",get:function(){return Yn}},{key:"DefaultType",get:function(){return di}}]),e}();r.default.fn[zn]=fi._jQueryInterface,r.default.fn[zn].Constructor=fi,r.default.fn[zn].noConflict=function(){return r.default.fn[zn]=Kn,fi._jQueryInterface};var hi="popover",pi="4.6.2",mi="bs.popover",gi="."+mi,vi=r.default.fn[hi],yi="bs-popover",_i=new RegExp("(^|\\s)"+yi+"\\S+","g"),Ei="fade",bi="show",Ti=".popover-header",wi=".popover-body",Ai=l({},fi.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Si=l({},fi.DefaultType,{content:"(string|element|function)"}),xi={HIDE:"hide"+gi,HIDDEN:"hidden"+gi,SHOW:"show"+gi,SHOWN:"shown"+gi,INSERTED:"inserted"+gi,CLICK:"click"+gi,FOCUSIN:"focusin"+gi,FOCUSOUT:"focusout"+gi,MOUSEENTER:"mouseenter"+gi,MOUSELEAVE:"mouseleave"+gi},Mi=function(e){function t(){return e.apply(this,arguments)||this}u(t,e);var n=t.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(e){r.default(this.getTipElement()).addClass(yi+"-"+e)},n.getTipElement=function(){return this.tip=this.tip||r.default(this.config.template)[0],this.tip},n.setContent=function(){var e=r.default(this.getTipElement());this.setElementContent(e.find(Ti),this.getTitle());var t=this._getContent();"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find(wi),t),e.removeClass(Ei+" "+bi)},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var e=r.default(this.getTipElement()),t=e.attr("class").match(_i);null!==t&&t.length>0&&e.removeClass(t.join(""))},t._jQueryInterface=function(e){return this.each(function(){var n=r.default(this).data(mi),i="object"==typeof e?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new t(this,i),r.default(this).data(mi,n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},s(t,null,[{key:"VERSION",get:function(){return pi}},{key:"Default",get:function(){return Ai}},{key:"NAME",get:function(){return hi}},{key:"DATA_KEY",get:function(){return mi}},{key:"Event",get:function(){return xi}},{key:"EVENT_KEY",get:function(){return gi}},{key:"DefaultType",get:function(){return Si}}]),t}(fi);r.default.fn[hi]=Mi._jQueryInterface,r.default.fn[hi].Constructor=Mi,r.default.fn[hi].noConflict=function(){return r.default.fn[hi]=vi,Mi._jQueryInterface};var Ri="scrollspy",Ci="4.6.2",Ii="bs.scrollspy",Li="."+Ii,Oi=".data-api",Di=r.default.fn[Ri],Pi="dropdown-item",Ni="active",ki="activate"+Li,Fi="scroll"+Li,Bi="load"+Li+Oi,Ui="offset",ji="position",Gi='[data-spy="scroll"]',Vi=".nav, .list-group",Hi=".nav-link",zi=".nav-item",Wi=".list-group-item",qi=".dropdown",Yi=".dropdown-item",Ki=".dropdown-toggle",Xi={offset:10,method:"auto",target:""},Qi={offset:"number",method:"string",target:"(string|element)"},Zi=function(){function e(e,t){var n=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(t),this._selector=this._config.target+" "+Hi+","+this._config.target+" "+Wi+","+this._config.target+" "+Yi,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,r.default(this._scrollElement).on(Fi,function(e){return n._process(e)}),this.refresh(),this._process()}var t=e.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?Ui:ji,n="auto"===this._config.method?t:this._config.method,i=n===ji?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(e){var t,a=y.getSelectorFromElement(e);if(a&&(t=document.querySelector(a)),t){var o=t.getBoundingClientRect();if(o.width||o.height)return[r.default(t)[n]().top+i,a]}return null}).filter(Boolean).sort(function(e,t){return e[0]-t[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){r.default.removeData(this._element,Ii),r.default(this._scrollElement).off(Li),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(e){if("string"!=typeof(e=l({},Xi,"object"==typeof e&&e?e:{})).target&&y.isElement(e.target)){var t=r.default(e.target).attr("id");t||(t=y.getUID(Ri),r.default(e.target).attr("id",t)),e.target="#"+t}return y.typeCheckConfig(Ri,e,Qi),e},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&(void 0===this._offsets[r+1]||e<this._offsets[r+1])&&this._activate(this._targets[r])}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",").map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}),n=r.default([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(Pi)?(n.closest(qi).find(Ki).addClass(Ni),n.addClass(Ni)):(n.addClass(Ni),n.parents(Vi).prev(Hi+", "+Wi).addClass(Ni),n.parents(Vi).prev(zi).children(Hi).addClass(Ni)),r.default(this._scrollElement).trigger(ki,{relatedTarget:e})},t._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(e){return e.classList.contains(Ni)}).forEach(function(e){return e.classList.remove(Ni)})},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this).data(Ii);if(n||(n=new e(this,"object"==typeof t&&t),r.default(this).data(Ii,n)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},s(e,null,[{key:"VERSION",get:function(){return Ci}},{key:"Default",get:function(){return Xi}}]),e}();r.default(window).on(Bi,function(){for(var e=[].slice.call(document.querySelectorAll(Gi)),t=e.length;t--;){var n=r.default(e[t]);Zi._jQueryInterface.call(n,n.data())}}),r.default.fn[Ri]=Zi._jQueryInterface,r.default.fn[Ri].Constructor=Zi,r.default.fn[Ri].noConflict=function(){return r.default.fn[Ri]=Di,Zi._jQueryInterface};var Ji="tab",$i="4.6.2",er="bs.tab",tr="."+er,nr=".data-api",ir=r.default.fn[Ji],rr="dropdown-menu",ar="active",or="disabled",sr="fade",lr="show",ur="hide"+tr,dr="hidden"+tr,cr="show"+tr,fr="shown"+tr,hr="click"+tr+nr,pr=".dropdown",mr=".nav, .list-group",gr=".active",vr="> li > .active",yr='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',_r=".dropdown-toggle",Er="> .dropdown-menu .active",br=function(){function e(e){this._element=e}var t=e.prototype;return t.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&r.default(this._element).hasClass(ar)||r.default(this._element).hasClass(or)||this._element.hasAttribute("disabled"))){var t,n,i=r.default(this._element).closest(mr)[0],a=y.getSelectorFromElement(this._element);if(i){var o="UL"===i.nodeName||"OL"===i.nodeName?vr:gr;n=(n=r.default.makeArray(r.default(i).find(o)))[n.length-1]}var s=r.default.Event(ur,{relatedTarget:this._element}),l=r.default.Event(cr,{relatedTarget:n});if(n&&r.default(n).trigger(s),r.default(this._element).trigger(l),!l.isDefaultPrevented()&&!s.isDefaultPrevented()){a&&(t=document.querySelector(a)),this._activate(this._element,i);var u=function(){var t=r.default.Event(dr,{relatedTarget:e._element}),i=r.default.Event(fr,{relatedTarget:n});r.default(n).trigger(t),r.default(e._element).trigger(i)};t?this._activate(t,t.parentNode,u):u()}}},t.dispose=function(){r.default.removeData(this._element,er),this._element=null},t._activate=function(e,t,n){var i=this,a=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?r.default(t).children(gr):r.default(t).find(vr))[0],o=n&&a&&r.default(a).hasClass(sr),s=function(){return i._transitionComplete(e,a,n)};if(a&&o){var l=y.getTransitionDurationFromElement(a);r.default(a).removeClass(lr).one(y.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},t._transitionComplete=function(e,t,n){if(t){r.default(t).removeClass(ar);var i=r.default(t.parentNode).find(Er)[0];i&&r.default(i).removeClass(ar),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}r.default(e).addClass(ar),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),y.reflow(e),e.classList.contains(sr)&&e.classList.add(lr);var a=e.parentNode;if(a&&"LI"===a.nodeName&&(a=a.parentNode),a&&r.default(a).hasClass(rr)){var o=r.default(e).closest(pr)[0];if(o){var s=[].slice.call(o.querySelectorAll(_r));r.default(s).addClass(ar)}e.setAttribute("aria-expanded",!0)}n&&n()},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this),i=n.data(er);
35if(i||(i=new e(this),n.data(er,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t]()}})},s(e,null,[{key:"VERSION",get:function(){return $i}}]),e}();r.default(document).on(hr,yr,function(e){e.preventDefault(),br._jQueryInterface.call(r.default(this),"show")}),r.default.fn[Ji]=br._jQueryInterface,r.default.fn[Ji].Constructor=br,r.default.fn[Ji].noConflict=function(){return r.default.fn[Ji]=ir,br._jQueryInterface};var Tr="toast",wr="4.6.2",Ar="bs.toast",Sr="."+Ar,xr=r.default.fn[Tr],Mr="fade",Rr="hide",Cr="show",Ir="showing",Lr="click.dismiss"+Sr,Or="hide"+Sr,Dr="hidden"+Sr,Pr="show"+Sr,Nr="shown"+Sr,kr='[data-dismiss="toast"]',Fr={animation:!0,autohide:!0,delay:500},Br={animation:"boolean",autohide:"boolean",delay:"number"},Ur=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var t=e.prototype;return t.show=function(){var e=this,t=r.default.Event(Pr);if(r.default(this._element).trigger(t),!t.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add(Mr);var n=function(){e._element.classList.remove(Ir),e._element.classList.add(Cr),r.default(e._element).trigger(Nr),e._config.autohide&&(e._timeout=setTimeout(function(){e.hide()},e._config.delay))};if(this._element.classList.remove(Rr),y.reflow(this._element),this._element.classList.add(Ir),this._config.animation){var i=y.getTransitionDurationFromElement(this._element);r.default(this._element).one(y.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},t.hide=function(){if(this._element.classList.contains(Cr)){var e=r.default.Event(Or);r.default(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},t.dispose=function(){this._clearTimeout(),this._element.classList.contains(Cr)&&this._element.classList.remove(Cr),r.default(this._element).off(Lr),r.default.removeData(this._element,Ar),this._element=null,this._config=null},t._getConfig=function(e){return e=l({},Fr,r.default(this._element).data(),"object"==typeof e&&e?e:{}),y.typeCheckConfig(Tr,e,this.constructor.DefaultType),e},t._setListeners=function(){var e=this;r.default(this._element).on(Lr,kr,function(){return e.hide()})},t._close=function(){var e=this,t=function(){e._element.classList.add(Rr),r.default(e._element).trigger(Dr)};if(this._element.classList.remove(Cr),this._config.animation){var n=y.getTransitionDurationFromElement(this._element);r.default(this._element).one(y.TRANSITION_END,t).emulateTransitionEnd(n)}else t()},t._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e._jQueryInterface=function(t){return this.each(function(){var n=r.default(this),i=n.data(Ar);if(i||(i=new e(this,"object"==typeof t&&t),n.data(Ar,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError('No method named "'+t+'"');i[t](this)}})},s(e,null,[{key:"VERSION",get:function(){return wr}},{key:"DefaultType",get:function(){return Br}},{key:"Default",get:function(){return Fr}}]),e}();r.default.fn[Tr]=Ur._jQueryInterface,r.default.fn[Tr].Constructor=Ur,r.default.fn[Tr].noConflict=function(){return r.default.fn[Tr]=xr,Ur._jQueryInterface},e.Alert=O,e.Button=J,e.Carousel=We,e.Collapse=ht,e.Dropdown=tn,e.Modal=Fn,e.Popover=Mi,e.Scrollspy=Zi,e.Tab=br,e.Toast=Ur,e.Tooltip=fi,e.Util=y,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(6),n(99))},function(e,t,n){var i;
36/*!
37 * jQuery JavaScript Library v3.7.1
38 * https://jquery.com/
39 *
40 * Copyright OpenJS Foundation and other contributors
41 * Released under the MIT license
42 * https://jquery.org/license
43 *
44 * Date: 2023-08-28T13:37Z
45 */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,r){"use strict";var a=[],o=Object.getPrototypeOf,s=a.slice,l=a.flat?function(e){return a.flat.call(e)}:function(e){return a.concat.apply([],e)},u=a.push,d=a.indexOf,c={},f=c.toString,h=c.hasOwnProperty,p=h.toString,m=p.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window}
vendor: 5,826 bytes, line 45
45,_=n.document,E={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var i,r,a=(n=n||_).createElement("script");if(a.text=e,t)for(i in E)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&a.setAttribute(i,r);n.head.appendChild(a).parentNode.removeChild(a)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[f.call(e)]||"object":typeof e}var w="3.7.1",A=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function M(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}S.fn=S.prototype={jquery:w,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:a.sort,splice:a.splice},S.extend=S.fn.extend=function(){var e,t,n,i,r,a,o=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[s]||{},s++),"object"==typeof o||v(o)||(o={}),s===l&&(o=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)i=e[t],"__proto__"!==t&&o!==i&&(u&&i&&(S.isPlainObject(i)||(r=Array.isArray(i)))?(n=o[t],a=r&&!Array.isArray(n)?[]:r||S.isPlainObject(n)?n:{},r=!1,o[t]=S.extend(u,a,i)):void 0!==i&&(o[t]=i));return o},S.extend({expando:"jQuery"+(w+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==f.call(e))&&(!(t=o(e))||"function"==typeof(n=h.call(t,"constructor")&&t.constructor)&&p.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(x(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,r=e.nodeType;if(!r)for(;t=e[i++];)n+=S.text(t);return 1===r||11===r?e.textContent:9===r?e.documentElement.textContent:3===r||4===r?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(x(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:d.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!A.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,a=e.length,o=!n;r<a;r++)!t(e[r],r)!==o&&i.push(e[r]);return i},map:function(e,t,n){var i,r,a=0,o=[];if(x(e))for(i=e.length;a<i;a++)null!=(r=t(e[a],a,n))&&o.push(r);else for(a in e)null!=(r=t(e[a],a,n))&&o.push(r);return l(o)},guid:1,support:g}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=a[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});var R=a.pop,C=a.sort,I=a.splice,L="[\\x20\\t\\r\\n\\f]",O=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g");S.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function P(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}S.escapeSelector=function(e){return(e+"").replace(D,P)};var N=_,k=u;!function(){var e,t,i,r,o,l,u,c,f,p,m=k,v=S.expando,y=0,_=0,E=ee(),b=ee(),T=ee(),w=ee(),A=function(e,t){return e===t&&(o=!0),0},x="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",P="\\["+L+"*("+D+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+D+"))|)"+L+"*\\]",F=":("+D+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",B=new RegExp(L+"+","g"),U=new RegExp("^"+L+"*,"+L+"*"),j=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),G=new RegExp(L+"|>"),V=new RegExp(F),H=new RegExp("^"+D+"$"),z={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+x+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,X=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),Q=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Z=function(){le()},J=fe(function(e){return!0===e.disabled&&M(e,"fieldset")},{dir:"parentNode",next:"legend"});try{m.apply(a=s.call(N.childNodes),N.childNodes),a[N.childNodes.length].nodeType}catch(e){m={apply:function(e,t){k.apply(e,s.call(t))}
vendor: 1,613 bytes, line 45
45,call:function(e){k.apply(e,s.call(arguments,1))}}}function $(e,t,n,i){var r,a,o,s,u,d,h,p=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!i&&(le(t),t=t||l,c)){if(11!==y&&(u=Y.exec(e)))if(r=u[1]){if(9===y){if(!(o=t.getElementById(r)))return n;if(o.id===r)return m.call(n,o),n}else if(p&&(o=p.getElementById(r))&&$.contains(t,o)&&o.id===r)return m.call(n,o),n}else{if(u[2])return m.apply(n,t.getElementsByTagName(e)),n;if((r=u[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(r)),n}if(!(w[e+" "]||f&&f.test(e))){if(h=e,p=t,1===y&&(G.test(e)||j.test(e))){for((p=K.test(e)&&se(t.parentNode)||t)==t&&g.scope||((s=t.getAttribute("id"))?s=S.escapeSelector(s):t.setAttribute("id",s=v)),a=(d=de(e)).length;a--;)d[a]=(s?"#"+s:":scope")+" "+ce(d[a]);h=d.join(",")}try{return m.apply(n,p.querySelectorAll(h)),n}catch(t){w(e,!0)}finally{s===v&&t.removeAttribute("id")}}}return ye(e.replace(O,"$1"),t,n,i)}function ee(){var e=[];return function n(i,r){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=r}}function te(e){return e[v]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return M(t,"input")&&t.type===e}}function re(e){return function(t){return(M(t,"input")||M(t,"button"))&&t.type===e}}function ae(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&J(t)===e
vendor: 8,775 bytes, line 45
45:t.disabled===e:"label"in t&&t.disabled===e}}function oe(e){return te(function(t){return t=+t,te(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:N;return i!=l&&9===i.nodeType&&i.documentElement?(u=(l=i).documentElement,c=!S.isXMLDoc(l),p=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&N!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",Z),g.getById=ne(function(e){return u.appendChild(e).id=S.expando,!l.getElementsByName||!l.getElementsByName(S.expando).length}),g.disconnectedMatch=ne(function(e){return p.call(e,"*")}),g.scope=ne(function(){return l.querySelectorAll(":scope")}),g.cssHas=ne(function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),g.getById?(t.filter.ID=function(e){var t=e.replace(X,Q);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&c){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(X,Q);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&c){var n,i,r,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(r=t.getElementsByName(e),i=0;a=r[i++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&c)return t.getElementsByClassName(e)},f=[],ne(function(e){var t;u.appendChild(e).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||f.push("\\["+L+"*(?:value|"+x+")"),e.querySelectorAll("[id~="+v+"-]").length||f.push("~="),e.querySelectorAll("a#"+v+"+*").length||f.push(".#.+[+~]"),e.querySelectorAll(":checked").length||f.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),u.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||f.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")")}),g.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),A=function(e,t){if(e===t)return o=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==N&&$.contains(N,e)?-1:t===l||t.ownerDocument==N&&$.contains(N,t)?1:r?d.call(r,e)-d.call(r,t):0:4&n?-1:1)},l):l}for(e in $.matches=function(e,t){return $(e,null,null,t)},$.matchesSelector=function(e,t){if(le(e),c&&!w[t+" "]&&(!f||!f.test(t)))try{var n=p.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){w(t,!0)}return $(t,l,null,[e]).length>0},$.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),S.contains(e,t)},$.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],r=i&&h.call(t.attrHandle,n.toLowerCase())?i(e,n,!c):void 0;return void 0!==r?r:e.getAttribute(n)},$.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},S.uniqueSort=function(e){var t,n=[],i=0,a=0;if(o=!g.sortStable,r=!g.sortStable&&s.call(e,0),C.call(e,A),o){for(;t=e[a++];)t===e[a]&&(i=n.push(a));for(;i--;)I.call(e,n[i],1)}return r=null,e},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(s.apply(this)))},t=S.expr={cacheLength:50,createPseudo:te,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(X,Q),e[3]=(e[3]||e[4]||e[5]||"").replace(X,Q),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||$.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&$.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=de(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(X,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return M(e,t)}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=$.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,d,c,f,h,p=a!==o?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),_=!l&&!s,E=!1;if(m){if(a){for(;p;){for(c=t;c=c[p];)if(s?M(c,g):1===c.nodeType)return!1;h=p="only"===e&&!h&&"nextSibling"}return!0}if(h=[o?m.firstChild:m.lastChild],o&&_){for(E=(f=(u=(d=m[v]||(m[v]={}))[e]||[])[0]===y&&u[1])&&u[2],c=f&&m.childNodes[f];c=++f&&c&&c[p]||(E=f=0)||h.pop();)if(1===c.nodeType&&++E&&c===t){d[e]=[y,f,E];break}}else if(_&&(E=f=(u=(d=t[v]||(t[v]={}))[e]||[])[0]===y&&u[1]),!1===E)for(;(c=++f&&c&&c[p]||(E=f=0)||h.pop())&&(!(s?M(c,g):1===c.nodeType)||!++E||(_&&((d=c[v]||(c[v]={}))[e]=[y,E]),c!==t)););return(E-=r)===i||E%i===0&&E/i>=0}}},PSEUDO:function(e,n){var i,r=t.pseudos[e]||t.setFilters[e.toLowerCase()]||$.error("unsupported pseudo: "+e);return r[v]?r(n):r.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,t){for(var i,a=r(e,n),o=a.length;o--;)e[i=d.call(e,a[o])]=!(t[i]=a[o])}):function(e){return r(e,0,i)}):r}},pseudos:{not:te(function(e){var t=[],n=[],i=ve(e.replace(O,"$1"));return i[v]?te(function(e,t,n,r){for(var a,o=i(e,null,r,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,r,a){return t[0]=e,i(t,null,a,n),t[0]=null,!n.pop()}}),has:te(function(e){return function(t){return $(e,t).length>0}}),contains:te(function(e){return e=e.replace(X,Q),function(t){return(t.textContent||S.text(t)).indexOf(e)>-1}}),lang:te(function(e){return H.test(e||"")||$.error("unsupported lang: "+e),e=e.replace(X,Q).toLowerCase(),function(t){var n;do{if(n=c?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===u},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ae(!1),disabled:ae(!0),checked:function(e){return M(e,"input")&&!!e.checked||M(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return M(e,"input")&&"button"===e.type||M(e,"button")},text:function(e){var t;return M(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:oe(function(){return[0]}),last:oe(function(e,t){return[t-1]}),eq:oe(function(e,t,n){return[n<0?n+t:n]}),even:oe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:oe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:oe(function(e,t,n){var i;for(i=n<0?n+t:n>t?t:n;--i>=0;)e.push(i);return e}),gt:oe(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=ie(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=re(e);function ue(){}function de(e,n){var i,r,a,o,s,l,u,d=b[e+" "];if(d)return n?0:d.slice(0);for(s=e,l=[],u=t.preFilter;s;){for(o in i&&!(r=U.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(a=[])),i=!1,(r=j.exec(s))&&(i=r.shift(),a.push({value:i,type:r[0].replace(O," ")}
vendor: 9,897 bytes, line 45
45),s=s.slice(i.length)),t.filter)!(r=z[o].exec(s))||u[o]&&!(r=u[o](r))||(i=r.shift(),a.push({value:i,type:o,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?$.error(e):b(e,l).slice(0)}function ce(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function fe(e,t,n){var i=t.dir,r=t.next,a=r||i,o=n&&"parentNode"===a,s=_++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r);return!1}:function(t,n,l){var u,d,c=[y,s];if(l){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(d=t[v]||(t[v]={}),r&&M(t,r))t=t[i]||t;else{if((u=d[a])&&u[0]===y&&u[1]===s)return c[2]=u[2];if(d[a]=c,c[2]=e(t,n,l))return!0}return!1}}function he(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function pe(e,t,n,i,r){for(var a,o=[],s=0,l=e.length,u=null!=t;s<l;s++)(a=e[s])&&(n&&!n(a,i,r)||(o.push(a),u&&t.push(s)));return o}function me(e,t,n,i,r,a){return i&&!i[v]&&(i=me(i)),r&&!r[v]&&(r=me(r,a)),te(function(a,o,s,l){var u,c,f,h,p=[],g=[],v=o.length,y=a||function(e,t,n){for(var i=0,r=t.length;i<r;i++)$(e,t[i],n);return n}(t||"*",s.nodeType?[s]:s,[]),_=!e||!a&&t?y:pe(y,p,e,s,l);if(n?n(_,h=r||(a?e:v||i)?[]:o,s,l):h=_,i)for(u=pe(h,g),i(u,[],s,l),c=u.length;c--;)(f=u[c])&&(h[g[c]]=!(_[g[c]]=f));if(a){if(r||e){if(r){for(u=[],c=h.length;c--;)(f=h[c])&&u.push(_[c]=f);r(null,h=[],u,l)}for(c=h.length;c--;)(f=h[c])&&(u=r?d.call(a,f):p[c])>-1&&(a[u]=!(o[u]=f))}}else h=pe(h===o?h.splice(v,h.length):h),r?r(null,o,h,l):m.apply(o,h)})}function ge(e){for(var n,r,a,o=e.length,s=t.relative[e[0].type],l=s||t.relative[" "],u=s?1:0,c=fe(function(e){return e===n},l,!0),f=fe(function(e){return d.call(n,e)>-1},l,!0),h=[function(e,t,r){var a=!s&&(r||t!=i)||((n=t).nodeType?c(e,t,r):f(e,t,r));return n=null,a}];u<o;u++)if(r=t.relative[e[u].type])h=[fe(he(h),r)];else{if((r=t.filter[e[u].type].apply(null,e[u].matches))[v]){for(a=++u;a<o&&!t.relative[e[a].type];a++);return me(u>1&&he(h),u>1&&ce(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(O,"$1"),r,u<a&&ge(e.slice(u,a)),a<o&&ge(e=e.slice(a)),a<o&&ce(e))}h.push(r)}return he(h)}function ve(e,n){var r,a=[],o=[],s=T[e+" "];if(!s){for(n||(n=de(e)),r=n.length;r--;)(s=ge(n[r]))[v]?a.push(s):o.push(s);s=T(e,function(e,n){var r=n.length>0,a=e.length>0,o=function(o,s,u,d,f){var h,p,g,v=0,_="0",E=o&&[],b=[],T=i,w=o||a&&t.find.TAG("*",f),A=y+=null==T?1:Math.random()||.1,x=w.length;for(f&&(i=s==l||s||f);_!==x&&null!=(h=w[_]);_++){if(a&&h){for(p=0,s||h.ownerDocument==l||(le(h),u=!c);g=e[p++];)if(g(h,s||l,u)){m.call(d,h);break}f&&(y=A)}r&&((h=!g&&h)&&v--,o&&E.push(h))}if(v+=_,r&&_!==v){for(p=0;g=n[p++];)g(E,b,s,u);if(o){if(v>0)for(;_--;)E[_]||b[_]||(b[_]=R.call(d));b=pe(b)}m.apply(d,b),f&&!o&&b.length>0&&v+n.length>1&&S.uniqueSort(d)}return f&&(y=A,i=T),E};return r?te(o):o}(o,a)),s.selector=e}return s}function ye(e,n,i,r){var a,o,s,l,u,d="function"==typeof e&&e,f=!r&&de(e=d.selector||e);if(i=i||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===n.nodeType&&c&&t.relative[o[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(X,Q),n)||[])[0]))return i;d&&(n=n.parentNode),e=e.slice(o.shift().value.length)}for(a=z.needsContext.test(e)?0:o.length;a--&&(s=o[a],!t.relative[l=s.type]);)if((u=t.find[l])&&(r=u(s.matches[0].replace(X,Q),K.test(o[0].type)&&se(n.parentNode)||n))){if(o.splice(a,1),!(e=r.length&&ce(o)))return m.apply(i,r),i;break}}return(d||ve(e,f))(r,n,!c,i,!n||K.test(e)&&se(n.parentNode)||n),i}ue.prototype=t.filters=t.pseudos,t.setFilters=new ue,g.sortStable=v.split("").sort(A).join("")===v,le(),g.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))}),S.find=$,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,$.compile=ve,$.select=ye,$.setDocument=le,$.tokenize=de,$.escape=S.escapeSelector,$.getText=S.text,$.isXML=S.isXMLDoc,$.selectors=S.expr,$.support=S.support,$.uniqueSort=S.uniqueSort}();var F=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&S(e).is(n))break;i.push(e)}return i},B=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},U=S.expr.match.needsContext,j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function G(e,t,n){return v(t)?S.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):"string"!=typeof t?S.grep(e,function(e){return d.call(t,e)>-1!==n}):S.filter(t,e,n)}S.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?S.find.matchesSelector(i,e)?[i]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<i;t++)if(S.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)S.find(e,r[t],n);return i>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(G(this,e||[],!1))},not:function(e){return this.pushStack(G(this,e||[],!0))},is:function(e){return!!G(this,"string"==typeof e&&U.test(e)?S(e):e||[],!1).length}});var V,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||V,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:H.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:_,!0)),j.test(i[1])&&S.isPlainObject(t))for(i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=_.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,V=S(_);var z=/^(?:parents|prev(?:Until|All))/,W={children:!0,contents:!0,next:!0,prev:!0};function q(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,a=[],o="string"!=typeof e&&S(e);if(!U.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&S.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?S.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?d.call(S(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return F(e,"parentNode")},parentsUntil:function(e,t,n){return F(e,"parentNode",n)},next:function(e){return q(e,"nextSibling")},prev:function(e){return q(e,"previousSibling")},nextAll:function(e){return F(e,"nextSibling")},prevAll:function(e){return F(e,"previousSibling")},nextUntil:function(e,t,n){return F(e,"nextSibling",n)},prevUntil:function(e,t,n){return F(e,"previousSibling",n)},siblings:function(e){return B((e.parentNode||{}).firstChild,e)},children:function(e){return B(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(M(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,i){var r=S.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=S.filter(i,r)),this.length>1&&(W[e]||S.uniqueSort(r),z.test(e)&&r.reverse()),this.pushStack(r)}});var Y=/[^\x20\t\r\n\f]+/g;function K(e){return e}function X(e){throw e}function Q(e,t,n,i){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(n):e&&v(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(Y)||[],function(e,n){t[n]=!0}),t}(e):S.extend({},e);var t,n,i,r,a=[],o=[],s=-1,l=function(){for(r=r||e.once,i=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)!1===a[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,r&&(a=n?[]:"")},u={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),function t(n){S.each(n,function(n,i){v(i)?e.unique&&u.has(i)||a.push(i):i&&i.length&&"string"!==T(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return S.each(arguments,function(e,t){for(var n;(n=S.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?S.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=o=[],n||t||(a=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(n){S.each(t,function(t,i){var r=v(e[i[4]])&&e[i[4]];a[i[1]](function(){var e=r&&r.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,i,r){var a=0;function o(e,t,i,r){return function(){var s=this,l=arguments,u=function(){var n,u;
vendor: 7,101 bytes, line 45
45if(!(e<a)){if((n=i.apply(s,l))===t.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(u)?r?u.call(n,o(a,t,K,r),o(a,t,X,r)):(a++,u.call(n,o(a,t,K,r),o(a,t,X,r),o(a,t,K,t.notifyWith))):(i!==K&&(s=void 0,l=[n]),(r||t.resolveWith)(s,l))}},d=r?u:function(){try{u()}catch(n){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(n,d.error),e+1>=a&&(i!==X&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?d():(S.Deferred.getErrorHook?d.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(d.error=S.Deferred.getStackHook()),n.setTimeout(d))}}return S.Deferred(function(n){t[0][3].add(o(0,n,v(r)?r:K,n.notifyWith)),t[1][3].add(o(0,n,v(e)?e:K)),t[2][3].add(o(0,n,v(i)?i:X))}).promise()},promise:function(e){return null!=e?S.extend(e,r):r}},a={};return S.each(t,function(e,n){var o=n[2],s=n[5];r[n[1]]=o.add,s&&o.add(function(){i=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,i=Array(n),r=s.call(arguments),a=S.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?s.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(Q(e,a.done(o(n)).resolve,a.reject,!t),"pending"===a.state()||v(r[n]&&r[n].then)))return a.then();for(;n--;)Q(r[n],o(n),a.reject);return a.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Z.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){n.setTimeout(function(){throw e})};var J=S.Deferred();function $(){_.removeEventListener("DOMContentLoaded",$),n.removeEventListener("load",$),S.ready()}S.fn.ready=function(e){return J.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||J.resolveWith(_,[S]))}}),S.ready.then=J.then,"complete"===_.readyState||"loading"!==_.readyState&&!_.documentElement.doScroll?n.setTimeout(S.ready):(_.addEventListener("DOMContentLoaded",$),n.addEventListener("load",$));var ee=function(e,t,n,i,r,a,o){var s=0,l=e.length,u=null==n;if("object"===T(n))for(s in r=!0,n)ee(e,t,s,n[s],!0,a,o);else if(void 0!==i&&(r=!0,v(i)||(o=!0),u&&(o?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(S(e),n)})),t))for(;s<l;s++)t(e[s],n,o?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):a},te=/^-ms-/,ne=/-([a-z])/g;function ie(e,t){return t.toUpperCase()}function re(e){return e.replace(te,"ms-").replace(ne,ie)}var ae=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function oe(){this.expando=S.expando+oe.uid++}oe.uid=1,oe.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ae(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[re(t)]=n;else for(i in t)r[re(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][re(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(re):(t=re(t))in i?[t]:t.match(Y)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||S.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var se=new oe,le=new oe,ue=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,de=/[A-Z]/g;function ce(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(de,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ue.test(e)?JSON.parse(e):e)}(n)}catch(e){}le.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return le.hasData(e)||se.hasData(e)},data:function(e,t,n){return le.access(e,t,n)},removeData:function(e,t){le.remove(e,t)},_data:function(e,t,n){return se.access(e,t,n)},_removeData:function(e,t){se.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,i,r,a=this[0],o=a&&a.attributes;if(void 0===e){if(this.length&&(r=le.get(a),1===a.nodeType&&!se.get(a,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(i=o[n].name).indexOf("data-")&&(i=re(i.slice(5)),ce(a,i,r[i]));se.set(a,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){le.set(this,e)}):ee(this,function(t){var n;if(a&&void 0===t)return void 0!==(n=le.get(a,e))||void 0!==(n=ce(a,e))?n:void 0;this.each(function(){le.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){le.remove(this,e)})}}),S.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=se.get(e,t),n&&(!i||Array.isArray(n)?i=se.access(e,t,S.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),i=n.length,r=n.shift(),a=S._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,function(){S.dequeue(e,t)},a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return se.get(e,n)||se.access(e,n,{empty:S.Callbacks("once memory").add(function(){se.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?S.queue(this[0],e):void 0===t?this:this.each(function(){var n=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&S.dequeue(this,e)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=S.Deferred(),a=this,o=this.length,s=function(){--i||r.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=se.get(a[o],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var fe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,he=new RegExp("^(?:([+-])=|)("+fe+")([a-z%]*)$","i"),pe=["Top","Right","Bottom","Left"],me=_.documentElement,ge=function(e){return S.contains(e.ownerDocument,e)},ve={composed:!0};me.getRootNode&&(ge=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(ve)===e.ownerDocument});var ye=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ge(e)&&"none"===S.css(e,"display")};function _e(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:function(){return S.css(e,t,"")},l=s(),u=n&&n[3]||(S.cssNumber[t]?"":"px"),d=e.nodeType&&(S.cssNumber[t]||"px"!==u&&+l)&&he.exec(S.css(e,t));if(d&&d[3]!==u){for(l/=2,u=u||d[3],d=+l||1;o--;)S.style(e,t,d+u),(1-a)*(1-(a=s()/l||.5))<=0&&(o=0),d/=a;d*=2,S.style(e,t,d+u),n=n||[]}return n&&(d=+d||+l||0,r=n[1]?d+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=d,i.end=r)),r}var Ee={};function be(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ee[i];
vendor: 5,632 bytes, line 45
45return r||(t=n.body.appendChild(n.createElement(i)),r=S.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ee[i]=r,r)}function Te(e,t){for(var n,i,r=[],a=0,o=e.length;a<o;a++)(i=e[a]).style&&(n=i.style.display,t?("none"===n&&(r[a]=se.get(i,"display")||null,r[a]||(i.style.display="")),""===i.style.display&&ye(i)&&(r[a]=be(i))):"none"!==n&&(r[a]="none",se.set(i,"display",n)));for(a=0;a<o;a++)null!=r[a]&&(e[a].style.display=r[a]);return e}S.fn.extend({show:function(){return Te(this,!0)},hide:function(){return Te(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ye(this)?S(this).show():S(this).hide()})}});var we,Ae,Se=/^(?:checkbox|radio)$/i,xe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Me=/^$|^module$|\/(?:java|ecma)script/i;we=_.createDocumentFragment().appendChild(_.createElement("div")),(Ae=_.createElement("input")).setAttribute("type","radio"),Ae.setAttribute("checked","checked"),Ae.setAttribute("name","t"),we.appendChild(Ae),g.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue,we.innerHTML="<option></option>",g.option=!!we.lastChild;var Re={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Ce(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&M(e,t)?S.merge([e],n):n}function Ie(e,t){for(var n=0,i=e.length;n<i;n++)se.set(e[n],"globalEval",!t||se.get(t[n],"globalEval"))}Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td,g.option||(Re.optgroup=Re.option=[1,"<select multiple='multiple'>","</select>"]);var Le=/<|&#?\w+;/;function Oe(e,t,n,i,r){for(var a,o,s,l,u,d,c=t.createDocumentFragment(),f=[],h=0,p=e.length;h<p;h++)if((a=e[h])||0===a)if("object"===T(a))S.merge(f,a.nodeType?[a]:a);else if(Le.test(a)){for(o=o||c.appendChild(t.createElement("div")),s=(xe.exec(a)||["",""])[1].toLowerCase(),l=Re[s]||Re._default,o.innerHTML=l[1]+S.htmlPrefilter(a)+l[2],d=l[0];d--;)o=o.lastChild;S.merge(f,o.childNodes),(o=c.firstChild).textContent=""}else f.push(t.createTextNode(a));for(c.textContent="",h=0;a=f[h++];)if(i&&S.inArray(a,i)>-1)r&&r.push(a);else if(u=ge(a),o=Ce(c.appendChild(a),"script"),u&&Ie(o),n)for(d=0;a=o[d++];)Me.test(a.type||"")&&n.push(a);return c}var De=/^([^.]*)(?:\.(.+)|)/;function Pe(){return!0}function Ne(){return!1}function ke(e,t,n,i,r,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(i=i||n,n=void 0),t)ke(e,s,n,i,t[s],a);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ne;else if(!r)return e;return 1===a&&(o=r,r=function(e){return S().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=S.guid++)),e.each(function(){S.event.add(this,t,r,i,n)})}function Fe(e,t,n){n?(se.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,i=se.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),se.set(this,t,i),this[t](),n=se.get(this,t),se.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(se.set(this,t,S.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Pe)}})):void 0===se.get(e,t)&&S.event.add(e,t,Pe)}S.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,m,g=se.get(e);if(ae(e))for(n.handler&&(n=(a=n).handler,r=a.selector),r&&S.find.matchesSelector(me,r),n.guid||(n.guid=S.guid++),(l=g.events)||(l=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(Y)||[""]).length;u--;)h=m=(s=De.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h&&(c=S.event.special[h]||{},h=(r?c.delegateType:c.bindType)||h,c=S.event.special[h]||{},d=S.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:p.join(".")},a),(f=l[h])||((f=l[h]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,i,p,o)||e.addEventListener&&e.addEventListener(h,o)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,d):f.push(d),S.event.global[h]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,u,d,c,f,h,p,m,g=se.hasData(e)&&se.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(Y)||[""]).length;u--;)if(h=m=(s=De.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),h){for(c=S.event.special[h]||{},f=l[h=(i?c.delegateType:c.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=f.length;a--;)d=f[a],!r&&m!==d.origType||n&&n.guid!==d.guid||s&&!s.test(d.namespace)||i&&i!==d.selector&&("**"!==i||!d.selector)||(f.splice(a,1),d.selector&&f.delegateCount--,c.remove&&c.remove.call(e,d));o&&!f.length&&(c.teardown&&!1!==c.teardown.call(e,p,g.handle)||S.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)S.event.remove(e,h+t[u],n,i,!0);S.isEmptyObject(l)&&se.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=new Array(arguments.length),l=S.event.fix(e),u=(se.get(this,"events")||Object.create(null))[l.type]||[],d=S.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!d.preDispatch||!1!==d.preDispatch.call(this,l)){for(o=S.event.handlers.call(this,l,u),t=0;(r=o[t++])&&!l.isPropagationStopped();
vendor: 10,247 bytes, line 45
45)for(l.currentTarget=r.elem,n=0;(a=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==a.namespace&&!l.rnamespace.test(a.namespace)||(l.handleObj=a,l.data=a.data,void 0!==(i=((S.event.special[a.origType]||{}).handle||a.handler).apply(r.elem,s))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,r,a,o,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(a=[],o={},n=0;n<l;n++)void 0===o[r=(i=t[n]).selector+" "]&&(o[r]=i.needsContext?S(r,this).index(u)>-1:S.find(r,this,null,[u]).length),o[r]&&a.push(i);a.length&&s.push({elem:u,handlers:a})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Se.test(t.type)&&t.click&&M(t,"input")&&Fe(t,"click",!0),!1},trigger:function(e){var t=this||e;return Se.test(t.type)&&t.click&&M(t,"input")&&Fe(t,"click"),!0},_default:function(e){var t=e.target;return Se.test(t.type)&&t.click&&M(t,"input")&&se.get(t,"click")||M(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Pe:Ne,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ne,isPropagationStopped:Ne,isImmediatePropagationStopped:Ne,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Pe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Pe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Pe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){if(_.documentMode){var n=se.get(this,"handle"),i=S.event.fix(e);i.type="focusin"===e.type?"focus":"blur",i.isSimulated=!0,n(e),i.target===i.currentTarget&&n(i)}else S.event.simulate(t,e.target,S.event.fix(e))}S.event.special[e]={setup:function(){var i;if(Fe(this,e,!0),!_.documentMode)return!1;(i=se.get(this,t))||this.addEventListener(t,n),se.set(this,t,(i||0)+1)},trigger:function(){return Fe(this,e),!0},teardown:function(){var e;if(!_.documentMode)return!1;(e=se.get(this,t)-1)?se.set(this,t,e):(this.removeEventListener(t,n),se.remove(this,t))},_default:function(t){return se.get(t.target,e)},delegateType:t},S.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,r=_.documentMode?this:i,a=se.get(r,t);a||(_.documentMode?this.addEventListener(t,n):i.addEventListener(e,n,!0)),se.set(r,t,(a||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=_.documentMode?this:i,a=se.get(r,t)-1;a?se.set(r,t,a):(_.documentMode?this.removeEventListener(t,n):i.removeEventListener(e,n,!0),se.remove(r,t))}}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,r=e.handleObj;return i&&(i===this||S.contains(this,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),S.fn.extend({on:function(e,t,n,i){return ke(this,e,t,n,i)},one:function(e,t,n,i){return ke(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,S(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ne),this.each(function(){S.event.remove(this,e,n,t)})}});var Be=/<script|<style|<link/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ge(e,t){return M(e,"table")&&M(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Ve(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,i,r,a,o,s;if(1===t.nodeType){if(se.hasData(e)&&(s=se.get(e).events))for(r in se.remove(t,"handle events"),s)for(n=0,i=s[r].length;n<i;n++)S.event.add(t,r,s[r][n]);le.hasData(e)&&(a=le.access(e),o=S.extend({},a),le.set(t,o))}}function We(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Se.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function qe(e,t,n,i){t=l(t);var r,a,o,s,u,d,c=0,f=e.length,h=f-1,p=t[0],m=v(p);if(m||f>1&&"string"==typeof p&&!g.checkClone&&Ue.test(p))return e.each(function(r){var a=e.eq(r);m&&(t[0]=p.call(this,r,a.html())),qe(a,t,n,i)});if(f&&(a=(r=Oe(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=a),a||i)){for(s=(o=S.map(Ce(r,"script"),Ve)).length;c<f;c++)u=r,c!==h&&(u=S.clone(u,!0,!0),s&&S.merge(o,Ce(u,"script"))),n.call(e[c],u,c);if(s)for(d=o[o.length-1].ownerDocument,S.map(o,He),c=0;c<s;c++)u=o[c],Me.test(u.type||"")&&!se.access(u,"globalEval")&&S.contains(d,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},d):b(u.textContent.replace(je,""),u,d))}return e}function Ye(e,t,n){for(var i,r=t?S.filter(t,e):e,a=0;null!=(i=r[a]);a++)n||1!==i.nodeType||S.cleanData(Ce(i)),i.parentNode&&(n&&ge(i)&&Ie(Ce(i,"script")),i.parentNode.removeChild(i));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=ge(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(o=Ce(s),i=0,r=(a=Ce(e)).length;i<r;i++)We(a[i],o[i]);if(t)if(n)for(a=a||Ce(e),o=o||Ce(s),i=0,r=a.length;i<r;i++)ze(a[i],o[i]);else ze(e,s);return(o=Ce(s,"script")).length>0&&Ie(o,!l&&Ce(e,"script")),s},cleanData:function(e){for(var t,n,i,r=S.event.special,a=0;void 0!==(n=e[a]);a++)if(ae(n)){if(t=n[se.expando]){if(t.events)for(i in t.events)r[i]?S.event.remove(n,i):S.removeEvent(n,i,t.handle);n[se.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Ye(this,e,!0)},remove:function(e){return Ye(this,e)},text:function(e){return ee(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return qe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ge(this,e).appendChild(e)})},prepend:function(){return qe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ge(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return qe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return qe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(Ce(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return ee(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Be.test(e)&&!Re[(xe.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(Ce(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return qe(this,arguments,function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(Ce(this)),n&&n.replaceChild(t,this))},e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){S.fn[e]=function(e){for(var n,i=[],r=S(e),a=r.length-1,o=0;o<=a;o++)n=o===a?this:this.clone(!0),S(r[o])[t](n),u.apply(i,n.get());return this.pushStack(i)}});var Ke=new RegExp("^("+fe+")(?!px)[a-z%]+$","i"),Xe=/^--/,Qe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Ze=function(e,t,n){var i,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];for(r in i=n.call(e),t)e.style[r]=a[r];return i},Je=new RegExp(pe.join("|"),"i");function $e(e,t,n){var i,r,a,o,s=Xe.test(t),l=e.style;return(n=n||Qe(e))&&(o=n.getPropertyValue(t)||n[t],s&&o&&(o=o.replace(O,"$1")||void 0),""!==o||ge(e)||(o=S.style(e,t)),!g.pixelBoxStyles()&&Ke.test(o)&&Je.test(t)&&(i=l.width,r=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=o,o=n.width,l.width=i,l.minWidth=r,l.maxWidth=a)),void 0!==o?o+"":o}function et(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(d){u.style.cssText="position:absolute;
45left:-11111px;width:60px;margin-top:1px;padding:0;border:0",d.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",me.appendChild(u).appendChild(d);var e=n.getComputedStyle(d);i="1%"!==e.top,l=12===t(e.marginLeft),d.style.right="60%",o=36===t(e.right),r=36===t(e.width),d.style.position="absolute",a=12===t(d.offsetWidth/3),me.removeChild(u),d=null}}function t(e){return Math.round(parseFloat(e))}var i,r,a,o,s,l,u=_.createElement("div"),d=_.createElement("div");d.style&&(d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===d.style.backgroundClip,S.extend(g,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,t,i,r;return null==s&&(e=_.createElement("table"),t=_.createElement("tr"),i=_.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;
45border:1px solid",t.style.height="1px",i.style.height="9px",i.style.display="block",me.appendChild(e).appendChild(t).appendChild(i),r=n.getComputedStyle(t),s=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,me.removeChild(e)),s}}))}();var tt=["Webkit","Moz","ms"],nt=_.createElement("div").style,it={};function rt(e){var t=S.cssProps[e]||it[e];return t||(e in nt?e:it[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}var at=/^(none|table(?!-c[ea]).+)/,ot={position:"absolute",visibility:"hidden",display:"block"},st={letterSpacing:"0",fontWeight:"400"};function lt(e,t,n){var i=he.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function ut(e,t,n,i,r,a){var o="width"===t?1:0,s=0,l=0,u=0;if(n===(i?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(u+=S.css(e,n+pe[o],!0,r)),i?("content"===n&&(l-=S.css(e,"padding"+pe[o],!0,r)),"margin"!==n&&(l-=S.css(e,"border"+pe[o]+"Width",!0,r))):(l+=S.css(e,"padding"+pe[o],!0,r),"padding"!==n?l+=S.css(e,"border"+pe[o]+"Width",!0,r):s+=S.css(e,"border"+pe[o]+"Width",!0,r));return!i&&a>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))||0),l+u}function dt(e,t,n){var i=Qe(e),r=(!g.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,i),a=r,o=$e(e,t,i),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ke.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&M(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===S.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===S.css(e,"boxSizing",!1,i),(a=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+ut(e,t,n||(r?"border":"content"),a,i,o)+"px"}function ct(e,t,n,i,r){return new ct.prototype.init(e,t,n,i,r)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,a,o,s=re(t),l=Xe.test(t),u=e.style;
vendor: 4,423 bytes, line 45
45if(l||(t=rt(s)),o=S.cssHooks[t]||S.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(r=o.get(e,!1,i))?r:u[t];"string"===(a=typeof n)&&(r=he.exec(n))&&r[1]&&(n=_e(e,t,r),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=r&&r[3]||(S.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,i))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,i){var r,a,o,s=re(t);return Xe.test(t)||(t=rt(s)),(o=S.cssHooks[t]||S.cssHooks[s])&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=$e(e,t,i)),"normal"===r&&t in st&&(r=st[t]),""===n||n?(a=parseFloat(r),!0===n||isFinite(a)?a||0:r):r}}),S.each(["height","width"],function(e,t){S.cssHooks[t]={get:function(e,n,i){if(n)return!at.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?dt(e,t,i):Ze(e,ot,function(){return dt(e,t,i)})},set:function(e,n,i){var r,a=Qe(e),o=!g.scrollboxSize()&&"absolute"===a.position,s=(o||i)&&"border-box"===S.css(e,"boxSizing",!1,a),l=i?ut(e,t,i,s,a):0;return s&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-ut(e,t,"border",!1,a)-.5)),l&&(r=he.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),lt(0,n,l)}}}),S.cssHooks.marginLeft=et(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat($e(e,"marginLeft"))||e.getBoundingClientRect().left-Ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var i=0,r={},a="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+pe[i]+t]=a[i]||a[i-2]||a[0];return r}},"margin"!==e&&(S.cssHooks[e+t].set=lt)}),S.fn.extend({css:function(e,t){return ee(this,function(e,t,n){var i,r,a={},o=0;if(Array.isArray(t)){for(i=Qe(e),r=t.length;o<r;o++)a[t[o]]=S.css(e,t[o],!1,i);return a}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,arguments.length>1)}}),S.Tween=ct,ct.prototype={constructor:ct,init:function(e,t,n,i,r,a){this.elem=e,this.prop=n,this.easing=r||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=a||(S.cssNumber[n]?"":"px")},cur:function(){var e=ct.propHooks[this.prop];return e&&e.get?e.get(this):ct.propHooks._default.get(this)},run:function(e){var t,n=ct.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ct.propHooks._default.set(this),this}},ct.prototype.init.prototype=ct.prototype,ct.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},ct.propHooks.scrollTop=ct.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=ct.prototype.init,S.fx.step={};var ft,ht,pt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function gt(){ht&&(!1===_.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(gt):n.setTimeout(gt,S.fx.interval),S.fx.tick())}function vt(){return n.setTimeout(function(){ft=void 0}),ft=Date.now()}function yt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=pe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function _t(e,t,n){for(var i,r=(Et.tweeners[t]||[]).concat(Et.tweeners["*"]),a=0,o=r.length;a<o;a++)if(i=r[a].call(n,t,e))return i}function Et(e,t,n){var i,r,a=0,o=Et.prefilters.length,s=S.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=ft||vt(),n=Math.max(0,u.startTime+u.duration-t),i=1-(n/u.duration||0),a=0,o=u.tweens.length;a<o;a++)u.tweens[a].run(i);return s.notifyWith(e,[u,i,n]),i<1&&o?n:(o||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:ft||vt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=S.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.o
vendor: 4,101 bytes, line 45
45pts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),d=u.props;for(!function(e,t){var n,i,r,a,o;for(n in e)if(r=t[i=re(n)],a=e[n],Array.isArray(a)&&(r=a[1],a=e[n]=a[0]),n!==i&&(e[i]=a,delete e[n]),(o=S.cssHooks[i])&&"expand"in o)for(n in a=o.expand(a),delete e[i],a)n in e||(e[n]=a[n],t[n]=r);else t[i]=r}(d,u.opts.specialEasing);a<o;a++)if(i=Et.prefilters[a].call(u,e,d,u.opts))return v(i.stop)&&(S._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return S.map(d,_t,u),v(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),S.fx.timer(S.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}S.Animation=S.extend(Et,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return _e(n.elem,e,he.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(Y);for(var n,i=0,r=e.length;i<r;i++)n=e[i],Et.tweeners[n]=Et.tweeners[n]||[],Et.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,a,o,s,l,u,d,c="width"in t||"height"in t,f=this,h={},p=e.style,m=e.nodeType&&ye(e),g=se.get(e,"fxshow");for(i in n.queue||(null==(o=S._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,S.queue(e,"fx").length||o.empty.fire()})})),t)if(r=t[i],pt.test(r)){if(delete t[i],a=a||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}h[i]=g&&g[i]||S.style(e,i)}if((l=!S.isEmptyObject(t))||!S.isEmptyObject(h))for(i in c&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=g&&g.display)&&(u=se.get(e,"display")),"none"===(d=S.css(e,"display"))&&(u?d=u:(Te([e],!0),u=e.style.display||u,d=S.css(e,"display"),Te([e]))),("inline"===d||"inline-block"===d&&null!=u)&&"none"===S.css(e,"float")&&(l||(f.done(function(){p.display=u}),null==u&&(d=p.display,u="none"===d?"":d)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,h)l||(g?"hidden"in g&&(m=g.hidden):g=se.access(e,"fxshow",{display:u}),a&&(g.hidden=!m),m&&Te([e],!0),f.done(function(){for(i in m||Te([e]),se.remove(e,"fxshow"),h)S.style(e,i,h[i])})),l=_t(m?g[i]:0,i,f),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?Et.prefilters.unshift(e):Et.prefilters.push(e)}}),S.speed=function(e,t,n){var i=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return S.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in S.fx.speeds?i.duration=S.fx.speeds[i.duration]:i.duration=S.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&S.dequeue(this,i.queue)},i},S.fn.extend({fadeTo:function(e,t,n,i){return this.filter(ye).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=S.isEmptyObject(e),a=S.speed(t,n,i),o=function(){var t=Et(this,S.extend({},e),a);(r||se.get(this,"finish"))&&t.stop(!0)};return o.finish=o,r||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",a=S.timers,o=se.get(this);if(r)o[r]&&o[r].stop&&i(o[r]);else for(r in o)o[r]&&o[r].stop&&mt.test(r)&&i(o[r]);for(r=a.length;r--;)a[r].elem!==this||null!=e&&a[r].queue!==e||(a[r].anim.stop(n),t=!1,a.splice(r,1));!t&&n||S.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=se.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],a=S.timers,o=i?i.length:0;for(n.finish=!0,S.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1)
vendor: 10,299 bytes, line 45
45);for(t=0;t<o;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),S.each(["toggle","show","hide"],function(e,t){var n=S.fn[t];S.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(yt(t,!0),e,i,r)}}),S.each({slideDown:yt("show"),slideUp:yt("hide"),slideToggle:yt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){S.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(ft=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),ft=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){ht||(ht=!0,gt())},S.fx.stop=function(){ht=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,i){var r=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(r)}})},function(){var e=_.createElement("input"),t=_.createElement("select").appendChild(_.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=_.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var bt,Tt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return ee(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?S.prop(e,t,n):(1===a&&S.isXMLDoc(e)||(r=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=S.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&M(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Y);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Tt[t]||S.find.attr;Tt[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=Tt[o],Tt[o]=r,r=null!=n(e,t,i)?o:null,Tt[o]=a),r}});var wt=/^(?:input|select|textarea|button)$/i,At=/^(?:a|area)$/i;function St(e){return(e.match(Y)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function Mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Y)||[]}S.fn.extend({prop:function(e,t){return ee(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&S.isXMLDoc(e)||(t=S.propFix[t]||t,r=S.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||At.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(e){var t,n,i,r,a,o;return v(e)?this.each(function(t){S(this).addClass(e.call(this,t,xt(this)))}):(t=Mt(e)).length?this.each(function(){if(i=xt(this),n=1===this.nodeType&&" "+St(i)+" "){for(a=0;a<t.length;a++)r=t[a],n.indexOf(" "+r+" ")<0&&(n+=r+" ");o=St(n),i!==o&&this.setAttribute("class",o)}}):this},removeClass:function(e){var t,n,i,r,a,o;return v(e)?this.each(function(t){S(this).removeClass(e.call(this,t,xt(this)))}):arguments.length?(t=Mt(e)).length?this.each(function(){if(i=xt(this),n=1===this.nodeType&&" "+St(i)+" "){for(a=0;a<t.length;a++)for(r=t[a];n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");o=St(n),i!==o&&this.setAttribute("class",o)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,a,o=typeof e,s="string"===o||Array.isArray(e);return v(e)?this.each(function(n){S(this).toggleClass(e.call(this,n,xt(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Mt(e),this.each(function(){if(s)for(a=S(this),r=0;r<n.length;r++)i=n[r],a.hasClass(i)?a.removeClass(i):a.addClass(i);else void 0!==e&&"boolean"!==o||((i=xt(this))&&se.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===e?"":se.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+St(xt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Rt=/\r/g;S.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=v(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,S(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=S.map(r,function(e){return null==e?"":e+""})),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=S.valHooks[r.type]||S.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Rt,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:St(S.text(e))}},select:{get:function(e){var t,n,i,r=e.options,a=e.selectedIndex,o="select-one"===e.type,s=o?null:[],l=o?a+1:r.length;for(i=a<0?l:o?a:0;i<l;i++)if(((n=r[i]).selected||i===a)&&!n.disabled&&(!n.parentNode.disabled||!M(n.parentNode,"optgroup"))){if(t=S(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,i,r=e.options,a=S.makeArray(t),o=r.length;o--;)((i=r[o]).selected=S.inArray(S.valHooks.option.get(i),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},g.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ct=n.location,It={guid:Date.now()},Lt=/\?/;S.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return i=t&&t.getElementsByTagName("parsererror")[0],t&&!i||S.error("Invalid XML: "+(i?S.map(i.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ot=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,i,r){var a,o,s,l,u,d,c,f,p=[i||_],m=h.call(e,"type")?e.type:e,g=h.call(e,"namespace")?e.namespace.split("."):[];if(o=f=s=i=i||_,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(m+S.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[S.expando]?e:new S.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[m]||{},r||!c.trigger||!1!==c.trigger.apply(i,t))){if(!r&&!c.noBubble&&!y(i)){for(l=c.delegateType||m,Ot.test(l+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(i.ownerDocument||_)&&p.push(s.defaultView||s.parentWindow||n)}for(a=0;(o=p[a++])&&!e.isPropagationStopped();)f=o,e.type=a>1?l:c.bindType||m,(d=(se.get(o,"events")||Object.create(null))[e.type]&&se.get(o,"handle"))&&d.apply(o,t),(d=u&&o[u])&&d.apply&&ae(o)&&(e.result=d.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!ae(i)||u&&v(i[m])&&!y(i)&&((s=i[u])&&(i[u]=null),S.event.triggered=m,e.isPropagationStopped()&&f.addEventListener(m,Dt),i[m](),e.isPropagationStopped()&&f.removeEventListener(m,Dt),S.event.triggered=void 0,s&&(i[u]=s)),e.result}},simulate:function(e,t,n){var i=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(i,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}});var Pt=/\[\]$/,Nt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;function Bt(e,t,n,i){var r;if(Array.isArray(t))S.each(t,function(t,r){n||Pt.test(e)?i(e,r):Bt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==T(t))i(e,t);else for(r in t)Bt(e+"["+r+"]",t[r],n,i)}S.param=function(e,t){var n,i=[],r=function(e,t){var n=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){r(this.name,this.value)});else for(n in e)Bt(n,e[n],t,r);return i.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Ft.test(this.nodeName)&&!kt.test(e)&&(this.checked||!Se.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}});var Ut=/%20/g,jt=/#.*$/,Gt=/([?&])_=[^&]*/,Vt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,zt=/^\/\//,Wt={},qt={},Yt="*/".concat("*"),Kt=_.createElement("a");function Xt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,a=t.toLowerCase().match(Y)||[];if(v(n))for(;i=a[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Qt(e,t,n,i){var r={},a=e===qt;function o(s){var l;return r[s]=!0,S.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||r[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),o(u),!1)}),l}return o(t.dataTypes[0])||!r["*"]&&o("*")}
vendor: 10,754 bytes, line 45
45function Zt(e,t){var n,i,r=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&S.extend(!0,e,i),e}Kt.href=Ct.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,S.ajaxSettings),t):Zt(S.ajaxSettings,e)},ajaxPrefilter:Xt(Wt),ajaxTransport:Xt(qt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,a,o,s,l,u,d,c,f,h=S.ajaxSetup({},t),p=h.context||h,m=h.context&&(p.nodeType||p.jquery)?S(p):S.event,g=S.Deferred(),v=S.Callbacks("once memory"),y=h.statusCode||{},E={},b={},T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(u){if(!o)for(o={};t=Vt.exec(a);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,E[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)w.always(e[w.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),A(0,t),this}};if(g.promise(w),h.url=((e||h.url||Ct.href)+"").replace(zt,Ct.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Y)||[""],null==h.crossDomain){l=_.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Kt.protocol+"//"+Kt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=S.param(h.data,h.traditional)),Qt(Wt,h,t,w),u)return w;for(c in(d=S.event&&h.global)&&0===S.active++&&S.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ht.test(h.type),r=h.url.replace(jt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ut,"+")):(f=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(Lt.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(Gt,"$1"),f=(Lt.test(r)?"&":"?")+"_="+It.guid+++f),h.url=r+f),h.ifModified&&(S.lastModified[r]&&w.setRequestHeader("If-Modified-Since",S.lastModified[r]),S.etag[r]&&w.setRequestHeader("If-None-Match",S.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&w.setRequestHeader("Content-Type",h.contentType),w.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Yt+"; q=0.01":""):h.accepts["*"]),h.headers)w.setRequestHeader(c,h.headers[c]);if(h.beforeSend&&(!1===h.beforeSend.call(p,w,h)||u))return w.abort();if(T="abort",v.add(h.complete),w.done(h.success),w.fail(h.error),i=Qt(qt,h,t,w)){if(w.readyState=1,d&&m.trigger("ajaxSend",[w,h]),u)return w;h.async&&h.timeout>0&&(s=n.setTimeout(function(){w.abort("timeout")},h.timeout));try{u=!1,i.send(E,A)}catch(e){if(u)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,o,l){var c,f,_,E,b,T=t;u||(u=!0,s&&n.clearTimeout(s),i=void 0,a=l||"",w.readyState=e>0?4:0,c=e>=200&&e<300||304===e,o&&(E=function(e,t,n){for(var i,r,a,o,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)a=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){a=r;break}o||(o=r)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}(h,w,o)),!c&&S.inArray("script",h.dataTypes)>-1&&S.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),E=function(e,t,n,i){var r,a,o,s,l,u={},d=e.dataTypes.slice();if(d[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];for(a=d.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=d.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(o=u[l+" "+a]||u["* "+a]))for(r in u)if((s=r.split(" "))[1]===a&&(o=u[l+" "+s[0]]||u["* "+s[0]])){!0===o?o=u[r]:!0!==u[r]&&(a=s[0],d.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}(h,E,w,c),c?(h.ifModified&&((b=w.getResponseHeader("Last-Modified"))&&(S.lastModified[r]=b),(b=w.getResponseHeader("etag"))&&(S.etag[r]=b)),204===e||"HEAD"===h.type?T="nocontent":304===e?T="notmodified":(T=E.state,f=E.data,c=!(_=E.error))):(_=T,!e&&T||(T="error",e<0&&(e=0))),w.status=e,w.statusText=(t||T)+"",c?g.resolveWith(p,[f,T,w]):g.rejectWith(p,[w,T,_]),w.statusCode(y),y=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[w,h,c?f:_]),v.fireWith(p,[w,T]),d&&(m.trigger("ajaxComplete",[w,h]),--S.active||S.event.trigger("ajaxStop")))}return w},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,t){S[t]=function(e,n,i,r){return v(n)&&(r=r||i,i=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:r,data:n,success:i},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},$t=S.ajaxSettings.xhr();g.cors=!!$t&&"withCredentials"in $t,g.ajax=$t=!!$t,S.ajaxTransport(function(e){var t,i;if(g.cors||$t&&!e.crossDomain)return{send:function(r,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=i=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),i=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),_.head.appendChild(t[0])},abort:function(){n&&n()}}});var en,tn=[],nn=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||S.expando+"_"+It.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,i){var r,a,o,s=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(nn,"$1"+r):!1!==e.jsonp&&(e.url+=(Lt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",a=n[r],n[r]=function(){o=arguments},i.always(function(){void 0===a?S(n).removeProp(r):n[r]=a,e[r]&&(e.jsonpCallback=t.jsonpCallback,tn.push(r)),o&&v(a)&&a(o[0]),o=a=void 0}),"script"}),g.createHTMLDocument=((en=_.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===en.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((i=(t=_.implementation.createHTMLDocument("")).createElement("base")).href=_.location.href,t.head.appendChild(i)):t=_),a=!n&&[],(r=j.exec(e))?[t.createElement(r[1])]:(r=Oe([e],t,a),a&&a.length&&S(a).remove(),S.merge([],r.childNodes)));var i,r,a},S.fn.load=function(e,t,n){var i,r,a,o=this,s=e.indexOf(" ");return s>-1&&(i=St(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),o.length>0&&S.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){a=arguments,o.html(i?S("<div>").append(S.parseHTML(e)).find(i):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,u=S.css(e,"position"),d=S(e),c={};"static"===u&&(e.style.position="relative"),s=d.offset(),a=S.css(e,"to
45p"),l=S.css(e,"left"),("absolute"===u||"fixed"===u)&&(a+l).indexOf("auto")>-1?(o=(i=d.position()).top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),v(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(c.top=t.top-s.top+o),null!=t.left&&(c.left=t.left-s.left+r),"using"in t?t.using.call(e,c):d.css(c)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===S.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),r.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-S.css(i,"marginTop",!0),left:t.left-r.left-S.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||me})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;S.fn[e]=function(i){return ee(this,function(e,i,r){var a;if(y(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===r)return a?a[t]:e[i];a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r},e,i,arguments.length)}}),S.each(["top","left"],function(e,t){S.cssHooks[t]=et(g.pixelPosition,function(e,n){if(n)return n=$e(e,t),Ke.test(n)?S(e).position()[t]+"px":n})}),S.each({Height:"height",Width:"width"},function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){S.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===a?"margin":"border");return ee(this,function(t,n,r){var a;return y(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?S.css(t,n,s):S.style(t,n,r,s)},t,o?r:void 0,o)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return i=s.call(arguments,2),r=function(){return e.apply(t||this,i.concat(s.call(arguments)))},r.guid=e.guid=e.guid||S.guid++,r},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=M,S.isFunction=v,S.isWindow=y,S.camelCase=re,S.type=T,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(rn,"$1")},void 0===(i=function(){return S}.apply(t,[]))||(e.exports=i);var an=n.jQuery,on=n.$;return S.noConflict=function(e){return n.$===S&&(n.$=on),e&&n.jQuery===S&&(n.jQuery=an),S},void 0===r&&(n.jQuery=n.$=S),S})},function(e,t,n){"use strict";n.r(t),function(e){
46/**!
47 * @fileOverview Kickass library to create and place poppers near their reference elements.
48 * @version 1.16.1
49 * @license
50 * Copyright (c) 2016 Federico Zivolo and contributors
51 *
52 * Permission is hereby granted, free of charge, to any person obtaining a copy
53 * of this software and associated documentation files (the "Software"), to deal
54 * in the Software without restriction, including without limitation the rights
55 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56 * copies of the Software, and to permit persons to whom the Software is
57 * furnished to do so, subject to the following conditions:
58 *
59 * The above copyright notice and this permission notice shall be included in all
60 * copies or substantial portions of the Software.
61 *
62 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
68 * SOFTWARE.
69 */
70var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,i=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var r=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},i))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}
vendor: 18,096 bytes, line 70
70function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+i)?e:l(s(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var d=n&&!(!window.MSInputMethodContext||!document.documentMode),c=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?d:10===e?c:d||c}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===o(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,r=n?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(r,0);var o,s,l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(r))return"BODY"===(s=(o=l).nodeName)||"HTML"!==s&&h(o.firstElementChild)!==o?h(l):l;var u=p(e);return u.host?m(u.host,t):m(e,p(t).host)}function g(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var i=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||i)[t]}return e[t]}function v(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+i+"Width"])}function y(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(i["margin"+("Height"===e?"Top":"Left")])+parseInt(i["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,i=f(10)&&getComputedStyle(n);return{height:y("Height",t,n,i),width:y("Width",t,n,i)}}var E=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),b=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};function w(e){return T({},e,{right:e.left+e.width,bottom:e.top+e.height})}function A(e){var t={};try{if(f(10)){t=e.getBoundingClientRect();var n=g(e,"top"),i=g(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?_(e.ownerDocument):{},s=a.width||e.clientWidth||r.width,l=a.height||e.clientHeight||r.height,u=e.offsetWidth-s,d=e.offsetHeight-l;if(u||d){var c=o(e);u-=v(c,"x"),d-=v(c,"y"),r.width-=u,r.height-=d}return w(r)}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=f(10),r="HTML"===t.nodeName,a=A(e),s=A(t),u=l(e),d=o(t),c=parseFloat(d.borderTopWidth),h=parseFloat(d.borderLeftWidth);n&&r&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=w({top:a.top-s.top-c,left:a.left-s.left-h,width:a.width,height:a.height});if(p.marginTop=0,p.marginLeft=0,!i&&r){var m=parseFloat(d.marginTop),v=parseFloat(d.marginLeft);p.top-=c-m,p.bottom-=c-m,p.left-=h-v,p.right-=h-v,p.marginTop=m,p.marginLeft=v}return(i&&!n?t.contains(u):t===u&&"BODY"!==u.nodeName)&&(p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=g(t,"top"),r=g(t,"left"),a=n?-1:1;return e.top+=i*a,e.bottom+=i*a,e.left+=r*a,e.right+=r*a,e}(p,t)),p}function x(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===o(e,"position"))return!0;var n=s(e);return!!n&&x(n)}function M(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function R(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},o=r?M(e):m(e,u(t));if("viewport"===i)a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=S(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),o=t?0:g(n),s=t?0:g(n,"left");return w({top:o-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:r,height:a})}(o,r);else{var d=void 0;"scrollParent"===i?"BODY"===(d=l(s(t))).nodeName&&(d=e.ownerDocument.documentElement):d="window"===i?e.ownerDocument.documentElement:i;var c=S(d,o,r);if("HTML"!==d.nodeName||x(o))a=c;else{var f=_(e.ownerDocument),h=f.height,p=f.width;a.top+=c.top-c.marginTop,a.bottom=h+c.top,a.left+=c.left-c.marginLeft,a.right=p+c.left}}var v="number"==typeof(n=n||0);return a.left+=v?n:n.left||0,a.top+=v?n:n.top||0,a.right-=v?n:n.right||0,a.bottom-=v?n:n.bottom||0,a}function C(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=R(n,i,a,r),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(e){return T({key:e},s[e],{area:(t=s[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),u=l.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),d=u.length>0?u[0].key:l[0].key,c=e.split("-")[1];return d+(c?"-"+c:"")}function I(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return S(n,i?M(t):m(t,u(n)),i)}function L(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),i=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function O(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function D(e,t,n){n=n.split("-")[0];var i=L(e),r={width:i.width,height:i.height},a=-1!==["right","left"].indexOf(n),o=a?"top":"left",s=a?"left":"top",l=a?"height":"width",u=a?"width":"height";return r[o]=t[o]+t[l]/2-i[l]/2,r[s]=n===s?t[s]-i[u]:t[O(s)],r}function P(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=P(e,function(e){return e[t]===n});return e.indexOf(i)}(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&a(n)&&(t.offsets.popper=w(t.offsets.popper),t.offsets.reference=w(t.offsets.reference),t=n(t,e))}),t}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=I(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=C(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=D(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=N(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function F(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var r=t[i],a=r?""+r+n:e;if(void 0!==document.body.style[a])return a}return null}function U(){return this.state.isDestroyed=!0,F(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function j(e){var t=e.ownerDocument;return t?t.defaultView:window}function G(e,t,n,i){var r="BODY"===e.nodeName,a=r?e.ownerDocument.defaultView:e;a.addEventListener(t,n,{passive:!0}),r||G(l(a.parentNode),t,n,i),i.push(a)}function V(e,t,n,i){n.updateBound=i,j(e).addEventListener("resize",n.updateBound,{passive:!0});var r=l(e);return G(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function H(){this.state.eventsEnabled||(this.state=V(this.reference,this.options,this.state,this.scheduleUpdate))}function z(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,j(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function W(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function q(e,t){Object.keys(t).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&W(t[n])&&(i="px"),e.style[n]=t[n]+i})}var Y=n&&/Firefox/i.test(navigator.userAgent);function K(e,t,n){var i=P(e,function(e){return e.name===t}),r=!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order});if(!r){var a="`"+t+"`",o="`"+n+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return r}var X=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Q=X.slice(3);function Z(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Q.indexOf(e),i=Q.slice(n+1).concat(Q.slice(0,n));return t?i.reverse():i}var J="flip",$="clockwise",ee="counterclockwise";function te(e,t,n,i){var r=[0,0],a=-1!==["right","left"].indexOf(i),o=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=o.indexOf(P(o,function(e){return-1!==e.search(/,|\s/)}));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return u=u.map(function(e,i){var r=(1===i?!a:a)?"height":"width",o=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+r[1],o=r[2];if(!a)return e;if(0===o.indexOf("%")){return w("%p"===o?n:i)[t]/100*a}if("vh"===o||"vw"===o)return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a;return a}(e,r,t,n)})}),u.forEach(function(e,t){e.forEach(function(n,i){W(n)&&(r[t]+=n*("-"===e[i-1]?-1:1))})}),r}var ne={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets,a=r.reference,o=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",d={start:b({},l,a[l]),end:b({},l,a[l]+a[u]-o[u])};e.offsets.popper=T({},o,d[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,i=e.placement,r=e.offsets,a=r.popper,o=r.reference,s=i.split("-")[0],l=void 0;return l=W(+n)?[+n,0]:te(n,a,o,s),"left"===s?(a.top+=l[0],a.left-=l[1]):"right"===s?(a.top+=l[0],a.left+=l[1]):"top"===s?(a.left+=l[0],a.top-=l[1]):"bottom"===s&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var i=B("transform"),r=e.instance.popper.style,a=r.top,o=r.left,s=r[i];r.top="",r.left="",r[i]="";var l=R(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);r.top=a,r.left=o,r[i]=s,t.boundaries=l;var u=t.priority,d=e.offsets.popper,c={primary:function(e){var n=d[e];return d[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(d[e],l[e])),b({},e,n)},secondary:function(e){var n="right"===e?"left":"top",i=d[n];return d[e]>l[e]&&!t.escapeWithReference&&(i=Math.min(d[n],l[e]-("right"===e?d.width:d.height))),b({},n,i)}};return u.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";d=T({},d,c[t](e))}),e.offsets.popper=d,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,i=t.reference,r=e.placement.split("-")[0],a=Math.floor,o=-1!==["top","bottom"].indexOf(r),s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return n[s]<a(i[l])&&(e.offsets.popper[l]=a(i[l])-n[u]),n[l]>a(i[s])&&(e.offsets.popper[l]=a(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!K(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],a=e.offsets,s=a.popper,l=a.reference,u=-1!==["left","right"].indexOf(r),d=u?"height":"width",c=u?"Top":"Left",f=c.toLowerCase(),h=u?"left":"top",p=u?"bottom":"right",m=L(i)[d];l[p]-m<s[f]&&(e.offsets.popper[f]-=s[f]-(l[p]-m)),l[f]+m>s[p]&&(e.offsets.popper[f]+=l[f]+m-s[p]),e.offsets.popper=w(e.offsets.popper);var g=l[f]+l[d]/2-m/2,v=o(e.instance.popper),y=parseFloat(v["margin"+c]),_=parseFloat(v["border"+c+"Width"]),E=g-e.offsets.popper[f]-y-_;return E=Math.max(Math.min(s[d]-m,E),0),e.arrowElement=i,e.offsets.arrow=(b(n={},f,Math.round(E)),b(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(F(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=R(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],r=O(i),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case J:o=[i,r];break;case $:o=Z(i);break;case ee:o=Z(i,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(i!==s||o.length===l+1)return e;i=e.placement.split("-")[0],r=O(i);var u=e.offsets.popper,d=e.offsets.reference,c=Math.floor,f="left"===i&&c(u.right)>c(d.left)||"right"===i&&c(u.left)<c(d.right)||"top"===i&&c(u.bottom)>c(d.top)||"bottom"===i&&c(u.top)<c(d.bottom),h=c(u.left)<c(n.left),p=c(u.right)>c(n.right),m=c(u.top)<c(n.top),g=c(u.bottom)>c(n.bottom),v="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,y=-1!==["top","bottom"].indexOf(i),_=!!t.flipVariations&&(y&&"start"===a&&h||y&&"end"===a&&p||!y&&"start"===a&&m||!y&&"end"===a&&g),E=!!t.flipVariationsByContent&&(y&&"start"===a&&p||y&&"end"===a&&h||!y&&"start"===a&&g||!y&&"end"===a&&m),b=_||E;(f||v||b)&&(e.flipped=!0,(f||v)&&(i=o[l+1]),b&&(a=function(e){return"end"===e?"start":"start"===e?"end":e}(a)),e.placement=i+(a?"-"+a:""),e.offsets.popper=T({},e.offsets.popper,D(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,r=i.popper,a=i.reference,o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[o?"left":"top"]=a[n]-(s?r[o?"width":"height"]:0),e.placement=O(t),e.offsets.popper=w(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=P(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,i=t.y,r=e.offsets.popper,a=P(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=void 0!==a?a:t.gpuAcceleration,s=h(e.instance.popper),l=A(s),u={position:r.position},d=function(e,t){var n=e.offsets,i=n.popper,r=n.reference,a=Math.round,o=Math.floor,s=function(e){return e},l=a(r.width),u=a(i.width),d=-1!==["left","right"].indexOf(e.placement),c=-1!==e.placement.indexOf("-"),f=t?d||c||l%2==u%2?a:o:s,h=t?a:s;return{left:f(l%2==1&&u%2==1&&!c&&t?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:f(i.right)}}(e,window.devicePixelRatio<2||!Y),c="bottom"===n?"top":"bottom",f="right"===i?"left":"right",p=B("transform"),m=void 0,g=void 0;if(g="bottom"===c?"HTML"===s.nodeName?-s.clientHeight+d.bottom:-l.height+d.bottom:d.top,m="right"===f?"HTML"===s.nodeName?-s.clientWidth+d.right:-l.width+d.right:d.left,o&&p)u[p]="translate3d("+m+"px, "+g+"px, 0)",u[c]=0,u[f]=0,u.willChange="transform";else{var v="bottom"===c?-1:1,y="right"===f?-1:1;u[c]=g*v,u[f]=m*y,u.willChange=c+", "+f}var _={"x-placement":e.placement};return e.attributes=T({},_,e.attributes),e.styles=T({},u,e.styles),e.arrowStyles=T({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return q(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEac
70h(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&q(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,i,r){var a=I(r,t,e,n.positionFixed),o=C(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",o),q(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}},ie={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:ne},re=function(){function e(t,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=r(this.update.bind(this)),this.options=T({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(T({},e.Defaults.modifiers,o.modifiers)).forEach(function(t){i.options.modifiers[t]=T({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return T({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&a(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return E(e,[{key:"update",value:function(){return k.call(this)}},{key:"destroy",value:function(){return U.call(this)}},{key:"enableEventListeners",value:function(){return H.call(this)}},{key:"disableEventListeners",value:function(){return z.call(this)}}]),e}();re.Utils=("undefined"!=typeof window?window:e).PopperUtils,re.placements=X,re.Defaults=ie,t.default=re}.call(this,n(12))},,function(e,t,n){var i,r,a;r=[n(62)],i=function(e){var t,n=e.validator,i="unobtrusiveValidation";function r(e,t,n){e.rules[t]=n,e.message&&(e.messages[t]=e.message)}function a(e){return e.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function o(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function s(e){return e.substr(0,e.lastIndexOf(".")+1)}function l(e,t){return 0===e.indexOf("*.")&&(e=e.replace("*.",t)),e}function u(t,n){var i=e(this).find("[data-valmsg-for='"+o(n[0].name)+"']"),r=i.attr("data-valmsg-replace"),a=r?!1!==e.parseJSON(r):null;i.removeClass("field-validation-valid").addClass("field-validation-error"),t.data("unobtrusiveContainer",i),a?(i.empty(),t.removeClass("input-validation-error").appendTo(i)):t.hide()}function d(t,n){var i=e(this).find("[data-valmsg-summary=true]"),r=i.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),i.addClass("validation-summary-errors").removeClass("validation-summary-valid"),e.each(n.errorList,function(){e("<li />").html(this.message).appendTo(r)}))}function c(t){var n=t.data("unobtrusiveContainer");if(n){var i=n.attr("data-valmsg-replace"),r=i?e.parseJSON(i):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),t.removeData("unobtrusiveContainer"),r&&n.empty()}}function f(t){var n=e(this),i="__jquery_unobtrusive_validation_form_reset";if(!n.data(i)){n.data(i,!0);try{n.data("validator").resetForm()}finally{n.removeData(i)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function h(t){var r=e(t),a=r.data(i),o=e.proxy(f,t),s=n.unobtrusive.options||{},l=function(n,i){var r=s[n];r&&e.isFunction(r)&&r.apply(t,i)};return a||(a={options:{errorClass:s.errorClass||"input-validation-error",errorElement:s.errorElement||"span",errorPlacement:function(){u.apply(t,arguments),l("errorPlacement",arguments)},invalidHandler:function(){d.apply(t,arguments),l("invalidHandler",arguments)},messages:{},rules:{},success:function(){c.apply(t,arguments),l("success",arguments)}},attachValidation:function(){r.off("reset."+i,o).on("reset."+i,o).validate(this.options)},validate:function(){return r.validate(),r.valid()}},r.data(i,a)),a}return n.unobtrusive={adapters:[],parseElement:function(t,n){var i,r,a,o=e(t),s=o.parents("form")[0];s&&((i=h(s)).options.rules[t.name]=r={}
70,i.options.messages[t.name]=a={},e.each(this.adapters,function(){var n="data-val-"+this.name,i=o.attr(n),l={};void 0!==i&&(n+="-",e.each(this.params,function(){l[this]=o.attr(n+this)}),this.adapt({element:t,form:s,message:i,params:l,rules:r,messages:a}))}),e.extend(r,{__dummy__:!0}),n||i.attachValidation())},parse:function(t){var i=e(t),r=i.parents().addBack().filter("form").add(i.find("form")).has("[data-val=true]");i.find("[data-val=true]").each(function(){n.unobtrusive.parseElement(this,!0)}),r.each(function(){var e=h(this);e&&e.attachValidation()})}},(t=n.unobtrusive.adapters).add=function(e,t,n){return n||(n=t,t=[]),this.push({name:e,params:t,adapt:n}),this},t.addBool=function(e,t){return this.add(e,function(n){r(n,t||e,!0)})},t.addMinMax=function(e,t,n,i,a,o){return this.add(e,[a||"min",o||"max"],function(e){var a=e.params.min,o=e.params.max;a&&o?r(e,i,[a,o]):a?r(e,t,a):o&&r(e,n,o)})},t.addSingleVal=function(e,t,n){return this.add(e,[t||"val"],function(i){r(i,n||e,i.params[t])})},n.addMethod("__dummy__",function(e,t,n){return!0}),n.addMethod("regex",function(e,t,n){var i;return!!this.optional(t)||(i=new RegExp(n).exec(e))&&0===i.index&&i[0].length===e.length}),n.addMethod("nonalphamin",function(e,t,n){var i;return n&&(i=(i=e.match(/\W/g))&&i.length>=n),i}),n.methods.extension?(t.addSingleVal("accept","mimtype"),t.addSingleVal("extension","extension")):t.addSingleVal("extension","extension","accept"),t.addSingleVal("regex","pattern"),t.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),t.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),t.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),t.add("equalto",["other"],function(t){var n=s(t.element.name),i=l(t.params.other,n);r(t,"equalTo",e(t.form).find(":input").filter("[name='"+o(i)+"']")[0])}),t.add("required",function(e){"INPUT"===e.element.tagName.toUpperCase()&&"CHECKBOX"===e.element.type.toUpperCase()||r(e,"required",!0)}),t.add("remote",["url","type","additionalfields"],function(t){var n={url:t.params.url,type:t.params.type||"GET",data:{}},i=s(t.element.name);e.each(a(t.params.additionalfields||t.element.name),function(r,a){var s=l(a,i);n.data[s]=function(){var n=e(t.form).find(":input").filter("[name='"+o(s)+"']");return n.is(":checkbox")?n.filter(":checked").val()||n.filter(":hidden").val()||"":n.is(":radio")?n.filter(":checked").val()||"":n.val()}}),r(t,"remote",n)}),t.add("password",["min","nonalphamin","regex"],function(e){e.params.min&&r(e,"minlength",e.params.min),e.params.nonalphamin&&r(e,"nonalphamin",e.params.nonalphamin),e.params.regex&&r(e,"regex",e.params.regex)}),t.add("fileextensions",["extensions"],function(e){r(e,"extension",e.params.extensions)}),e(function(){n.unobtrusive.parse(document)}),n.unobtrusive},void 0===(a="function"==typeof i?i.apply(t,r):i)||(e.exports=a)},function(e,t,n){var i=n(103),r=n(61),a=i.default;void 0===r.fluidPlayer&&(r.fluidPlayer=a),e.exports=i},function(e,t,n){"use strict";n.r(t),function(e,i){n(104);var r=n(95);if("undefined"==typeof FP_HOMEPAGE&&(e.FP_HOMEPAGE="https://fluidplayer.com"),"undefined"==typeof FP_BUILD_VERSION&&(e.FP_BUILD_VERSION="v3"),"undefined"==typeof FP_ENV){const t=window&&window.location&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname||""===window.location.hostname);i&&i.env||window&&!t?e.FP_ENV="production":e.FP_ENV="development"}"undefined"==typeof FP_DEBUG&&(e.FP_DEBUG=!1),t.default=r.a}.call(this,n(12),n(16))},function(e,t,n){"use strict";var i=n(94),r=n.n(i);"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const n=Object(e);for(let e=1;e<arguments.length;e++){const t=arguments[e];if(null!=t)for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},writable:!0,configurable:!0}),function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};const n=document.createEvent("CustomEvent");
vendor: 4,519 bytes, line 70
70return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}),r.a.polyfill()},function(e,t){!function(e){function t(e,t){return void 0===t&&(t=1),"rgba("+[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16),t].join(",")+")"}var n=1;function i(e,i,a){switch(a){case"webvtt.font.color":case"webvtt.font.opacity":var o=Services.prefs.getCharPref("webvtt.font.color"),s=Services.prefs.getIntPref("webvtt.font.opacity")/100;r.fontSet=t(o,s);break;case"webvtt.font.scale":n=Services.prefs.getIntPref("webvtt.font.scale")/100;break;case"webvtt.bg.color":case"webvtt.bg.opacity":var l=Services.prefs.getCharPref("webvtt.bg.color"),u=Services.prefs.getIntPref("webvtt.bg.opacity")/100;r.backgroundSet=t(l,u);break;case"webvtt.edge.color":case"webvtt.edge.type":var d=Services.prefs.getIntPref("webvtt.edge.type"),c=Services.prefs.getCharPref("webvtt.edge.color");r.edgeSet=["","0px 0px ","4px 4px 4px ","-2px -2px ","2px 2px "][d]+t(c)}}if("undefined"!=typeof Services){var r={};["webvtt.font.color","webvtt.font.opacity","webvtt.font.scale","webvtt.bg.color","webvtt.bg.opacity","webvtt.edge.color","webvtt.edge.type"].forEach(function(e){i(0,0,e),Services.prefs.addObserver(e,i,!1)})}var a=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function s(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function l(){this.values=a(null)}function u(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(n);if(2===o.length)t(o[0],o[1])}}function d(e,t,n){var i=e;function r(){var t=s(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),a(),t.endTime=r(),a(),function(e,t){var i=new l;u(e,function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical",""),t.line=i.get("line","auto"),t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align","middle"),t.position=i.get("position","auto"),t.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}o.prototype=a(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},l.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={v:"title",lang:"lang"},p={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>
70]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e){return c[e]}function r(e){for(;y=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(y[0],i);return e}function a(e,t){return!p[t.localName]||p[t.localName]===e.localName}function o(t,n){var i=f[t];if(!i)return null;var r=e.document.createElement(i);r.localName=i;var a=h[t];return a&&n&&(r[a]=n.trim()),r}for(var l,u=e.document.createElement("div"),d=u,m=[];null!==(l=n());)if("<"!==l[0])d.appendChild(e.document.createTextNode(r(l)));else{if("/"===l[1]){m.length&&m[m.length-1]===l.substr(2).replace(">","")&&(m.pop(),d=d.parentNode);continue}var g,v=s(l.substr(1,l.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),d.appendChild(g);continue}var y=l.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=o(y[1],y[3])))continue;if(!a(d,g))continue;y[2]&&(g.className=y[2].substr(1).replace("."," ")),m.push(y[1]),d.appendChild(g),d=g}return u}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(){}function _(e,t,n){var i="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent),a="rgba(255, 255, 255, 1)",o="rgba(0, 0, 0, 0.8)",s="";void 0!==r&&(a=r.fontSet,o=r.backgroundSet,s=r.edgeSet),i&&(a="rgb(255, 255, 255)",o="rgb(0, 0, 0)"),y.call(this),this.cue=t,this.cueDiv=m(e,t.text);var l={color:a,backgroundColor:o,textShadow:s,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};i||(l.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",l.unicodeBidi="plaintext"),this.applyStyles(l,this.cueDiv),this.div=e.document.createElement("div"),l={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},i||(l.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}(this.cueDiv),l.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(l),this.div.appendChild(this.cueDiv);var u=0;switch(t.positionAlign){case"start":u=t.position;break;case"middle":u=t.position-t.size/2;break;case"end":u=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(u,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(u,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")}
vendor: 6,610 bytes, line 70
70)}}function E(e){var t,n,i,r,a="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight,a&&!this.lineHeight&&(this.lineHeight=13)}function b(e,t,n,i){var r=new E(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var u=r.lineHeight,d=u*Math.round(o),c=n[l]+u,f=s[0];Math.abs(d)>c&&(d=d<0?-1:1,d*=Math.ceil(c/u)*u),o<0&&(d+=""===a.vertical?n.height:n.width,s=s.reverse()),r.move(f,d)}else{var h=r.lineHeight/n.height*100;switch(a.lineAlign){case"middle":o-=h/2;break;case"end":o-=h}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],r=new E(t)}var p=function(e,t){for(var r,a=new E(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(i);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(r=new E(e),o=l),e=new E(a)}return r||a}(r,s);t.move(p.toCSSCompatValues(n))}function T(){}y.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},y.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=a(y.prototype),_.prototype.constructor=_,E.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},E.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},E.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},E.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},E.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},E.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},E.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},E.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},T.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},T.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};T.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",i.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var a=[],o=E.getSimpleBoxPosition(r),s={font:Math.round(.05*o.height*100)/100*n+"px sans-serif"};!function(){for(var n,i,l=0;l<t.length;l++)i=t[l],n=new _(e,i,s),r.appendChild(n.div),b(0,n,o,a),i.displayState=n.div,a.push(E.getSimpleBoxPosition(n))}()}else for(var l=0;l<t.length;l++)r.appendChild(t[l].displayState)},T.Parser=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},T.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){u(e,function(e,n){if("Region"===e)!function(e){var n=new l;if(u(e,function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new l;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}},/=/,/\s/),n.has("id")){var i=new t.window.VTTRegion;i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new o(o.Errors.BadSignature);t.state="HEADER"}for(var s=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new t.window.VTTCue(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{d(r,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var c=-1!==r.indexOf("--\x3e");
70if(!r||c&&(s=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new o(o.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.WebVTT=T}(this)},function(e,t,n){var i;e.exports&&(this.VTTCue=this.VTTCue||n(107).VTTCue),(i=this).VTTCue.prototype.toJSON=function(){var e={},t=this;return Object.keys(this).forEach(function(n){"getCueAsHTML"!==n&&"hasBeenReset"!==n&&"displayState"!==n&&(e[n]=t[n])}),e},i.VTTCue.create=function(e){if(!e.hasOwnProperty("startTime")||!e.hasOwnProperty("endTime")||!e.hasOwnProperty("text"))throw new Error("You must at least have start time, end time, and text.");var t=new i.VTTCue(e.startTime,e.endTime,e.text);for(var n in e)t.hasOwnProperty(n)&&(t[n]=e[n]);return t},i.VTTCue.fromJSON=function(e){return this.create(JSON.parse(e))}},function(e,t){!function(e){var t={"":!0,lr:!0,rl:!0},n={start:!0,middle:!0,end:!0,left:!0,right:!0};function i(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function a(e,n,a){var o=this,s=/MSIE\s8\.0/.test(navigator.userAgent),l={};s?o=document.createElement("custom"):l.enumerable=!0,o.hasBeenReset=!1;var u="",d=!1,c=e,f=n,h=a,p=null,m="",g=!0,v="auto",y="start",_=50,E="middle",b=50,T="middle";if(Object.defineProperty(o,"id",r({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(o,"pauseOnExit",r({},l,{get:function(){return d},set:function(e){d=!!e}})),Object.defineProperty(o,"startTime",r({},l,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",r({},l,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",r({},l,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",r({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",r({},l,{get:function(){return m},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");m=n,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",r({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",r({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",r({},l,{get:function(){return y},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",r({},l,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",r({},l,{get:function(){return E},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",r({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",r({},l,{get:function(){return T},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");T=t,this.hasBeenReset=!0}})),o.displayState=void 0,s)return o}a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.VTTCue=e.VTTCue||a}(this)},function(e,t,n){var i;e.exports&&(this.VTTRegion=n(109).VTTRegion),(i=this).VTTRegion.create=function(e){var t=new i.VTTRegion;for(var n in e)t.hasOwnProperty(n)&&(t[n]=e[n]);return t},i.VTTRegion.fromJSON=function(e){return this.create(JSON.parse(e))}},function(e,t){!function(e){var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.VTTRegion=e.VTTRegion||function(){var e=100,i=3,r=0,a=100,o=0,s=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return a}
70,set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");l=n}}})}}(this)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Debug=t.FactoryMaker=t.MediaPlayer=void 0;var i=s(n(63)),r=s(n(1)),a=s(n(3)),o=n(54);function s(e){return e&&e.__esModule?e:{default:e}}var l="undefined"!=typeof window&&window||e,u=l.dashjs;u||(u=l.dashjs={}
70),u.MediaPlayer=i.default,u.FactoryMaker=r.default,u.Debug=a.default,u.Version=(0,o.getVersionString)(),t.default=u,t.MediaPlayer=i.default,t.FactoryMaker=r.default,t.Debug=a.default}).call(this,n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=u(n(4)),r=u(n(10)),a=u(n(2)),o=u(n(5)),s=u(n(1)),l=u(n(3));function u(e){return e&&e.__esModule?e:{default:e}}function d(){var e=this.context,t=(0,a.default)(e).getInstance(),n=void 0,s=void 0,u=void 0,d=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0,S=void 0,x=void 0,M=void 0,R=void 0,C=void 0,I=void 0;function L(e){!E&&e.fromStreamInfo&&void 0!==g[e.fromStreamInfo.id]&&(delete y[e.fromStreamInfo.id],delete g[e.fromStreamInfo.id])}function O(){return parseFloat((D()-U()).toFixed(5))}function D(){var e=Y(!0),t=E&&_?e-_.start:0;return e+(_?_.duration-t:t)}function P(){_&&f&&f.getElement()?f.play():T=!0}function N(){return _&&f?f.isPaused():null}function k(){_&&f&&f.pause()}function F(){return _&&f?f.isSeeking():null}function B(e,n,i){_&&f&&(!0===i?e!==f.getTime()&&(f.removeEventListener("seeking",ie),s.info("Requesting internal seek to time: "+e),f.setCurrentTime(e,n)):(t.trigger(o.default.PLAYBACK_SEEK_ASKED),_&&(delete y[_.id],delete g[_.id]),s.info("Requesting seek to time: "+e),f.setCurrentTime(e,n)))}function U(){return _&&f?f.getTime():null}function j(){var e=U();if(E&&!isNaN(A)){var t=A/1e3;e>t&&(e-=t)}return e}function G(){return _&&f?f.getPlaybackRate():null}function V(){return _&&f?f.getEnded():null}function H(){return E}function z(){if(!E||isNaN(A))return NaN;var e=j();if(isNaN(e)||0===e)return 0;var t=(new Date).getTime()+1e3*h.getClientTimeOffset();return Math.max(((t-A-1e3*e)/1e3).toFixed(3),0)}function W(){p=NaN,T=!1,g={},v=0,A=0,y={},f&&(t.off(o.default.DATA_UPDATE_COMPLETED,Z,this),t.off(o.default.BUFFER_LEVEL_STATE_CHANGED,ve,this),t.off(o.default.BYTES_APPENDED_END_FRAGMENT,me,this),t.off(o.default.LOADING_PROGRESS,ge,this),t.off(o.default.PERIOD_SWITCH_STARTED,L,this),t.off(o.default.PLAYBACK_PROGRESS,he,this),t.off(o.default.PLAYBACK_TIME_UPDATED,he,this),t.off(o.default.PLAYBACK_ENDED,de,this),t.off(o.default.STREAM_INITIALIZING,_e,this),X(),f.removeEventListener("canplay",J),f.removeEventListener("play",$),f.removeEventListener("waiting",ee),f.removeEventListener("playing",te),f.removeEventListener("pause",ne),f.removeEventListener("error",ce),f.removeEventListener("seeking",ie),f.removeEventListener("seeked",re),f.removeEventListener("timeupdate",ae),f.removeEventListener("progress",oe),f.removeEventListener("ratechange",se),f.removeEventListener("loadedmetadata",le),f.removeEventListener("stalled",ye),f.removeEventListener("ended",ue)),m=null,f=null,_=null,E=null}function q(){var e=C.getURIFragmentData(),t=void 0;if(e){t={};var n=parseInt(e.r,10);n>=0&&_&&n<_.manifestInfo.DVRWindowSize&&null===e.t&&(e.t=Math.max(Math.floor(Date.now()/1e3)-_.manifestInfo.DVRWindowSize,_.manifestInfo.availableFrom.getTime()/1e3+_.start)+n),t.fragS=parseFloat(e.s),t.fragT=parseFloat(e.t)}return t}function Y(e,t){var n=void 0,i=NaN;if(e)i=_?_.start:i;else{var r=q();i=r?isNaN(r.fragS)?r.fragT:r.fragS:0}if(E)!isNaN(i)&&_&&((n=i-_.manifestInfo.availableFrom.getTime()/1e3)>p||n<(isNaN(t)?NaN:t-_.manifestInfo.DVRWindowSize))&&(n=null),n=n||p;else if(_)if(!isNaN(i)&&i<Math.max(_.manifestInfo.duration,_.duration)&&i>=0)n=i;else{var a=g[_.id];n=void 0!==a?Math.max(void 0!==a.audio?a.audio:0,void 0!==a.video?a.video:0,_.start):_.start}return n}function K(){if(null===m){m=setInterval(function(){var e;t.trigger(o.default.WALLCLOCK_TIME_UPDATED,{isDynamic:E,time:new Date}),H()&&N()&&(e=Date.now(),(!w||e>w+500)&&(w=e,ae()))},I.get().streaming.wallclockTimeUpdateInterval)}}function X(){clearInterval(m),m=null}function Q(){if(!N()&&E&&0!==f.getReadyState()){var e=j(),t=function(e){var t=d.getCurrentDVRInfo(),n=t?t.range:null;return n?e>n.end?Math.max(n.end-2*_.manifestInfo.minBufferTime,n.start):e>0&&e+.25<n.start&&Math.abs(e-n.start)<31536e4?n.start:e:NaN}(e);!isNaN(t)&&t!==e&&B(t)}}function Z(e){if(!e.error){var t=c.convertDataToRepresentationInfo(e.currentRepresentation),n=t?t.mediaInfo.streamInfo:null;null!==n&&_.id===n.id&&(_=n,Q())}}function J(){t.trigger(o.default.CAN_PLAY)}function $(){s.info("Native video element event: play"),Q(),K(),t.trigger(o.default.PLAYBACK_STARTED,{startTime:U()})}function ee(){s.info("Native video element event: waiting"),t.trigger(o.default.PLAYBACK_WAITING,{playingTime:U()})}function te(){s.info("Native video element event: playing"),t.trigger(o.default.PLAYBACK_PLAYING,{playingTime:U()})}function ne(){s.info("Native video element event: pause"),t.trigger(o.default.PLAYBACK_PAUSED,{ended:V()})}function ie(){var e=U();s.info("Seeking to: "+e),K(),t.trigger(o.default.PLAYBACK_SEEKING,{seekTime:e})}
70function re(){s.info("Native video element event: seeked"),t.trigger(o.default.PLAYBACK_SEEKED),f.addEventListener("seeking",ie)}function ae(){_&&t.trigger(o.default.PLAYBACK_TIME_UPDATED,{timeToEnd:O(),time:U()})}function oe(){t.trigger(o.default.PLAYBACK_PROGRESS)}function se(){var e=G();s.info("Native video element event: ratechange: ",e),t.trigger(o.default.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function le(){s.info("Native video element event: loadedmetadata"),t.trigger(o.default.PLAYBACK_METADATA_LOADED),K()}function ue(){s.info("Native video element event: ended"),k(),X(),t.trigger(o.default.PLAYBACK_ENDED,{isLast:u.getActiveStreamInfo().isLast})}function de(e){m&&e.isLast&&(s.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended"),f.setCurrentTime(D()),k(),X())}function ce(e){var n=e.target||e.srcElement;t.trigger(o.default.PLAYBACK_ERROR,{error:n.error})}function fe(e,t){if(t&&t.length>0)for(var n=0,i=t.length;n<i;n++)if(e>=t.start(n)&&e<t.end(n))return!0;return!1}function he(){E&&I.get().streaming.lowLatencyEnabled&&I.get().streaming.liveCatchUpPlaybackRate>0&&!N()&&!F()&&(I.get().streaming.liveCatchUpPlaybackRate>0&&U()>0&&Math.abs(z()-b.getLiveDelay())>I.get().streaming.liveCatchUpMinDrift?function(){if(f){var e=I.get().streaming.liveCatchUpPlaybackRate,t=b.getLiveDelay(),n=z()-t,i=5*n,r=1-e+2*e/(1+Math.pow(Math.E,-i));if(M)(function(){var e=null;
70return u.getActiveStreamProcessors().forEach(function(t){var n=t.getBufferLevel();e=null===e?n:Math.min(e,n)}),e})()>t/2?M=!1:n>0&&(r=1);Math.abs(f.getPlaybackRate()-r)>R&&f.setPlaybackRate(r),I.get().streaming.liveCatchUpMaxDrift>0&&!x&&n>I.get().streaming.liveCatchUpMaxDrift?(s.info("Low Latency catchup mechanism. Latency too high, doing a seek to live point"),x=!0,B(((a=d.getCurrentDVRInfo())?a.range:null).end-b.getLiveDelay(),!0,!1)):x=!1}var a}():pe())}function pe(){f&&f.setPlaybackRate(1)}function me(e){var t,n=void 0,r=e.bufferedRanges;if(r&&r.length&&(!g[_.id]||!0!==g[_.id].started)){var a=e.sender.getType();void 0===y[_.id]&&(y[_.id]=[]),y[_.id][a]=r,void 0===g[_.id]&&(g[_.id]=[],g[_.id].started=!1),void 0===g[_.id][a]&&(g[_.id][a]=Math.max(r.start(0),_.start));var o=u.isTrackTypePresent(i.default.VIDEO),s=u.isTrackTypePresent(i.default.AUDIO);t=Y(!1),s&&o?isNaN(g[_.id].audio)||isNaN(g[_.id].video)||(g[_.id].audio<g[_.id].video?(n=g[_.id].video>t?g[_.id].video:t,r=y[_.id].audio):(n=g[_.id].audio>t?g[_.id].audio:t,r=y[_.id].video),fe(n,r)&&(fe(j(),y[_.id].audio)&&fe(j(),y[_.id].video)||S||0===n||B(n,!0,!0),g[_.id].started=!0)):g[_.id][a]&&(n=g[_.id][a]>t?g[_.id][a]:t,S||B(n,!1,!0),g[_.id].started=!0)}}function ge(e){if(!1===e.stream&&I.get().streaming.lowLatencyEnabled&&!isNaN(e.request.duration)){var t=1.2*e.request.duration;if(t>b.getLiveDelay()){s.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",t.toFixed(2));var n={streaming:{liveDelay:t}};I.update(n)}}}function ve(e){e.streamInfo.id===_.id&&(I.get().streaming.lowLatencyEnabled?e.state!==r.default.BUFFER_EMPTY||F()||M||(M=!0,pe()):f.setStallState(e.mediaType,e.state===r.default.BUFFER_EMPTY))}function ye(e){t.trigger(o.default.PLAYBACK_STALLED,{e:e})}function _e(e){!function(e,t){if(e&&e.manifestInfo&&e.manifestInfo.serviceDescriptions){for(var n=void 0,r=0;r<e.manifestInfo.serviceDescriptions.length;r++){var a=e.manifestInfo.serviceDescriptions[r];if(a.schemeIdUri===i.default.SERVICE_DESCRIPTION_LL_SCHEME){n=a;break}}n&&t&&t.supplementalProperties&&"true"===t.supplementalProperties[i.default.SUPPLEMENTAL_PROPERTY_LL_SCHEME]&&(n.latency&&n.latency.target>0&&(s.debug("Apply LL properties coming from service description. Target Latency (ms):",n.latency.target),I.update({streaming:{lowLatencyEnabled:!0,liveDelay:n.latency.target/1e3,liveCatchUpMinDrift:n.latency.max>n.latency.target?(n.latency.max-n.latency.target)/1e3:void 0}})),n.playbackRate&&n.playbackRate.max>1&&(s.debug("Apply LL properties coming from service description. Max PlaybackRate:",n.playbackRate.max),I.update({streaming:{lowLatencyEnabled:!0,liveCatchUpPlaybackRate:n.playbackRate.max-1}})))}}(e.streamInfo,e.mediaInfo)}return n={initialize:function(e,n){_=e,f.addEventListener("canplay",J),f.addEventListener("play",$),f.addEventListener("waiting",ee),f.addEventListener("playing",te),f.addEventListener("pause",ne),f.addEventListener("error",ce),f.addEventListener("seeking",ie),f.addEventListener("seeked",re),f.addEventListener("timeupdate",ae),f.addEventListener("progress",oe),f.addEventListener("ratechange",se),f.addEventListener("loadedmetadata",le),f.addEventListener("stalled",ye),f.addEventListener("ended",ue),E=_.manifestInfo.isDynamic,x=!1,M=!1,p=_.start,S=n;var i="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",r=/safari/.test(i)&&!/chrome/.test(i);R=r?.25:.02,t.on(o.default.DATA_UPDATE_COMPLETED,Z,this),t.on(o.default.BYTES_APPENDED_END_FRAGMENT,me,this),t.on(o.default.LOADING_PROGRESS,ge,this),t.on(o.default.BUFFER_LEVEL_STATE_CHANGED,ve,this),t.on(o.default.PERIOD_SWITCH_STARTED,L,this),t.on(o.default.PLAYBACK_PROGRESS,he,this),t.on(o.default.PLAYBACK_TIME_UPDATED,he,this),t.on(o.default.PLAYBACK_ENDED,de,this),t.on(o.default.STREAM_INITIALIZING,_e,this),T&&(T=!1,P())},setConfig:function(e){e&&(e.streamController&&(u=e.streamController),e.dashMetrics&&(d=e.dashMetrics),e.mediaPlayerModel&&(b=e.mediaPlayerModel),e.adapter&&(c=e.adapter),e.videoModel&&(f=e.videoModel),e.timelineConverter&&(h=e.timelineConverter),e.uriFragmentModel&&(C=e.uriFragmentModel),e.settings&&(I=e.settings))},getStartTimeFromUriParameters:q,getStreamStartTime:Y,getTimeToStreamEnd:O,getTime:U,getNormalizedTime:j,getPlaybackRate:G,getPlayedRanges:function(){return _&&f?f.getPlayedRanges():null},getEnded:V,getIsDynamic:H,getStreamController:function(){return u},setLiveStartTime:function(e){p=e},getLiveStartTime:function(){return p},computeLiveDelay:function(e,t){var n,i=void 0,r=void 0,a=void 0,o=C.getURIFragmentData();o&&(a=parseInt(o.r,10));var s=c.getSuggestedPresentationDelay();if(i=I.get().streaming.useSuggestedPresentationDelay&&null!==s?s:I.get().streaming.lowLatencyEnabled?0:b.getLiveDelay()?b.getLiveDelay():a||(isNaN(e)?2*_.manifestInfo.minBufferTime:e*I.get().streaming.liveDelayFragmentCount),null!==(n=c.getAvailabilityStartTime())&&(A=n),t>0){var l=Math.max(t-10,t/2);r=Math.min(i,l)}else r=i;return v=r,r},getLiveDelay:function(){return v},getCurrentLiveLatency:z,play:P,isPaused:N,pause:k,isSeeking:F,seek:B,reset:W},s=(0,l.default)(e).getInstance().getLogger(n),W(),n}d.__dashjs_factory_name="PlaybackController",t.default=s.default.getSingletonFactory(d)},function(e,t,n){"use strict";
70Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(27);var a=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.BYTES_APPENDED="bytesAppended",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.DATA_UPDATE_STARTED="dataUpdateStarted",e.INITIALIZATION_LOADED="initializationLoaded",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_REQUESTED="initRequested",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.QUOTA_EXCEEDED="quotaExceeded",e.REPRESENTATION_UPDATE_STARTED="representationUpdateStarted",e.REPRESENTATION_UPDATE_COMPLETED="representationUpdateCompleted",e.SEGMENTS_LOADED="segmentsLoaded",e.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_COMPLETED="streamCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIMED_TEXT_REQUESTED="timedTextRequested",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=E(n(4)),r=E(n(10)),a=E(n(114)),o=E(n(180)),s=E(n(2)),l=E(n(5)),u=E(n(1)),d=n(48),c=E(n(3)),f=E(n(47)),h=E(n(15)),p=E(n(51)),m=E(n(181)),g=E(n(87)),v=E(n(187)),y=E(n(7)),_=E(n(8));function E(e){return e&&e.__esModule?e:{default:e}}function b(){var e=this.context,t=(0,s.default)(e).getInstance(),n=void 0,u=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0,S=void 0,x=void 0,M=void 0,R=void 0,C=void 0,I=void 0,L=void 0,O=void 0,D=void 0,P=void 0,N=void 0,k=void 0,F=void 0,B=void 0,U=void 0,j=void 0,G=void 0,V=void 0,H=void 0,z=void 0,W=void 0,q=void 0,Y=void 0,K=void 0,X=void 0,Q=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,ie=void 0,re=void 0,ae=void 0,oe=void 0,se=void 0;function le(){if(Ce(i.default.VIDEO)){var e=W.getPlaybackQuality();e&&S.addDroppedFrames(e)}}function ue(){if(!(!se.get().streaming.jumpGaps||0===_e()||q.isSeeking()||K||G||V||H)&&++te>=40){var e=q.getTime();ae===e?function(e){for(var n=_e(),i=se.get().streaming.smallGapLimit,r=void 0,a=0;a<n.length;a++){var o=n[a].getBuffer().getAllBufferRanges(),s=void 0;if(o&&!(o.length<=1)){for(var d=0;d<o.length;d++)if(e<o.start(d)){s=o.start(d);break}if(s>0){var c=s-e;c>0&&c<=i&&(void 0===r||s>r)&&(r=s)}}}var f=q.getTimeToStreamEnd();void 0===r&&!isNaN(f)&&f<i&&(r=e+f);r>0&&(!isNaN(f)&&r>=e+f?(u.info("Jumping media gap (discontinuity) at time ",e,". Jumping to end of the stream"),t.trigger(l.default.PLAYBACK_ENDED,{isLast:Pe().isLast})):(u.info("Jumping media gap (discontinuity) at time ",e,". Jumping to time position",r),q.seek(r,!0,!0)))}(e):ae=e,te=0}}function de(e){var t=ye(e.seekTime);$&&(he(),J=!1),ee&&(u.debug("[PreloadTimer] stop period preload timer."),clearTimeout(ee),ee=void 0),t===F&&re&&re.deactivate(!0),t&&(t!==F||re&&!F.isActive())?(Le(d.PlayListTrace.END_OF_PERIOD_STOP_REASON),Te(F,t,e.seekTime)):Le(d.PlayListTrace.USER_REQUEST_STOP_REASON),Oe(d.PlayList.SEEK_START_REASON)}function ce(){u.debug("[onPlaybackStarted]"),X?(X=!1,Oe(d.PlayList.INITIAL_PLAYOUT_START_REASON)):K&&(K=!1,Oe(d.PlayList.RESUME_FROM_PAUSE_START_REASON),pe())}function fe(e){u.debug("[onPlaybackPaused]"),e.ended||(K=!0,Le(d.PlayListTrace.USER_REQUEST_STOP_REASON),pe())}function he(){u.debug("[toggleEndPeriodTimer] stop end period timer."),clearTimeout($),$=void 0}function pe(){if(J)if($)he();else{var e=q.getTimeToStreamEnd(),n=e>0?1e3*e:0,i=n<2e3?n/4:n-2e3;u.debug("[toggleEndPeriodTimer] Going to fire preload in",i,"milliseconds"),ee=setTimeout(ve,i),u.debug("[toggleEndPeriodTimer] start-up of timer to notify PLAYBACK_ENDED event. It will be triggered in",n,"milliseconds"),$=setTimeout(function(){t.trigger(l.default.PLAYBACK_ENDED,{isLast:Pe().isLast})},n)}}function me(e){if(e.sender&&(e.sender.getType()===i.default.AUDIO||e.sender.getType()===i.default.VIDEO)){var t=Pe().isLast;z&&!t&&void 0===$&&(u.info("[onTrackBufferingCompleted] end of period detected. Track",e.sender.getType(),"has finished"),J=!0,!1===K&&pe())}}function ge(){var e=Pe().isLast;z&&e&&(u.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),x.signalEndOfStream(z))}function ve(){var e=Pe().isLast;if(z&&!e){var t=be();(ie=F.isProtectionCompatible(t)&&(oe||F.isMediaCodecCompatible(t)))&&(u.info("[onStreamCanLoadNext] Preloading next stream"),F.stopEventController(),F.deactivate(!0),t.preload(z,ne),re=t,t.getProcessors().forEac
70h(function(e){e.setIndexHandlerTime(t.getStartTime())}))}}function ye(e){var t=0,n=null,i=k.length;i>0&&(t+=k[0].getStartTime());for(var r=0;r<i;r++)if(n=k[r],e<(t=parseFloat((t+n.getDuration()).toFixed(5))))return n;return null}function _e(){return F?F.getProcessors():[]}function Ee(){var e=be();e?(Z=void 0,Q=void 0,Te(F,e,NaN)):u.debug("StreamController no next stream found"),Le(e?d.PlayListTrace.END_OF_PERIOD_STOP_REASON:d.PlayListTrace.END_OF_CONTENT_STOP_REASON),$=void 0,J=!1}function be(){if(F){var e=Pe().start,t=Pe().duration;return k.filter(function(n){return n.getStreamInfo().start===parseFloat((e+t).toFixed(5))})[0]}}function Te(e,n,i){G||!n||e===n&&n.isActive()||(G=!0,t.trigger(l.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:e?e.getStreamInfo():null,toStreamInfo:n.getStreamInfo()}),ie=!1,e&&(e.stopEventController(),ie=F.isProtectionCompatible(n)&&(oe||F.isMediaCodecCompatible(n))&&!i||n.getPreloaded(),e.deactivate(ie)),F=n,re=!1,q.initialize(Pe(),ie),W.getElement()?we(i,e,!1,ie):function(e){Ae(e,ie)}(i))}function we(e,n,i,r){var a=void 0;function o(){z&&"open"==z.readyState&&(u.debug("MediaSource is open!"),window.URL.revokeObjectURL(a),z.removeEventListener("sourceopen",o),z.removeEventListener("webkitsourceopen",o),Se(),n||t.trigger(l.default.SOURCE_INITIALIZED),i?F.setMediaSource(z):Ae(e,r))}z?r?(Ae(e,r),n||t.trigger(l.default.SOURCE_INITIALIZED)):(x.detachMediaSource(W),z.addEventListener("sourceopen",o,!1),z.addEventListener("webkitsourceopen",o,!1),a=x.attachMediaSource(z,W),u.debug("MediaSource attached to element.  Waiting on open...")):((z=x.createMediaSource()).addEventListener("sourceopen",o,!1),z.addEventListener("webkitsourceopen",o,!1),a=x.attachMediaSource(z,W),u.debug("MediaSource attached to element.  Waiting on open..."))}function Ae(e,n){if(ne=F.activate(z,n?ne:void 0),Z=Ie(i.default.AUDIO),Q=Ie(i.default.VIDEO),ne){var r=Object.keys(ne);r.length>0&&ne[r[0]].changeType&&(u.debug("SourceBuffer changeType method supported. Use it to switch codecs in periods transitions"),oe=!0)}if(!X)if(isNaN(e)){var a=q.getStreamStartTime(!0);n||_e().forEach(function(e){e.setIndexHandlerTime(a)})}else q.seek(e);F.startEventController(),!j&&X||q.play(),G=!1,t.trigger(l.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Pe()})}function Se(e){var t=e||Pe().manifestInfo.duration,n=x.setDuration(z,t);u.debug("Duration successfully set to: "+n)}function xe(e){for(var t=0,n=k.length;t<n;t++)if(k[t].getId()===e.id)return k[t];return null}function Me(){var i=w.getValue();B&&(t.trigger(l.default.PROTECTION_CREATED,{controller:B,manifest:i}),B.setMediaElement(W.getElement()),U&&B.setProtectionData(U)),function(){try{var i=A.getStreamsInfo();if(0===i.length)throw new Error("There are no streams");S.updateManifestUpdateInfo({currentTime:q.getTime(),buffered:W.getBufferRange(),presentationStartTime:i[0].start,clientTimeOffset:N.getClientTimeOffset()});for(var r=0,o=i.length;r<o;r++){var s=i[r],u=xe(s);u?u.updateData(s):(u=(0,a.default)(e).create({manifestModel:w,mediaPlayerModel:Y,dashMetrics:S,manifestUpdater:b,adapter:A,timelineConverter:N,capabilities:E,errHandler:P,baseURLController:R,abrController:C,playbackController:q,mediaController:I,textController:L,videoModel:W,streamController:n,settings:se}),k.push(u),u.initialize(s,B)),S.addManifestUpdateStreamInfo(s)}if(!F){var d=q.getStartTimeFromUriParameters(),c=null;d&&(c=ye(isNaN(d.fragS)?d.fragT:d.fragS)),Te(null,null!==c?c:k[0],NaN)}t.trigger(l.default.STREAMS_COMPOSED)}catch(e){P.error(new y.default(_.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+"nostreamscomposed",w.getValue())),H=!0,Be()}}()}function Re(e){if(e.error)H=!0,Be();else{var t=e.manifest;A.updatePeriods(t);var n=A.getStreamsInfo(void 0,1)[0],r=A.getMediaInfoForType(n,i.default.VIDEO)||A.getMediaInfoForType(n,i.default.AUDIO),a=void 0;if(r&&(a=A.getUseCalculatedLiveEdgeTimeForMediaInfo(r))){u.debug("SegmentTimeline detected using calculated Live Edge Time");se.update({streaming:{useManifestDateHeaderTimeSource:!1}})}var o=A.getUTCTimingSources(),s=!A.getIsDynamic()||a?o:o.concat(Y.getUTCTimingSources()),l=D.isHTTPS(e.manifest.url);
vendor: 14,732 bytes, line 70
70s.forEach(function(e){e.value.replace(/.*?:\/\//g,"")===Y.getDefaultUtcTimingSource().value.replace(/.*?:\/\//g,"")&&(e.value=e.value.replace(l?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),l?"https://":"http://"),u.debug("Matching default timing source protocol to manifest protocol: ",e.value))}),R.initialize(t),M.setConfig({dashMetrics:S,baseURLController:R}),M.initialize(s,se.get().streaming.useManifestDateHeaderTimeSource)}}function Ce(e){var t=void 0;if(!e)return t;switch(e){case i.default.VIDEO:t=Q;break;case i.default.AUDIO:t=Z}return t}function Ie(e){var t=!1;return _e().forEach(function(n){n.getMediaInfo().type===e&&(t=!0)}),t}function Le(e,t){t=t||new Date,_e().forEach(function(n){var i=n.getScheduleController();i&&i.finalisePlayList(t,e)}),S.addPlayList()}function Oe(e){S.createPlaylistMetrics(1e3*q.getTime(),e)}function De(e){if(e.error){var t="";switch(e.error.code){case 1:t="MEDIA_ERR_ABORTED";break;case 2:t="MEDIA_ERR_NETWORK";break;case 3:t="MEDIA_ERR_DECODE";break;case 4:t="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:t="MEDIA_ERR_ENCRYPTED";break;default:t="UNKNOWN"}V=!0,e.error.message&&(t+=" ("+e.error.message+")"),e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),u.fatal("Video Element Error: "+t),e.error&&u.fatal(e.error),P.error(new y.default(e.error.code,t)),Be()}}function Pe(){return F?F.getStreamInfo():null}function Ne(){if(!(T&&T.hasOwnProperty("load")&&N&&N.hasOwnProperty("initialize")&&N.hasOwnProperty("reset")&&N.hasOwnProperty("getClientTimeOffset")&&w&&P&&S&&q))throw new Error(i.default.MISSING_CONFIG_ERROR)}function ke(e){isNaN(e.newDuration)||Se(e.newDuration)}function Fe(){k=[],B=null,G=!1,F=null,V=!1,H=!1,Q=void 0,Z=void 0,X=!0,K=!1,j=!0,$=void 0,J=!1,te=0}function Be(){Ne(),M.reset(),Le(V||H?d.PlayListTrace.FAILURE_STOP_REASON:d.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,n=k?k.length:0;e<n;e++){k[e].reset(V)}!function(){t.off(l.default.PLAYBACK_TIME_UPDATED,le,this),t.off(l.default.PLAYBACK_SEEKING,de,this),t.off(l.default.PLAYBACK_ERROR,De,this),t.off(l.default.PLAYBACK_STARTED,ce,this),t.off(l.default.PLAYBACK_PAUSED,fe,this),t.off(l.default.PLAYBACK_ENDED,Ee,this),t.off(l.default.MANIFEST_UPDATED,Re,this),t.off(l.default.BUFFERING_COMPLETED,me,this),t.off(l.default.STREAM_BUFFERING_COMPLETED,ge,this),t.off(l.default.MANIFEST_VALIDITY_CHANGED,ke,this),t.off(l.default.TIME_SYNCHRONIZATION_COMPLETED,Me,this),t.off(l.default.WALLCLOCK_TIME_UPDATED,ue,this),t.off(p.default.METRIC_ADDED,Ue,this)}(),R.reset(),b.reset(),S.clearAllCurrentMetrics(),w.setValue(null),T.reset(),N.reset(),O.reset(),z&&(x.detachMediaSource(W),z=null),W=null,B&&(B.setMediaElement(null),B=null,U=null,w.getValue()&&t.trigger(l.default.PROTECTION_DESTROYED,{data:w.getValue().url})),t.trigger(l.default.STREAM_TEARDOWN_COMPLETE),Fe()}function Ue(e){e.metric===r.default.DVR_INFO&&e.mediaType===i.default.AUDIO&&x.setSeekable(z,e.value.range.start,e.value.range.end)}return n={initialize:function(n,i){Ne(),j=n,U=i,N.initialize(),(b=(0,o.default)(e).create()).setConfig({manifestModel:w,adapter:A,manifestLoader:T,errHandler:P,settings:se}),b.initialize(),R.setConfig({adapter:A}),function(){t.on(l.default.PLAYBACK_TIME_UPDATED,le,this),t.on(l.default.PLAYBACK_SEEKING,de,this),t.on(l.default.PLAYBACK_ERROR,De,this),t.on(l.default.PLAYBACK_STARTED,ce,this),t.on(l.default.PLAYBACK_PAUSED,fe,this),t.on(l.default.PLAYBACK_ENDED,Ee,this),t.on(l.default.MANIFEST_UPDATED,Re,this),t.on(l.default.BUFFERING_COMPLETED,me,this),t.on(l.default.STREAM_BUFFERING_COMPLETED,ge,this),t.on(l.default.MANIFEST_VALIDITY_CHANGED,ke,this),t.on(l.default.TIME_SYNCHRONIZATION_COMPLETED,Me,this),t.on(l.default.WALLCLOCK_TIME_UPDATED,ue,this),t.on(p.default.METRIC_ADDED,Ue,this)}()},getActiveStreamInfo:Pe,isTrackTypePresent:Ce,switchToVideoElement:function(e){F&&(q.initialize(Pe()),we(e,null,!0,!1))},getStreamById:function(e){return k.filter(function(t){return t.getId()===e})[0]},getStreamForTime:ye,getTimeRelativeToStreamId:function(e,t){for(var n=null,i=0,r=0,a=null,o=0;o<k.length;o++){if(r=(n=k[o]).getStartTime(),a=n.getDuration(),Number.isFinite(r)&&(i=r),n.getId()===t)return e-i;Number.isFinite(a)&&(i+=a)}return null},load:function(e){Ne(),T.load(e)},loadWithManifest:function(e){!function(){if(!b||!b.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}(),b.setManifest(e)},getActiveStreamProcessors:_e,setConfig:function(e){e&&(e.capabilities&&(E=e.capabilities),e.manifestLoader&&(T=e.manifestLoader),e.manifestModel&&(w=e.manifestModel),e.mediaPlayerModel&&(Y=e.mediaPlayerModel),e.protectionController&&(B=e.protectionController),e.adapter&&(A=e.adapter),e.dashMetrics&&(S=e.dashMetrics),e.errHandler&&(P=e.errHandler),e.timelineConverter&&(N=e.timelineConverter),e.videoModel&&(W=e.videoModel),e.playbackController&&(q=e.playbackController),e.abrController&&(C=e.abrController),e.mediaController&&(I=e.mediaController),e.textController&&(L=e.textController),e.settings&&(se=e.settings))},setProtectionData:function(e){U=e},reset:Be},u=(0,c.default)(e).getInstance().getLogger(n),M=(0,m.default)(e).getInstance(),R=(0,g.default)(e).getInstance(),x=(0,v.default)(e).getInstance(),O=(0,f.default)(e).getInstance(),D=(0,h.default)(e).getInstance(),Fe(),n}b.__dashjs_factory_name="StreamController",t.default=u.default.getSingletonFactory(b)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=p(n(4)),r=p(n(115)),a=p(n(173)),o=p(n(174)),s=p(n(178)),l=p(n(2)),u=p(n(5)),d=p(n(3)),c=p(n(8)),f=p(n(1)),h=p(n(7));function p(e){return e&&e.__esModule?e:{default:e}}function m(e){e=e||{};var t=this.context,n=(0,l.default)(t).getInstance(),f=e.manifestModel,p=e.mediaPlayerModel,m=e.manifestUpdater,g=e.adapter,v=e.capabilities,y=e.errHandler,_=e.timelineConverter,E=e.dashMetrics,b=e.abrController,T=e.playbackController,w=e.mediaController,A=e.textController,S=e.videoModel,x=e.settings,M=void 0,R=void 0,C=void 0,I=void 0,L=void 0,O=void 0,D=void 0,P=void 0,N=void 0,k=void 0,F=void 0,B=void 0,U=void 0,j=void 0,G=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function V(e){for(var t=C?C.length:0,i=0;i<t;i++){C[i].getFragmentModel().removeExecutedRequestsBeforeTime(q()+W()),C[i].reset(false,e)}C=[],I=!1,L=!1,ce(!1),n.off(u.default.CURRENT_TRACK_CHANGED,J,M)}function H(){V(),O=null,D={},P=!1}function z(){X(),T&&T.pause(),k&&(k.reset(),k=null),H(),n.off(u.default.DATA_UPDATE_COMPLETED,oe,M),n.off(u.default.BUFFERING_COMPLETED,ae,M),N&&(n.off(u.default.KEY_ERROR,Q,M),n.off(u.default.SERVER_CERTIFICATE_UPDATED,Q,M),n.off(u.default.LICENSE_REQUEST_COMPLETE,Q,M),n.off(u.default.KEY_SYSTEM_SELECTED,Q,M),n.off(u.default.KEY_SESSION_CREATED,Q,M),n.off(u.default.KEY_STATUSES_CHANGED,Q,M)),ce(!1)}function W(){return O?O.duration:NaN}function q(){return O?O.start:NaN}function Y(){return O}function K(){if(!(S&&b&&b.hasOwnProperty("getBitrateList")&&g&&g.hasOwnProperty("getAllMediaInfoForType")&&g.hasOwnProperty("getEventsFor")))throw new Error(i.default.MISSING_CONFIG_ERROR)}function X(){B&&B.stop()}function Q(e){e.error&&(y.error(e.error),R.fatal(e.error.message),z())}function Z(e){var t,n=e?e.type:null,r=void 0;if(n===i.default.MUXED)return r="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",R.fatal(r),y.error(new h.default(c.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,r,f.getValue())),!1;if(n===i.default.TEXT||n===i.default.FRAGMENTED_TEXT||n===i.default.EMBEDDED_TEXT||n===i.default.IMAGE)return!0;if(t=e.codec,R.debug(n+" codec: "+t),e.contentProtection&&!v.supportsEncryptedMedia())y.error(new h.default(c.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,c.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));else if(!v.supportsCodec(t))return r=n+"Codec ("+t+") is not supported.",R.error(r),!1;return!0}function J(e){if(O&&e.newMediaInfo.streamInfo.id===O.id){var t=e.newMediaInfo,n=f.getValue();g.setCurrentMediaInfo(O.id,t.type,t);var r=se(t);if(r){var a=T.getTime();R.info("Stream -  Process track changed at current time "+a),R.debug("Stream -  Update stream controller"),n.refreshManifestOnSwitchTrack?(R.debug("Stream -  Refreshing manifest for switch track"),j=e,m.refreshManifest()):(r.selectMediaInfo(t),t.type!==i.default.FRAGMENTED_TEXT?(b.updateTopQualityIndex(t),r.switchTrackAsked(),r.getFragmentModel().abortRequests()):(r.getScheduleController().setSeekTarget(a),r.setIndexHandlerTime(a),r.resetIndexHandler()))}}}function $(a,o){var l=g.getAllMediaInfoForType(O,a),d=null,c=void 0;if(l&&0!==l.length){for(var h=0,m=l.length;h<m;h++)if(d=l[h],a===i.default.EMBEDDED_TEXT)A.addEmbeddedTrack(d);else{if(!Z(d))continue;w.addTrack(d)}a!==i.default.EMBEDDED_TEXT&&0!==w.getTracksFor(a,O).length&&(a!==i.default.IMAGE?((a!==i.default.FRAGMENTED_TEXT||a===i.default.FRAGMENTED_TEXT&&A.getTextDefaultEnabled())&&(w.checkInitialMediaSettingsForType(a,O),c=w.getCurrentTrackFor(a,O)),a!==i.default.FRAGMENTED_TEXT||A.getTextDefaultEnabled()||(c=w.getTracksFor(a,O)[0]),n.trigger(u.default.STREAM_INITIALIZING,{streamInfo:O,mediaInfo:d}),function(n,a,o,s){var l=(0,r.default)(t).create({type:n?n.type:null,mimeType:n?n.mimeType:null,timelineConverter:_,adapter:g,manifestModel:f,mediaPlayerModel:p,dashMetrics:e.dashMetrics,baseURLController:e.baseURLController,stream:M,abrController:b,playbackController:T,mediaController:w,streamController:e.streamController,textController:A,errHandler:y,settings:x});if(l.initialize(o),b.updateTopQualityIndex(n),s?(l.setBuffer(s.buffer),l.setIndexHandlerTime(s.currentTime),C[s.replaceIdx]=l):C.push(l),!s||!s.ignoreMediaInfo)if(!n||n.type!==i.default.TEXT&&n.type!==i.default.FRAGMENTED_TEXT)l.addMediaInfo(n,!0);else{for(var u=void 0,d=0;d<a.length;d++)a[d].index===n.index&&(u=d),l.addMediaInfo(a[d]);l.selectMediaInfo(a[u])}}(c,l,o)):F=(0,s.default)(t).create({adapter:g,baseURLController:e.baseURLController,stream:M,timelineConverter:e.timelineConverter}))}else R.info("No "+a+" data.")}function ee(){B||((B=(0,a.default)(t).create()).setConfig({manifestUpdater:m,playbackController:T}),te())}function te(){var e=g.getEventsFor(O);B.addInlineEvents(e)}function ne(e){var t=g.getAdaptationForType(O?O.index:null,e,O);t&&Array.isArray(t.Representation_asArray)&&(t.Representation_asArray=t.Representation_asArray.filter(function(e,n){if(0===n)return!0;var i=g.getCodec(t,n,!0);return!!v.supportsCodec(i)||(R.error("[Stream] codec not supported: "+i),!1)}))}function ie(){for(var e=C.length,t=!!D.audio||!!D.video?new h.default(c.default.DATA_UPDATE_FAILED_ERROR_CODE,c.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,r=0;r<e;r++)if(C[r].isUpdating()||P)return;if(L){if(N)for(var a=0;a<e&&C[a];a++)C[a].getType()!==i.default.AUDIO&&C[a].getType()!==i.default.VIDEO&&C[a].getType()!==i.default.FRAGMENTED_TEXT||N.initializeForMedia(C[a].getMediaInfo());t?y.error(t):n.trigger(u.default.STREAM_INITIALIZED,{streamInfo:O})}}function re(e){for(var t={},n=0,i=C.length;n<i;n++){var r=C[n].createBuffer(e);r&&(t[C[n].getType()]=r.getBuffer())}return t}function ae(e){if(e.streamInfo===O){var t=le(),r=t.length;if(0!==r){for(var a=0;a<r;a++)if(!t[a].isBufferingCompleted()&&(t[a].getType()===i.default.AUDIO||t[a].getType()===i.default.VIDEO))return void R.warn("onBufferingCompleted - One streamProcessor has finished but",t[a].getType(),"one is not buffering completed");R.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),n.trigger(u.default.STREAM_BUFFERING_COMPLETED,{streamInfo:O})}else R.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}}function oe(e){O&&e.sender.getStreamId()===O.id&&(D[e.sender.getType()]=e.error,ie())}function se(e){return e?le().filter(function(t){return t.getType()===e.type})[0]:null}function le(){for(var e=[],t=void 0,n=void 0,r=0;r<C.length;r++)(t=(n=C[r]).getType())!==i.default.AUDIO&&t!==i.default.VIDEO&&t!==i.default.FRAGMENTED_TEXT&&t!==i.default.TEXT||e.push(n);return e}function ue(e,t){if(!e)return!1;var n=e.getStreamInfo(),i=Y();if(!n||!i)return!1;var r=g.getAdaptationForType(n.index,t,n),a=g.getAdaptationForType(i.index,t,i);return r&&a?!r.ContentProtection&&!a.ContentProtection:!r&&!a}function de(e,t){if(!e||!e.hasOwnProperty("getStreamInfo"))return!1;var n=e.getStreamInfo(),i=Y();if(!n||!i)return!1;var r=g.getAdaptationForType(n.index,t,n),a=g.getAdaptationForType(i.index,t,i);if(!r||!a)return!r&&!a;var o=r&&a&&r.mimeType===a.mimeType,s=a.Representation_asArray.map(function(e){return e.codecs}),l=r.Representation_asArray.map(function(e){return e.codecs}),u=l.some(function(e){return s.indexOf(e)>-1}),d=l.some(function(e){return s.some(function(t){return function(e,t){for(var n=e.split(".")[0],i=0===t.indexOf(n),r=void 0,a=0;a<G.length;a++)if(G[a].codec===n){r=G[a];break}if(r)return i||r.compatibleCodecs.some(function(e){return 0===t.indexOf(e)});return i}(t,e)})});return u||d&&o}function ce(e){U=e}function fe(){return U}return M={initialize:function(e,t){O=e,(N=t)&&(n.on(u.default.KEY_ERROR,Q,M),n.on(u.default.SERVER_CERTIFICATE_UPDATED,Q,M),n.on(u.default.LICENSE_REQUEST_COMPLETE,Q,M),n.on(u.default.KEY_SYSTEM_SELECTED,Q,M),n.on(u.default.KEY_SESSION_CREATED,Q,M),n.on(u.default.KEY_STATUSES_CHANGED,Q,M))},activate:function(e,t){if(!I){var r=void 0;return n.on(u.default.CURRENT_TRACK_CHANGED,J,M),fe()?(!function(){if(P=!0,K(),ne(i.default.VIDEO),ne(i.default.AUDIO),L=!0,P=!1,0===C.length){var e="No streams to play.";y.error(new h.default(c.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e,f.getValue())),R.debug(e)}else ie()}(),r=t):r=function(e,t){K();var n=S.getElement();ee(),P=!0,ne(i.default.VIDEO),ne(i.default.AUDIO),(!n||n&&/^VIDEO$/i.test(n.nodeName))&&$(i.default.VIDEO,e);$(i.default.AUDIO,e),$(i.default.TEXT,e),$(i.default.FRAGMENTED_TEXT,e),$(i.default.EMBEDDED_TEXT,e),$(i.default.MUXED,e),$(i.default.IMAGE,e);var r=re(t);if(L=!0,P=!1,0===C.length){var a="No streams to play.";y.error(new h.default(c.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,a,f.getValue())),R.fatal(a)}else ie();return r}(e,t),I=!0,r}return t},deactivate:V,isActive:function(){return I},getDuration:W,getStartTime:q,getId:function(){return O?O.id:null},getStreamInfo:Y,preload:function(e,t){ee(),$(i.default.VIDEO,e),$(i.default.AUDIO,e),$(i.default.TEXT,e),$(i.default.FRAGMENTED_TEXT,e),$(i.default.EMBEDDED_TEXT,e),$(i.default.MUXED,e),$(i.default.IMAGE,e),re(t),n.on(u.default.CURRENT_TRACK_CHANGED,J,M);for(var r=0;r<C.length&&C[r];r++)C[r].getScheduleController().start();ce(!0)},getFragmentController:function(){return k},getThumbnailController:function(){return F},getBitrateListFor:function(e){if(K(),e===i.default.IMAGE)return F?F.getBitrateList(
70):[];var t=function(e){for(var t=null,n=0;n<C.length;n++)if((t=C[n]).getType()===e)return t.getMediaInfo();return null}(e);return b.getBitrateList(t)},startEventController:function(){B&&B.start()},stopEventController:X,updateData:function(e){R.info("Manifest updated... updating data system wide."),I=!1,P=!0,O=e,B&&te(),ne(i.default.VIDEO),ne(i.default.AUDIO);for(var t=0,n=C.length;t<n;t++){var r=C[t],a=g.getMediaInfoForType(O,r.getType());b.updateTopQualityIndex(a),r.addMediaInfo(a,!0)}if(j&&j.newMediaInfo.type!==i.default.FRAGMENTED_TEXT){var o=se(j.oldMediaInfo);if(!o)return;o.switchTrackAsked(),j=void 0}P=!1,ie()},reset:z,getProcessors:le,setMediaSource:function(e){for(var t=0;t<C.length;)Z(C[t].getMediaInfo())?(C[t].setMediaSource(e),t++):(C[t].reset(),C.splice(t,1));for(var n=0;n<C.length;n++)C[n].dischargePreBuffer();if(0===C.length){var i="No streams to play.";y.error(new h.default(c.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,i+"nostreams",f.getValue())),R.fatal(i)}},isMediaCodecCompatible:function(e){return de(e,i.default.VIDEO)&&de(e,i.default.AUDIO)},isProtectionCompatible:function(e){return ue(e,i.default.VIDEO)&&ue(e,i.default.AUDIO)},getPreloaded:fe,addInbandEvents:function(e){B&&B.addInbandEvents(e)}},R=(0,d.default)(t).getInstance().getLogger(M),H(),k=(0,o.default)(t).create({mediaPlayerModel:p,dashMetrics:E,errHandler:y,settings:x}),n.on(u.default.BUFFERING_COMPLETED,ae,M),n.on(u.default.DATA_UPDATE_COMPLETED,oe,M),M}m.__dashjs_factory_name="Stream",t.default=f.default.getClassFactory(m)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=p(n(4)),r=p(n(65)),a=p(n(151)),o=p(n(153)),s=p(n(157)),l=p(n(1)),u=n(14),d=p(n(2)),c=p(n(5)),f=p(n(78)),h=p(n(8));function p(e){return e&&e.__esModule?e:{default:e}}function m(e){e=e||{};var t=this.context,n=(0,d.default)(t).getInstance(),l=e.type,p=e.errHandler,m=e.mimeType,g=e.timelineConverter,v=e.adapter,y=e.manifestModel,_=e.mediaPlayerModel,E=e.stream,b=e.abrController,T=e.playbackController,w=e.streamController,A=e.mediaController,S=e.textController,x=e.dashMetrics,M=e.settings,R=void 0,C=void 0,I=void 0,L=void 0,O=void 0,D=void 0,P=void 0,N=void 0,k=void 0;function F(){N=[]}function B(){I=[],C=null,F()}function U(e){e.sender.getType()===V()&&e.sender.getStreamId()===H().id&&e.error&&e.error.code===h.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE&&G()}function j(e){e.sender.getStreamProcessor()===R&&(y.getValue().doNotUpdateDVRWindowOnBufferUpdated||G())}function G(){var e=H(),t=e?e.manifestInfo:null,n=t?t.isDynamic:null,i=g.calcSegmentAvailabilityRange(D.getCurrentRepresentation(),n);x.addDVRInfo(V(),T.getTime(),t,i)}function V(){return l}function H(){return E?E.getStreamInfo():null}function z(){return C}return R={initialize:function(n){(k=(0,f.default)(t).create({type:l,mimeType:m,timelineConverter:g,dashMetrics:x,mediaPlayerModel:_,baseURLController:e.baseURLController,errHandler:p,settings:M,streamInfo:H()})).initialize(T.getIsDynamic()),b.registerStreamType(l,R),(P=E.getFragmentController().getModel(l)).setStreamProcessor(R),L=function(e){var n=null;n=e===i.default.VIDEO||e===i.default.AUDIO?(0,r.default)(t).create({type:e,dashMetrics:x,mediaPlayerModel:_,manifestModel:y,errHandler:p,streamController:w,mediaController:A,adapter:v,textController:S,abrController:b,playbackController:T,streamProcessor:R,settings:M}):(0,a.default)(t).create({type:e,mimeType:m,dashMetrics:x,mediaPlayerModel:_,manifestModel:y,errHandler:p,streamController:w,mediaController:A,adapter:v,textController:S,abrController:b,playbackController:T,streamProcessor:R,settings:M});return n}(l),O=(0,o.default)(t).create({type:l,mimeType:m,adapter:v,dashMetrics:x,timelineConverter:g,mediaPlayerModel:_,abrController:b,playbackController:T,streamController:w,textController:S,streamProcessor:R,mediaController:A,settings:M}),(D=(0,s.default)(t).create()).setConfig({abrController:b,dashMetrics:x,manifestModel:y,playbackController:T,timelineConverter:g,streamProcessor:R,type:l,streamId:H()?H().id:null}),L.initialize(n),O.initialize()},isUpdating:function(){return!!D&&D.isUpdating()},getType:V,getBufferController:function(){return L},getFragmentModel:function(){return P},getScheduleController:function(){return O},getRepresentationController:function(){return D},getRepresentationInfo:function(e){var t=void 0;return void 0!==e?((0,u.checkInteger)(e),t=D?D.getRepresentationForQuality(e):null):t=D?D.getCurrentRepresentation():null,v.convertDataToRepresentationInfo(t)},getBufferLevel:function(){return L?L.getBufferLevel():0},switchInitData:function(e,t){if(L){var n=H();L.switchInitData(n?n.id:null,e,t)}},isBufferingCompleted:function(){return!!L&&L.getIsBufferingCompleted()},createBuffer:function(e){return L.getBuffer()||L.createBuffer(C,e)},getStreamInfo:H,selectMediaInfo:function(e){e===C||e&&C&&e.type!==C.type||(C=e);var t=H(),n=v.getRealAdaptation(t,C),r=v.getVoRepresentations(C);if(D){var a=D.getData(),o=b.getTopQualityIndexFor(l,t?t.id:null),s=b.getMinAllowedIndexFor(l),u=void 0,d=null;null!==a&&a.id==n.id||l===i.default.FRAGMENTED_TEXT?u=b.getQualityFor(l):(d=b.getThroughputHistory().getAverageThroughput(l)||b.getInitialBitrateFor(l),u=b.getQualityForBitrate(C,d)),void 0!==s&&u<s&&(u=s),u>o&&(u=o),D.updateData(n,r,l,u)}},addMediaInfo:function(e,t){-1===I.indexOf(e)&&I.push(e),t&&this.selectMediaInfo(e)},switchTrackAsked:function(){O.switchTrackAsked()},getMediaInfoArr:function(){return I},getMediaInfo:z,getMediaSource:function(){return L.getMediaSource()},setMediaSource:function(e){L.setMediaSource(e,z())},dischargePreBuffer:function(){L.dischargePreBuffer()},getBuffer:function(){return L.getBuffer()},setBuffer:function(e){L.setBuffer(e)},registerExternalController:function(e){N.push(e)},unregisterExternalController:function(e){var t=N.indexOf(e);-1!==t&&N.splice(t,1)},getExternalControllers:function(){return N},unregisterAllExternalController:F,addInbandEvents:function(e){E&&E.addInbandEvents(e)},setIndexHandlerTime:function(e){k&&k.setCurrentTime(e)},getIndexHandlerTime:function(){return k?k.getCurrentTime():NaN},resetIndexHandler:function(){k&&k.resetIndex()},getInitRequest:function(e){(0,u.checkInteger)(e);var t=D?D.getRepresentationForQuality(e):null;return k?k.getInitRequest(z(),t):null},getFragmentRequest:function(e,t,n){var i=null;if(k){var r=D&&e?D.getRepresentationForQuality(e.quality):null;i=void 0!==t&&void 0!==n?k.getSegmentRequestForTime(z(),r,t,n):k.getNextSegmentRequest(z(),r)}return i},reset:function(e,t){k.reset(),L&&(L.reset(e,t),L=null),O&&(O.reset(),O=null),D&&(D.reset(),D=null),b&&b.unRegisterStreamType(l),N.forEac
vendor: 12,122 bytes, line 70
70h(function(e){e.reset()}),n.off(c.default.BUFFER_LEVEL_UPDATED,j,R),n.off(c.default.DATA_UPDATE_COMPLETED,U,R),B(),l=null,E=null}},B(),n.on(c.default.BUFFER_LEVEL_UPDATED,j,R),n.on(c.default.DATA_UPDATE_COMPLETED,U,R),R}m.__dashjs_factory_name="StreamProcessor",t.default=l.default.getClassFactory(m)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=y(n(4)),r=n(9),a=y(n(117)),o=y(n(23)),s=y(n(67)),l=y(n(1)),u=y(n(3)),d=y(n(39)),c=y(n(137)),f=y(n(38)),h=y(n(64)),p=y(n(2)),m=y(n(5)),g=y(n(7)),v=y(n(8));function y(e){return e&&e.__esModule?e:{default:e}}function _(){var e=this.context,t=(0,p.default)(e).getInstance(),n=!1,l=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0,w=void 0,A=void 0,S=void 0,x=void 0,M=void 0,R=void 0,C=void 0,I=void 0,L=void 0,O=void 0,D=void 0,P=void 0,N=void 0,k=void 0,F=void 0,B=void 0,U=void 0,j=void 0,G=void 0,V=void 0;function H(){C=null,L=NaN,O=[],N=null,I=!1}function z(){H(),M=[],A=null}function W(e){var t=e.chunk;t.mediaInfo.embeddedCaptions&&X(t.bytes,t)}function q(){F=[],(R=(0,d.default)(e).getInstance()).setConfig({videoModel:D}),R.initialize(),_=(0,o.default)(e).getInstance(),k=null,B=0,j=[],U=null,n=!0,G=(0,c.default)(e).getInstance();var i=P.getActiveStreamProcessors();for(var r in i)if("video"===i[r].getType()){V=i[r].getRepresentationInfo().MSETimeOffset;break}t.on(m.default.VIDEO_CHUNK_RECEIVED,W,this),t.on(m.default.BUFFER_CLEARED,Z,this)}function Y(e){k=e}function K(e,t){var n,r,o=new a.default,s={subtitle:"subtitles",caption:"captions"};o.captionData=e,o.lang=t.lang,o.labels=t.labels,o.id=t.id?t.id:t.index,o.index=t.index,o.isTTML=(n=!1,t.codec&&t.codec.search(i.default.STPP)>=0&&(n=!0),t.mimeType&&t.mimeType.search(i.default.TTML)>=0&&(n=!0),n),o.defaultTrack=function(e){var t=!1;F.length>1&&e.isEmbedded?t=e.id&&e.id===i.default.CC1:1===F.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===F.length&&(t=e.index===M[0].index);return t}(t),o.isFragmented=!b.getIsTextTrack(t.mimeType),o.isEmbedded=!!t.isEmbedded,o.kind=r=(r=t.roles.length>0?s[t.roles[0]]:s.caption)===s.caption||r===s.subtitle?r:s.caption,o.roles=t.roles,o.accessibility=t.accessibility;var l=(M?M.length:0)+F.length;R.addTextTrack(o,l)}function X(e,t){var n=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,c=t.mediaInfo,p=c.type,m=c.mimeType,b=c.codec||m;if(b){if(p===i.default.FRAGMENTED_TEXT)if(I||"InitializationSegment"!==t.segmentType){if(!I)return;if(a=(u=_.getSamplesInfo(e)).sampleList,null===N&&a.length>0&&(N=a[0].cts-t.start*L),b.search(i.default.STPP)>=0)for(A=null!==A?A:Q(b),o=0;o<a.length;o++){var w=a[o],S=w.cts,x=S-N;this.buffered.add(x/L,(x+w.duration)/L);var M=new DataView(e,w.offset,w.subSizes[0]);d=f.default.Utils.dataViewToString(M,i.default.UTF8);var O=[],P=w.offset+w.subSizes[0];for(s=1;s<w.subSizes.length;s++){var H=new Uint8Array(e,P,w.subSizes[s]),z=String.fromCharCode.apply(null,H);O.push(z),P+=w.subSizes[s]}try{var W=T.getValue().ttmlTimeIsRelative?S/L:0;n=A.parse(d,W,S/L,(S+w.duration)/L,O),R.addCaptions(k,N/L,n)}catch(e){C.removeExecutedRequestsBeforeTime(),this.remove(),y.error("TTML parser error: "+e.message)}}else{var q=[];for(o=0;o<a.length;o++){var Y=a[o];Y.cts-=N,this.buffered.add(Y.cts/L,(Y.cts+Y.duration)/L);var X=e.slice(Y.offset,Y.offset+Y.size),Z=f.default.parseBuffer(X);for(s=0;s<Z.boxes.length;s++){var J=Z.boxes[s];if(y.debug("VTT box1: "+J.type),"vtte"!==J.type&&"vttc"===J.type)for(y.debug("VTT vttc boxes.length = "+J.boxes.length),l=0;l<J.boxes.length;l++){var $=J.boxes[l];if(y.debug("VTT box2: "+$.type),"payl"===$.type){var ee=$.cue_text;y.debug("VTT cue_text = "+ee);var te=Y.cts/L,ne=(Y.cts+Y.duration)/L;q.push({start:te,end:ne,data:ee,styles:{}}),y.debug("VTT "+te+"-"+ne+" : "+ee)}}}}q.length>0&&R.addCaptions(k,0,q)}}else I=!0,L=_.getMediaTimescaleFromMoov(e);else if(p===i.default.TEXT){var ie=new DataView(e,0,e.byteLength);d=f.default.Utils.dataViewToString(ie,i.default.UTF8);try{n=Q(b).parse(d,0),R.addCaptions(R.getCurrentTrackIdx(),0,n)}catch(e){E.error(new g.default(v.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,v.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,d))}}else if(p===i.default.VIDEO)if(t.segmentType===r.HTTPRequest.INIT_SEGMENT_TYPE){if(0===B)for(B=_.getMediaTimescaleFromMoov(e),o=0;o<F.length;o++)K(null,F[o])}else{if(0===B)return void y.warn("CEA-608: No timescale for embeddedTextTrack yet");var re=function(e,t){return function(e,n,i){var r=null;r=D.getTTMLRenderingDiv()?G.createHTMLCaptionsFromScreen(D.getElement(),e,n,i):[{start:e,end:n,data:i.getDisplayText(),styles:{}}],r&&R.addCaptions(t,0,r)}},ae=(u=_.getSamplesInfo(e)).lastSequenceNumber;if(!j[0]&&!j[1]){var oe=void 0,se=void 0;for(o=0;o<F.length;o++){if(F[o].id===i.default.CC1?se=R.getTrackIdxForId(i.default.CC1):F[o].id===i.default.CC3&&(se=R.getTrackIdxForId(i.default.CC3)),-1===se)return void y.warn("CEA-608: data before track is ready.");oe=re(0,se),j[o]=new h.default.Cea608Parser(o+1,{newCue:oe},null)}}if(B){if(null!==U&&ae!==U+u.numSequences)for(o=0;o<j.length;o++)j[o]&&j[o].reset();for(var le=function(e,t){if(0===t.length)return null;for(var n={splits:[],fields:[[],[]]},i=new DataView(e),r=0;r<t.length;r++)for(var a=t[r],o=h.default.findCea608Nalus(i,a.offset,a.size),s=null,l=0,u=0;u<o.length;u++)for(var d=h.default.extractCea608DataFromRange(i,o[u]),c=0;c<2;c++)d[c].length>0&&(a.cts!==s?l=0:l+=1,n.fields[c].push([a.cts+V*B,d[c],l]),s=a.cts);return n.fields.forEach(function(e){e.sort(function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]})}),n}(e,u.sampleList),ue=0;ue<j.length;ue++){var de=le.fields[ue],ce=j[ue];if(ce)for(o=0;o<de.length;o++)ce.addData(de[o][0]/B,de[o][1])}U=ae}}}else y.error("No text type defined")}function Q(e){var t=void 0;return e.search(i.default.VTT)>=0?t=S:(e.search(i.default.TTML)>=0||e.search(i.default.STPP)>=0)&&(t=x),t}function Z(e){F.forEach(function(t){var n=R.getTrackIdxForId(t.id);n>=0&&R.deleteCuesFromTrackIdx(n,e.from,e.to)})}return l={initialize:function(t,r){n||q(),R.setConfig({videoModel:D}),R.initialize(),_||(_=(0,o.default)(e).getInstance()),function(t,n){var r=!b.getIsTextTrack(t);if(n){if(M=M.concat(n.getMediaInfoArr()),r){C=n.getFragmentModel(),l.buffered=(0,s.default)(e).create(),O=w.getTracksFor(i.default.FRAGMENTED_TEXT,n.getStreamInfo());for(var a=w.getCurrentTrackFor(i.default.FRAGMENTED_TEXT,n.getStreamInfo()),o=0;o<O.length;o++)if(O[o]===a){Y(o);break}}for(var u=0;u<M.length;u++)K(null,M[u])}}(t,r)},append:X,abort:function(){R.deleteAllTextTracks(),H(),_=null,M=[]},addEmbeddedTrack:function(e){if(n||q(),e)if(e.id===i.default.CC1||e.id===i.default.CC3){for(var t=0;t<F.length;t++)if(F[t].id===e.id)return;F.push(e)}else y.warn("Embedded track "+e.id+" not supported!")},resetEmbedded:function(){t.off(m.default.VIDEO_CHUNK_RECEIVED,W,this),t.off(m.default.BUFFER_CLEARED,Z,this),R&&R.deleteAllTextTracks(),n=!1,F=[],j=[null,null],U=null},setConfig:function(e){e&&(e.errHandler&&(E=e.errHandler),e.adapter&&(b=e.adapter),e.manifestModel&&(T=e.manifestModel),e.mediaController&&(w=e.mediaController),e.videoModel&&(D=e.videoModel),e.streamController&&(P=e.streamController),e.textTracks&&(R=e.textTracks),e.vttParser&&(S=e.vttParser),e.ttmlParser&&(x=e.ttmlParser))},getConfig:function(){return{fragmentModel:C,fragmentedTracks:O,videoModel:D}},setCurrentFragmentedTrackIdx:Y,remove:function(e,t){void 0===e&&e===t&&(e=this.buffered.start(0),t=this.buffered.end(this.buffered.length-1)),this.buffered.remove(e,t)},reset:function(){z(),P=null,D=null,R=null}},y=(0,u.default)(e).getInstance().getLogger(l),z(),l}_.__dashjs_factory_name="TextSourceBuffer",t.default=l.default.getSingletonFactory(_)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(119)),r=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0;function t(t){var i=[];if(!t||!e||"function"!=typeof e.fetchAll)return i;for(var r=e.fetchAll(t),a=void 0,o=0,s=r.length;o<s;o++)(a=n(r[o]))&&i.push(a);return i}function n(e){if(!e)return null;var t=new i.default(e);return e.hasOwnProperty("_incomplete")&&(t.isComplete=!e._incomplete),t}return{getBox:function(t){return t&&e&&e.boxes&&0!==e.boxes.length&&"function"==typeof e.fetch?n(e.fetch(t)):null},getBoxes:t,setData:function(t){e=t},getLastBox:function(){if(!e||!e.boxes||!e.boxes.length)return null;var n=t(e.boxes[e.boxes.length-1].type);return n.length>0?n[n.length-1]:null}}}o.__dashjs_factory_name="IsoFile",t.default=r.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.offset=t._offset,this.type=t.type,this.size=t.size,this.boxes=[],t.boxes)for(var n=0;n<t.boxes.length;n++)this.boxes.push(new e(t.boxes[n]));switch(this.isComplete=!0,t.type){case"sidx":if(this.timescale=t.timescale,this.earliest_presentation_time=t.earliest_presentation_time,this.first_offset=t.first_offset,this.references=t.references,t.references){this.references=[];for(var i=0;i<t.references.length;i++){var r={reference_type:t.references[i].reference_type,referenced_size:t.references[i].referenced_size,subsegment_duration:t.references[i].subsegment_duration};this.references.push(r)}}break;case"emsg":this.id=t.id,this.value=t.value,this.timescale=t.timescale,this.scheme_id_uri=t.scheme_id_uri,this.presentation_time_delta=1===t.version?t.presentation_time:t.presentation_time_delta,this.event_duration=t.event_duration,this.message_data=t.message_data;break;case"mdhd":this.timescale=t.timescale;break;case"mfhd":this.sequence_number=t.sequence_number;break;case"subs":this.entry_count=t.entry_count,this.entries=t.entries;break;case"tfhd":this.base_data_offset=t.base_data_offset,this.sample_description_index=t.sample_description_index,this.default_sample_duration=t.default_sample_duration,this.default_sample_size=t.default_sample_size,this.default_sample_flags=t.default_sample_flags,this.flags=t.flags;break;case"tfdt":this.version=t.version,this.baseMediaDecodeTime=t.baseMediaDecodeTime,this.flags=t.flags;break;case"trun":if(this.sample_count=t.sample_count,this.first_sample_flags=t.first_sample_flags,this.data_offset=t.data_offset,this.flags=t.flags,this.samples=t.samples,t.samples){this.samples=[];for(var a=0,o=t.samples.length;a<o;a++){var s={sample_size:t.samples[a].sample_size,sample_duration:t.samples[a].sample_duration,sample_composition_time_offset:t.samples[a].sample_composition_time_offset};this.samples.push(s)}}}}return i(e,[{key:"getChildBox",value:function(e){for(var t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}},{key:"getChildBoxes",value:function(e){for(var t=[],n=0;n<this.boxes.length;n++)this.boxes[n].type===e&&t.push(this.boxes[n]);return t}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastCompletedOffset=t,this.found=n,this.size=i}},function(e,t,n){!function(e,t,n,i){e.generateISD=function(e,t,i){var r=new l(e),o={},s={},u={},d=e.head.styling.initials[n.byName.showBackground.qname],c=e.head.styling.initials[n.byName.backgroundColor.qname];for(var f in e.head.layout.regions)if(e.head.layout.regions.hasOwnProperty(f)){var h=e.head.layout.regions[f],p=h.styleAttrs[n.byName.showBackground.qname]||d,m=h.styleAttrs[n.byName.backgroundColor.qname]||c;
vendor: 15,071 bytes, line 70
70u[h.id]=("always"===p||void 0===p)&&void 0!==m&&!(t<h.begin||t>=h.end)}for(var g in e.body&&e.body.regionID&&(u[e.body.regionID]=!0),s=null!==e.body?function e(t,n){if(n.contents){var i={};for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.contents=[],n.contents.filter(function(e){return!(t<e.begin||t>=e.end)}).forEach(function(n){var r=e(t,n);r.regionID&&(u[r.regionID]=!0),null!==r&&i.contents.push(r)}),i}return n}(t,e.body):null,void 0!==u[""]&&(u[""]=!0),u)if(u[g]){var v=a(e,t,e.head.layout.regions[g],s,null,"",e.head.layout.regions[g],i,o);null!==v&&r.contents.push(v.element)}return r};var r=[n.byName.color.qname,n.byName.textCombine.qname,n.byName.textDecoration.qname,n.byName.textEmphasis.qname,n.byName.textOutline.qname,n.byName.textShadow.qname];function a(e,t,l,c,f,h,p,m,g){if(t<p.begin||t>=p.end)return null;var v="regionID"in p&&""!==p.regionID?p.regionID:h;if(null!==f&&v!==l.id&&(!("contents"in p)||"contents"in p&&0===p.contents.length||""!==v))return null;var y=new u(p);if("sets"in p)for(var _=0;_<p.sets.length;_++)t<p.sets[_].begin||t>=p.sets[_].end||(y.styleAttrs[p.sets[_].qname]=p.sets[_].value);var E={};for(var b in y.styleAttrs)if(y.styleAttrs.hasOwnProperty(b)&&(E[b]=!0,"region"===y.kind&&b===n.byName.writingMode.qname&&!(n.byName.direction.qname in y.styleAttrs))){var T=y.styleAttrs[b];"lrtb"===T||"lr"===T?y.styleAttrs[n.byName.direction.qname]="ltr":"rltb"!==T&&"rl"!==T||(y.styleAttrs[n.byName.direction.qname]="rtl")}if(null!==f)for(var w=0;w<n.all.length;w++){var A=n.all[w];if(A.qname===n.byName.textDecoration.qname){var S=f.styleAttrs[A.qname],x=y.styleAttrs[A.qname],M=[];void 0===x?M=S:-1===x.indexOf("none")?((-1===x.indexOf("noUnderline")&&-1!==S.indexOf("underline")||-1!==x.indexOf("underline"))&&M.push("underline"),(-1===x.indexOf("noLineThrough")&&-1!==S.indexOf("lineThrough")||-1!==x.indexOf("lineThrough"))&&M.push("lineThrough"),(-1===x.indexOf("noOverline")&&-1!==S.indexOf("overline")||-1!==x.indexOf("overline"))&&M.push("overline")):M.push("none"),y.styleAttrs[A.qname]=M}else if(A.qname!==n.byName.fontSize.qname||A.qname in y.styleAttrs||"span"!==y.kind||"textContainer"!==y.styleAttrs[n.byName.ruby.qname])if(A.qname!==n.byName.fontSize.qname||A.qname in y.styleAttrs||"span"!==y.kind||"text"!==y.styleAttrs[n.byName.ruby.qname])A.inherit&&A.qname in f.styleAttrs&&!(A.qname in y.styleAttrs)&&(y.styleAttrs[A.qname]=f.styleAttrs[A.qname]);else{var R=f.styleAttrs[n.byName.fontSize.qname];"textContainer"===f.styleAttrs[n.byName.ruby.qname]?y.styleAttrs[A.qname]=R:y.styleAttrs[A.qname]=new i.ComputedLength(.5*R.rw,.5*R.rh)}else{var C=f.styleAttrs[n.byName.fontSize.qname];y.styleAttrs[A.qname]=new i.ComputedLength(.5*C.rw,.5*C.rh)}}for(var I=0;I<n.all.length;I++){var L=n.all[I];if(!(L.qname in y.styleAttrs)&&!(L.qname===n.byName.position.qname&&n.byName.origin.qname in y.styleAttrs||L.qname===n.byName.origin.qname&&n.byName.position.qname in y.styleAttrs)){var O=e.head.styling.initials[L.qname]||L.initial;if(null!==O&&("region"===y.kind||!1===L.inherit&&null!==O)){var D=L.parse(O);null!==D?(y.styleAttrs[L.qname]=D,E[L.qname]=!0):d(m,"Invalid initial value for '"+L.qname+"' on element '"+y.kind)}}}for(var P=0;P<n.all.length;P++){var N=n.all[P];if(N.qname in E&&null!==N.compute){var k=N.compute(e,f,y,y.styleAttrs[N.qname],g);null!==k?y.styleAttrs[N.qname]=k:(y.styleAttrs[N.qname]=N.compute(e,f,y,N.parse(N.initial),g),d(m,"Style '"+N.qname+"' on element '"+y.kind+"' cannot be computed"))}}if("none"===y.styleAttrs[n.byName.display.qname])return null;var F=null;null===f?F=null===c?[]:[c]:"contents"in p&&(F=p.contents);for(var B=0;null!==F&&B<F.length;B++){var U=a(e,t,l,c,y,v,F[B],m,g);null!==U&&y.contents.push(U.element)}for(var j in y.styleAttrs)if(y.styleAttrs.hasOwnProperty(j)){var G=!1;if("span"===y.kind){var V=y.styleAttrs[n.byName.ruby.qname];(G=("container"===V||"textContainer"===V||"baseContainer"===V)&&-1!==r.indexOf(j))||(G="container"!==V&&j===n.byName.rubyAlign.qname),G||(G=!("textContainer"===V||"text"===V)&&j===n.byName.rubyPosition.qname)}if(!G){var H=n.byQName[j];"applies"in H&&(G=-1===H.applies.indexOf(y.kind))}G&&delete y.styleAttrs[j]}var z=y.styleAttrs[n.byName.ruby.qname];if("p"===y.kind||"span"===y.kind&&("textContainer"===z||"text"===z)){var W=[];o(y,W),function(e){function t(e){return"br"===e.kind||/[\r\n\t ]$/.test(e.text)}function n(e){return"br"===e.kind||"preserve"===e.space&&/^[\r\n]/.test(e.text)}for(var i,r=0;r<e.length;)if("br"!==(i=e[r]).kind&&"preserve"!==i.space){var a=i.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(a)&&(0===r||t(e[r-1]))&&(a=a.substring(1)),i.text=a,0===a.length?e.splice(r,1):r++}else r++;for(r=0;r<e.length;r++)"br"!==(i=e[r]).kind&&"preserve"!==i.space?/[ ]$/.test(i.text)&&(r===e.length-1||n(e[r+1]))&&(i.text=i.text.slice(0,-1)):r++}(W),s(y)}return"div"===y.kind&&n.byName.backgroundImage.qname in y.styleAttrs||"br"===y.kind||"image"===y.kind||"contents"in y&&y.contents.length>0||"span"===y.kind&&null!==y.text||"region"===y.kind&&"always"===y.styleAttrs[n.byName.showBackground.qname]?{region_id:v,element:y}:null}function o(e,t){if("contents"in e)for(var i=0;i<e.contents.length;i++){var r=e.contents[i],a=r.styleAttrs[n.byName.ruby.qname];("span"!==r.kind||"textContainer"!==a&&"text"!==a)&&("contents"in r?o(r,t):("span"===r.kind&&0!==r.text.length||"br"===r.kind)&&t.push(r))}}function s(e){if("br"===e.kind)return!1;if("text"in e)return 0===e.text.length;if("contents"in e){for(var t=e.contents.length;t--;)s(e.contents[t])&&e.contents.splice(t,1);return 0===e.contents.length}}function l(e){this.contents=[],this.aspectRatio=e.aspectRatio,this.lang=e.lang}function u(e){for(var t in this.kind=e.kind||"region",this.lang=e.lang,e.id&&(this.id=e.id),this.styleAttrs={},e.styleAttrs)e.styleAttrs.hasOwnProperty(t)&&(this.styleAttrs[t]=e.styleAttrs[t]);"src"in e&&(this.src=e.src),"type"in e&&(this.type=e.type),"text"in e?this.text=e.text:("region"===this.kind||"contents"in e)&&(this.contents=[]),"space"in e&&(this.space=e.space)}function d(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(29):imscNames,"undefined"==typeof imscStyles?n(40):imscStyles,"undefined"==typeof imscUtils?n(30):imscUtils)},function(e,t,n){!function(e,t,n,i,r){function a(e){if("contents"in e)for(var t=("styleAttrs"in e?e.styleAttrs[i.byName.ruby.qname]:null),n="span"===e.kind&&("container"===t||"textContainer"===t||"baseContainer"===t),r=e.contents.length-1;r>=0;r--)!n||"styleAttrs"in e.contents[r]&&i.byName.ruby.qname in e.contents[r].styleAttrs?a(e.contents[r]):delete e.contents[r]}function o(e,t,n,i){var r=i&&"seq"===i.timeContainer,a=0;i&&(a=r&&n?n.end:i.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var s=t.begin,l=null;if("sets"in t)for(var u=0;u<t.sets.length;u++)o(e,t.sets[u],l,t),s="seq"===t.timeContainer?t.sets[u].end:Math.max(s,t.sets[u].end),l=t.sets[u];if("contents"in t){if("contents"in t)for(var d=0;d<t.contents.length;d++)o(e,t.contents[d],l,t),s="seq"===t.timeContainer?t.contents[d].end:Math.max(s,t.contents[d].end),l=t.contents[d]}else s=r?t.begin:Number.POSITIVE_INFINITY;null!==t.explicit_end&&null!==t.explicit_dur?t.end=Math.min(t.begin+t.explicit_dur,a+t.explicit_end):null===t.explicit_end&&null!==t.explicit_dur?t.end=t.begin+t.explicit_dur:null!==t.explicit_end&&null===t.explicit_dur?t.end=a+t.explicit_end:t.end=s,delete t.explicit_begin,delete t.explicit_dur,delete t.explicit_end,e._registerEvent(t)}function s(e){this.node=e}function l(){this.events=[],this.head=new u,this.body=null}function u(){this.styling=new d,this.layout=new h}function d(){this.styles={},this.initials={}}function c(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function f(){this.styleAttrs=null}function h(){this.regions={}}function p(e,t){m.call(this,"image"),this.src=e,this.type=t}function m(e){this.kind=e}function g(e){this.id=e}function v(e){this.regionID=e}function y(e){this.styleAttrs=e}function _(e){this.sets=e}function E(e){this.contents=e}function b(e,t,n){this.explicit_begin=e,this.explicit_end=t,this.explicit_dur=n}function T(){m.call(this,"body")}function w(){m.call(this,"div")}function A(){m.call(this,"p")}function S(){m.call(this,"span")}function x(){m.call(this,"span")}function M(){m.call(this,"br")}function R(){}function C(){}function I(e){return e&&"xml:id"in e.attributes&&e.attributes["xml:id"].value||null}function L(e){return e&&"style"in e.attributes?e.attributes.style.value.split(" "):[]}function O(e,t){var n={};if(null!==e)for(var r in e.attributes){var a=e.attributes[r].uri+" "+e.attributes[r].local,o=i.byQName[a];if(void 0!==o){var s=o.parse(e.attributes[r].value);null!==s?(n[a]=s,o===i.byName.zIndex&&B(t,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):U(t,"Cannot parse styling attribute "+a+" --\x3e "+e.attributes[r].value)}}return n}function D(e,t,n){for(var i in e.attributes)if(e.attributes[i].uri===t&&e.attributes[i].local===n)return e.attributes[i].value;return null}function P(e,t,n){var i,r=null;return null!==(i=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==t&&(r=parseFloat(i[1])/t):null!==(i=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==e&&(r=parseFloat(i[1])/e):null!==(i=/^(\d+(?:\.\d+)?)ms$/.exec(n))?r=parseFloat(i[1])/1e3:null!==(i=/^(\d+(?:\.\d+)?)s$/.exec(n))?r=parseFloat(i[1]):null!==(i=/^(\d+(?:\.\d+)?)h$/.exec(n))?r=3600*parseFloat(i[1]):null!==(i=/^(\d+(?:\.\d+)?)m$/.exec(n))?r=60*parseFloat(i[1]):null!==(i=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?r=3600*parseInt(i[1])+60*parseInt(i[2])+parseFloat(i[3]):null!==(i=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==t&&(r=3600*parseInt(i[1])+60*parseInt(i[2])+parseInt(i[3])+(null===i[4]?0:parseInt(i[4])/t)),r}function N(e,t,n){for(;t.styleRefs.length>0;){var i=t.styleRefs.pop();i in e.styles?(N(e,e.styles[i],n),F(e.styles[i].styleAttrs,t.styleAttrs)):U(n,"Non-existant style id referenced")}}function k(e,t,n,i){for(var r=t.length-1;r>=0;r--){var a=t[r];a in e.styles?F(e.styles[a].styleAttrs,n):U(i,"Non-existant style id referenced")}}function F(e,t){for(var n in e)e.hasOwnProperty(n)&&(n in t||(t[n]=e[n]))}function B(e,t){if(e&&e.warn&&e.warn(t))throw t}function U(e,t){if(e&&e.error&&e.error(t))throw t}function j(e,t){throw e&&e.fatal&&e.fatal(t),t}function G(e,t){for(var n,i=0,r=e.length-1;i<=r;){var a=e[n=Math.floor((i+r)/2)];if(a<t)i=n+1;else{if(!(a>t))return{found:!0,index:n};r=n-1}}return{found:!1,index:i}}e.fromXML=function(e,r,m){var g=t.parser(!0,{xmlns:!0}),v=[],y=[],_=[],E=0,b=null;g.onclosetag=function(e){if(v[0]instanceof R)null!==b.head&&null!==b.head.styling&&k(b.head.styling,v[0].styleRefs,v[0].styleAttrs,r),delete v[0].styleRefs;else if(v[0]instanceof d)for(var t in v[0].styles)v[0].styles.hasOwnProperty(t)&&N(v[0],v[0].styles[t],r);else if(v[0]instanceof A||v[0]instanceof S){if(v[0].contents.length>1){var i,a=[v[0].contents[0]];for(i=1;i<v[0].contents.length;i++)v[0].contents[i]instanceof x&&a[a.length-1]instanceof x?a[a.length-1].text+=v[0].contents[i].text:a.push(v[0].contents[i]);v[0].contents=a}v[0]instanceof S&&1===v[0].contents.length&&v[0].contents[0]instanceof x&&(v[0].text=v[0].contents[0].text,delete v[0].contents)}else v[0]instanceof s&&(v[0].node.uri===n.ns_tt&&"metadata"===v[0].node.local?E--:E>0&&m&&"onCloseTag"in m&&m.onCloseTag());_.shift(),y.shift(),v.shift()},g.ontext=function(e){if(void 0===v[0]);else if(v[0]instanceof S||v[0]instanceof A){if(v[0]instanceof S){var t=v[0].styleAttrs[i.byName.ruby.qname];if("container"===t||"textContainer"===t||"baseContainer"===t)return}var n=new x;n.initFromText(b,v[0],e,y[0],_[0],r),v[0].contents.push(n)}else v[0]instanceof s&&E>0&&m&&"onText"in m&&m.onText(e)},g.onopentag=function(e){var t=e.attributes["xml:space"];t?_.unshift(t.value):0===_.length?_.unshift("default"):_.unshift(_[0]);var a=e.attributes["xml:lang"];if(a?y.unshift(a.value):0===y.length?y.unshift(""):y.unshift(y[0]),e.uri===n.ns_tt)if("tt"===e.local)null!==b&&j(r,"Two <tt> elements at ("+this.line+","+this.column+")"),(b=new l).initFromNode(e,y[0],r),v.unshift(b);else if("head"===e.local)v[0]instanceof l||j(r,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),v.unshift(b.head);else if("styling"===e.local)v[0]instanceof u||j(r,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),v.unshift(b.head.styling);else if("style"===e.local){var o;v[0]instanceof d?((o=new c).initFromNode(e,r),o.id?b.head.styling.styles[o.id]=o:U(r,"<style> element missing @id attribute"),v.unshift(o)):v[0]instanceof R?((o=new c).initFromNode(e,r),F(o.styleAttrs,v[0].styleAttrs),v.unshift(o)):j(r,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===e.local){var g;if(v[0]instanceof d){for(var x in(g=new f).initFromNode(e,r),g.styleAttrs)g.styleAttrs.hasOwnProperty(x)&&(b.head.styling.initials[x]=g.styleAttrs[x]);v.unshift(g)}else j(r,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===e.local)v[0]instanceof u||j(r,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),v.unshift(b.head.layout);else if("region"===e.local){v[0]instanceof h||j(r,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var I=new R;I.initFromNode(b,e,y[0],r),!I.id||I.id in b.head.layout.regions?U(r,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):b.head.layout.regions[I.id]=I,v.unshift(I)}else if("body"===e.local){v[0]instanceof l||j(r,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==b.body&&j(r,"Second <body> element at "+this.line+","+this.column+")");var L=new T;L.initFromNode(b,e,y[0],r),b.body=L,v.unshift(L)}else if("div"===e.local){v[0]instanceof w||v[0]instanceof T||j(r,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var O=new w;O.initFromNode(b,v[0],e,y[0],r);var D=O.styleAttrs[i.byName.backgroundImage.qname];D&&(O.contents.push(new p(D)),delete O.styleAttrs[i.byName.backgroundImage.qname]),v[0].contents.push(O),v.unshift(O)}else if("image"===e.local){v[0]instanceof w||j(r,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var P=new p;P.initFromNode(b,v[0],e,y[0],r),v[0].contents.push(P),v.unshift(P)}else if("p"===e.local){v[0]instanceof w||j(r,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var N=new A;N.initFromNode(b,v[0],e,y[0],r),v[0].contents.push(N),v.unshift(N)}else if("span"===e.local){v[0]instanceof S||v[0]instanceof A||j(r,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var k=new S;k.initFromNode(b,v[0],e,y[0],_[0],r),v[0].contents.push(k),v.unshift(k)}else if("br"===e.local){v[0]instanceof S||v[0]instanceof A||j(r,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var B=new M;B.initFromNode(b,v[0],e,y[0],r),v[0].contents.push(B),v.unshift(B)}else if("set"===e.local){v[0]instanceof S||v[0]instanceof A||v[0]instanceof w||v[0]instanceof T||v[0]instanceof R||v[0]instanceof M||j(r,"Parent of <set>
70 element is not a content element or a region at "+this.line+","+this.column+")");var G=new C;G.initFromNode(b,v[0],e,r),v[0].sets.push(G),v.unshift(G)}else v.unshift(new s(e));else v.unshift(new s(e));if(v[0]instanceof s)if(e.uri===n.ns_tt&&"metadata"===e.local)E++;else if(E>0&&m&&"onOpenTag"in m){var V=[];for(var H in e.attributes)V[e.attributes[H].uri+" "+e.attributes[H].local]={uri:e.attributes[H].uri,local:e.attributes[H].local,value:e.attributes[H].value};m.onOpenTag(e.uri,e.local,V)}},g.write(e).close(),delete b.head.styling.styles;var I=!1;for(var L in b.head.layout.regions)if(b.head.layout.regions.hasOwnProperty(L)){I=!0;break}if(!I){var O=R.prototype.createDefaultRegion(b.lang);b.head.layout.regions[O.id]=O}for(var D in b.head.layout.regions)b.head.layout.regions.hasOwnProperty(D)&&o(b,b.head.layout.regions[D],null,null);return b.body&&o(b,b.body,null,null),b.body&&a(b.body),b},l.prototype.initFromNode=function(e,t,i){var a=function(e,t){var i=D(e,n.ns_ttp,"cellResolution"),r=15,a=32;if(null!==i){var o=/(\d+) (\d+)/.exec(i);null!==o?(a=parseInt(o[1]),r=parseInt(o[2])):B(t,"Malformed cellResolution value (using initial value instead)")}return{w:a,h:r}}(e,i);this.cellLength={h:new r.ComputedLength(0,1/a.h),w:new r.ComputedLength(1/a.w,0)};var o=function(e,t){var i,r=D(e,n.ns_ttp,"frameRate"),a=30;if(null!==r){null!==(i=/(\d+)/.exec(r))?a=parseInt(i[1]):B(t,"Malformed frame rate attribute (using initial value instead)")}var o=D(e,n.ns_ttp,"frameRateMultiplier"),s=1;if(null!==o){null!==(i=/(\d+) (\d+)/.exec(o))?s=parseInt(i[1])/parseInt(i[2]):B(t,"Malformed frame rate multiplier attribute (using initial value instead)")}var l=s*a,u=1,d=D(e,n.ns_ttp,"tickRate");if(null===d)null!==r&&(u=l);else{null!==(i=/(\d+)/.exec(d))?u=parseInt(i[1]):B(t,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:l,tickRate:u}}(e,i);this.effectiveFrameRate=o.effectiveFrameRate,this.tickRate=o.tickRate,this.aspectRatio=function(e,t){var i=D(e,n.ns_ittp,"aspectRatio");null===i&&(i=D(e,n.ns_ttp,"displayAspectRatio"));var r=null;if(null!==i){var a=/(\d+)\s+(\d+)/.exec(i);if(null!==a){var o=parseInt(a[1]),s=parseInt(a[2]);0!==o&&0!==s?r=o/s:U(t,"Illegal aspectRatio values (ignoring)")}else U(t,"Malformed aspectRatio attribute (ignoring)")}return r}(e,i);var s=D(e,n.ns_ttp,"timeBase");null!==s&&"media"!==s&&j(i,"Unsupported time base");var l=function(e,t){var i=D(e,n.ns_tts,"extent");if(null===i)return null;var a=i.split(" ");if(2!==a.length)return B(t,"Malformed extent (ignoring)"),null;var o=r.parseLength(a[0]),s=r.parseLength(a[1]);if(!s||!o)return B(t,"Malformed extent values (ignoring)"),null;return{h:s,w:o}}(e,i);null===l?this.pxLength={h:null,w:null}:("px"===l.h.unit&&"px"===l.w.unit||j(i,"Extent on TT must be in px or absent"),this.pxLength={h:new r.ComputedLength(0,1/l.h.value),w:new r.ComputedLength(1/l.w.value,0)}),this.dimensions={h:new r.ComputedLength(0,1),w:new r.ComputedLength(1,0)},this.lang=t},l.prototype._registerEvent=function(e){if(!(e.end<=e.begin)){var t=G(this.events,e.begin);if(t.found||this.events.splice(t.index,0,e.begin),e.end!==Number.POSITIVE_INFINITY){var n=G(this.events,e.end);n.found||this.events.splice(n.index,0,e.end)}}},l.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},l.prototype.getMediaTimeEvents=function(){return this.events},c.prototype.initFromNode=function(e,t){this.id=I(e),this.styleAttrs=O(e,t),this.styleRefs=L(e)},f.prototype.initFromNode=function(e,t){for(var i in this.styleAttrs={},e.attributes)if(e.attributes[i].uri===n.ns_itts||e.attributes[i].uri===n.ns_ebutts||e.attributes[i].uri===n.ns_tts){var r=e.attributes[i].uri+" "+e.attributes[i].local;this.styleAttrs[r]=e.attributes[i].value}},p.prototype.initFromNode=function(e,t,n,i,r){this.src="src"in n.attributes?n.attributes.src.value:null,this.src||U(r,"Invalid image@src attribute"),this.type="type"in n.attributes?n.attributes.type.value:null,this.type||U(r,"Invalid image@type attribute"),y.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),_.prototype.initFromNode.call(this,e,t,n,r),v.prototype.initFromNode.call(this,e,t,n,r),this.lang=i},g.prototype.initFromNode=function(e,t,n,i){this.id=I(n)},v.prototype.initFromNode=function(e,t,n,i){this.regionID=function(e){return e&&"region"in e.attributes?e.attributes.region.value:""}(n)},y.prototype.initFromNode=function(e,t,n,i){this.styleAttrs=O(n,i),null!==e.head&&null!==e.head.styling&&k(e.head.styling,L(n),this.styleAttrs,i)},_.prototype.initFromNode=function(e,t,n,i){this.sets=[]},E.prototype.initFromNode=function(e,t,n,i){this.contents=[]},b.prototype.initFromNode=function(e,t,n,i){var r=function(e,t,n,i){var r=null;n&&"begin"in n.attributes&&null===(r=P(e.tickRate,e.effectiveFrameRate,n.attributes.begin.value))&&B(i,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var a=null;n&&"dur"in n.attributes&&null===(a=P(e.tickRate,e.effectiveFrameRate,n.attributes.dur.value))&&B(i,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var o=null;n&&"end"in n.attributes&&null===(o=P(e.tickRate,e.effectiveFrameRate,n.attributes.end.value))&&B(i,"Malformed end value (ignoring)");return{explicit_begin:r,explicit_end:o,explicit_dur:a}}(e,0,n,i);this.explicit_begin=r.explicit_begin,this.explicit_end=r.explicit_end,this.explicit_dur=r.explicit_dur,this.timeContainer=function(e,t){var n=e&&"timeContainer"in e.attributes?e.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(U(t,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,i)},T.prototype.initFromNode=function(e,t,n,i){y.prototype.initFromNode.call(this,e,null,t,i),b.prototype.initFromNode.call(this,e,null,t,i),_.prototype.initFromNode.call(this,e,null,t,i),v.prototype.initFromNode.call(this,e,null,t,i),E.prototype.initFromNode.call(this,e,null,t,i),this.lang=n},w.prototype.initFromNode=function(e,t,n,i,r){y.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),_.prototype.initFromNode.call(this,e,t,n,r),v.prototype.initFromNode.call(this,e,t,n,r),E.prototype.initFromNode.call(this,e,t,n,r),this.lang=i},A.prototype.initFromNode=function(e,t,n,i,r){y.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),_.prototype.initFromNode.call(this,e,t,n,r),v.prototype.initFromNode.call(this,e,t,n,r),E.prototype.initFromNode.call(this,e,t,n,r),this.lang=i},S.prototype.initFromNode=function(e,t,n,i,r,a){y.prototype.initFromNode.call(this,e,t,n,a),b.prototype.initFromNode.call(this,e,t,n,a),_.prototype.initFromNode.call(this,e,t,n,a),v.prototype.initFromNode.call(this,e,t,n,a),E.prototype.initFromNode.call(this,e,t,n,a),this.space=r,this.lang=i},x.prototype.initFromText=function(e,t,n,i,r,a){b.prototype.initFromNode.call(this,e,t,null,a),this.text=n,this.space=r,this.lang=i},M.prototype.initFromNode=function(e,t,n,i,r){v.prototype.initFromNode.call(this,e,t,n,r),b.prototype.initFromNode.call(this,e,t,n,r),this.lang=i},R.prototype.createDefaultRegion=function(e){var t=new R;return g.call(t,""),y.call(t,{}),_.call(t,[]),b.call(t,0,Number.POSITIVE_INFINITY,null),this.lang=e,t},R.prototype.initFromNode=function(e,t,n,i){g.prototype.initFromNode.call(this,e,null,t,i),b.prototype.initFromNode.call(this,e,null,t,i),_.prototype.initFromNode.call(this,e,null,t,i),this.styleAttrs=O(t,i),this.styleRefs=L(t),this.lang=n},C.prototype.initFromNode=function(e,t,n,i){b.prototype.initFromNode.call(this,e,t,n,i);var r=O(n,i);for(var a in this.qname=null,this.value=null,r)if(r.hasOwnProperty(a)){if(this.qname){U(i,"More than one style specified on set");break}this.qname=a,this.value=r[a]}}}(t,"undefined"==typeof sax?n(123):sax,"undefined"==typeof imscNames?n(29):imscNames,"undefined"==typeof imscStyles?n(40):imscStyles,"undefined"==typeof imscUtils?n(30):imscUtils)},function(e,t,n){(function(e){!function(t){t.parser=function(e,t){return new a(e,t)},t.SAXParser=a,t.SAXStream=s,t.createStream=function(e,t){return new s(e,t)},t.MAX_BUFFER_LENGTH=65536;var i,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function a(e,n){if(!(this instanceof a))return new a(e,n);var i=this;!function(e){for(var t=0,n=r.length;t<n;t++)e[r[t]]=""}(i),i.q=i.c="",i.bufferCheckPosition=t.MAX_BUFFER_LENGTH,i.opt=n||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=R.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(v)),i.trackPosition=!1!==i.opt.position,i.trackPosition&&(i.position=i.line=i.column=0),I(i,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),a.prototype={end:function(){N(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return P(n,"Cannot write after close. Assign an onready handler.");if(null===e)return N(n);"object"==typeof e&&(e=e.toString());var i=0,a="";for(;a=z(e,i++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case R.BEGIN:if(n.state=R.BEGIN_WHITESPACE,"\ufeff"===a)continue;H(n,a);continue;case R.BEGIN_WHITESPACE:H(n,a);continue;case R.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=i-1;a&&"<"!==a&&"&"!==a;)(a=z(e,i++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(o,i-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(!A(l,a)||n.sawRoot&&!n.closedRoot||k(n,"Text data outside of root node."),"&"===a?n.state=R.TEXT_ENTITY:n.textNode+=a):(n.state=R.OPEN_WAKA,n.startTagPosition=n.position);continue;case R.SCRIPT:"<"===a?n.state=R.SCRIPT_ENDING:n.script+=a;continue;case R.SCRIPT_ENDING:"/"===a?n.state=R.CLOSE_TAG:(n.script+="<"+
vendor: 14,045 bytes, lines 70-71
70a,n.state=R.SCRIPT);continue;case R.OPEN_WAKA:if("!"===a)n.state=R.SGML_DECL,n.sgmlDecl="";else if(w(l,a));else if(w(y,a))n.state=R.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=R.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=R.PROC_INST,n.procInstName=n.procInstBody="";else{if(k(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;a=new Array(s).join(" ")+a}n.textNode+="<"+a,n.state=R.TEXT}continue;case R.SGML_DECL:(n.sgmlDecl+a).toUpperCase()===h?(L(n,"onopencdata"),n.state=R.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+a==="--"?(n.state=R.COMMENT,n.comment="",n.sgmlDecl=""):(n.sgmlDecl+a).toUpperCase()===p?(n.state=R.DOCTYPE,(n.doctype||n.sawRoot)&&k(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(L(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=R.TEXT):w(c,a)?(n.state=R.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case R.SGML_DECL_QUOTED:a===n.q&&(n.state=R.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case R.DOCTYPE:">"===a?(n.state=R.TEXT,L(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=R.DOCTYPE_DTD:w(c,a)&&(n.state=R.DOCTYPE_QUOTED,n.q=a));continue;case R.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=R.DOCTYPE);continue;case R.DOCTYPE_DTD:n.doctype+=a,"]"===a?n.state=R.DOCTYPE:w(c,a)&&(n.state=R.DOCTYPE_DTD_QUOTED,n.q=a);continue;case R.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=R.DOCTYPE_DTD,n.q="");continue;case R.COMMENT:"-"===a?n.state=R.COMMENT_ENDING:n.comment+=a;continue;case R.COMMENT_ENDING:"-"===a?(n.state=R.COMMENT_ENDED,n.comment=D(n.opt,n.comment),n.comment&&L(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=R.COMMENT);continue;case R.COMMENT_ENDED:">"!==a?(k(n,"Malformed comment"),n.comment+="--"+a,n.state=R.COMMENT):n.state=R.TEXT;continue;case R.CDATA:"]"===a?n.state=R.CDATA_ENDING:n.cdata+=a;continue;case R.CDATA_ENDING:"]"===a?n.state=R.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=R.CDATA);continue;case R.CDATA_ENDING_2:">"===a?(n.cdata&&L(n,"oncdata",n.cdata),L(n,"onclosecdata"),n.cdata="",n.state=R.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=R.CDATA);continue;case R.PROC_INST:"?"===a?n.state=R.PROC_INST_ENDING:w(l,a)?n.state=R.PROC_INST_BODY:n.procInstName+=a;continue;case R.PROC_INST_BODY:if(!n.procInstBody&&w(l,a))continue;"?"===a?n.state=R.PROC_INST_ENDING:n.procInstBody+=a;continue;case R.PROC_INST_ENDING:">"===a?(L(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=R.TEXT):(n.procInstBody+="?"+a,n.state=R.PROC_INST_BODY);continue;case R.OPEN_TAG:w(_,a)?n.tagName+=a:(F(n),">"===a?j(n):"/"===a?n.state=R.OPEN_TAG_SLASH:(A(l,a)&&k(n,"Invalid character in tag name"),n.state=R.ATTRIB));continue;case R.OPEN_TAG_SLASH:">"===a?(j(n,!0),G(n)):(k(n,"Forward-slash in opening tag not followed by >"),n.state=R.ATTRIB);continue;case R.ATTRIB:if(w(l,a))continue;">"===a?j(n):"/"===a?n.state=R.OPEN_TAG_SLASH:w(y,a)?(n.attribName=a,n.attribValue="",n.state=R.ATTRIB_NAME):k(n,"Invalid attribute name");continue;case R.ATTRIB_NAME:"="===a?n.state=R.ATTRIB_VALUE:">"===a?(k(n,"Attribute without value"),n.attribValue=n.attribName,U(n),j(n)):w(l,a)?n.state=R.ATTRIB_NAME_SAW_WHITE:w(_,a)?n.attribName+=a:k(n,"Invalid attribute name");continue;case R.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=R.ATTRIB_VALUE;else{if(w(l,a))continue;k(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",L(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?j(n):w(y,a)?(n.attribName=a,n.state=R.ATTRIB_NAME):(k(n,"Invalid attribute name"),n.state=R.ATTRIB)}continue;case R.ATTRIB_VALUE:if(w(l,a))continue;w(c,a)?(n.q=a,n.state=R.ATTRIB_VALUE_QUOTED):(k(n,"Unquoted attribute value"),n.state=R.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case R.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=R.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}U(n),n.q="",n.state=R.ATTRIB_VALUE_CLOSED;continue;case R.ATTRIB_VALUE_CLOSED:w(l,a)?n.state=R.ATTRIB:">"===a?j(n):"/"===a?n.state=R.OPEN_TAG_SLASH:w(y,a)?(k(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=R.ATTRIB_NAME):k(n,"Invalid attribute name");continue;case R.ATTRIB_VALUE_UNQUOTED:if(A(f,a)){"&"===a?n.state=R.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}U(n),">"===a?j(n):n.state=R.ATTRIB;continue;case R.CLOSE_TAG:if(n.tagName)">"===a?G(n):w(_,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=R.SCRIPT):(A(l,a)&&k(n,"Invalid tagname in closing tag"),n.state=R.CLOSE_TAG_SAW_WHITE);else{if(w(l,a))continue;A(y,a)?n.script?(n.script+="</"+a,n.state=R.SCRIPT):k(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case R.CLOSE_TAG_SAW_WHITE:if(w(l,a))continue;">"===a?G(n):k(n,"Invalid characters in closing tag");continue;case R.TEXT_ENTITY:case R.ATTRIB_VALUE_ENTITY_Q:case R.ATTRIB_VALUE_ENTITY_U:var u,d;switch(n.state){case R.TEXT_ENTITY:u=R.TEXT,d="textNode";break;case R.ATTRIB_VALUE_ENTITY_Q:u=R.ATTRIB_VALUE_QUOTED,d="attribValue";break;case R.ATTRIB_VALUE_ENTITY_U:u=R.ATTRIB_VALUE_UNQUOTED,d="attribValue"}";"===a?(n[d]+=V(n),n.entity="",n.state=u):w(n.entity.length?b:E,a)?n.entity+=a:(k(n,"Invalid character in entity name"),n[d]+="&"+n.entity+a,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,a=0,o=r.length;a<o;a++){var s=e[r[a]].length;if(s>n)switch(r[a]){case"textNode":O(e);break;case"cdata":L(e,"oncdata",e.cdata),e.cdata="";break;case"script":L(e,"onscript",e.script),e.script="";break;default:P(e,"Max buffer length exceeded: "+r[a])}i=Math.max(i,s)}var l=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=l+e.position}(n);return n}
71/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;O(e=this),""!==e.cdata&&(L(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(L(e,"onscript",e.script),e.script="")}};try{i=n(126).Stream}catch(e){i=function(){}}var o=t.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function s(e,t){if(!(this instanceof s))return new s(e,t);i.apply(this),this._parser=new a(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,o.forEach(function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(i.prototype,{constructor:{value:s}}),s.prototype.write=function(t){if("function"==typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)){if(!this._decoder){var i=n(45).StringDecoder;this._decoder=new i("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},s.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},s.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===o.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),i.prototype.on.call(n,e,t)};var l="\r\n\t ",u="0124356789",d="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",c="'\"",f=l+">",h="[CDATA[",p="DOCTYPE",m="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",v={xml:m,xmlns:g};l=T(l),u=T(u),d=T(d);var y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,_=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,E=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,b=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function T(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function w(e,t){return function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)?!!t.match(e):e[t]}function A(e,t){return!w(e,t)}c=T(c),f=T(f);var S,x,M,R=0;for(var C in t.STATE={BEGIN:R++,BEGIN_WHITESPACE:R++,TEXT:R++,TEXT_ENTITY:R++,OPEN_WAKA:R++,SGML_DECL:R++,SGML_DECL_QUOTED:R++,DOCTYPE:R++,DOCTYPE_QUOTED:R++,DOCTYPE_DTD:R++,DOCTYPE_DTD_QUOTED:R++,COMMENT_STARTING:R++,COMMENT:R++,COMMENT_ENDING:R++,COMMENT_ENDED:R++,CDATA:R++,CDATA_ENDING:R++,CDATA_ENDING_2:R++,PROC_INST:R++,PROC_INST_BODY:R++,PROC_INST_ENDING:R++,OPEN_TAG:R++,OPEN_TAG_SLASH:R++,ATTRIB:R++,ATTRIB_NAME:R++,ATTRIB_NAME_SAW_WHITE:R++,ATTRIB_VALUE:R++,ATTRIB_VALUE_QUOTED:R++,ATTRIB_VALUE_CLOSED:R++,ATTRIB_VALUE_UNQUOTED:R++,ATTRIB_VALUE_ENTITY_Q:R++,ATTRIB_VALUE_ENTITY_U:R++,CLOSE_TAG:R++,CLOSE_TAG_SAW_WHITE:R++,SCRIPT:R++,SCRIPT_ENDING:R++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],i="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=i}),t.STATE)t.STATE[t.STATE[C]]=C;function I(e,t,n){e[t]&&e[t](n)}function L(e,t,n){e.textNode&&O(e),I(e,t,n)}function O(e){e.textNode=D(e.opt,e.textNode),e.textNode&&I(e,"ontext",e.textNode),e.textNode=""}function D(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function P(e,t){return O(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,I(e,"onerror",t),e}function N(e){return e.sawRoot&&!e.closedRoot&&k(e,"Unclosed root tag"),e.state!==R.BEGIN&&e.state!==R.BEGIN_WHITESPACE&&e.state!==R.TEXT&&P(e,"Unexpected end"),O(e),e.c="",e.closed=!0,I(e,"onend"),a.call(e,e.strict,e.opt),e}function k(e,t){if("object"!=typeof e||!(e instanceof a))throw new Error("bad call to strictFail");e.strict&&P(e,t)}function F(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,L(e,"onopentagstart",n)}function B(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),i=n[0],r=n[1];return t&&"xmlns"===e&&(i="xmlns",r=""),{prefix:i,local:r}}function U(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=B(e.attribName,!0),n=t.prefix,i=t.local;if("xmlns"===n)if("xml"===i&&e.attribValue!==m)k(e,"xml: prefix must be bound to "+m+"\nActual: "+e.attribValue);else if("xmlns"===i&&e.attribValue!==g)k(e,"xmlns: prefix must be bound to "+g+"\nActual: "+e.attribValue);else{var r=e.tag,a=e.tags[e.tags.length-1]||e;r.ns===a.ns&&(r.ns=Object.create(a.ns)),r.ns[i]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,L(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function j(e,t){if(e.opt.xmlns){var n=e.tag,i=B(e.tagName);n.prefix=i.prefix,n.local=i.local,n.uri=n.ns[i.prefix]||"",n.prefix&&!n.uri&&(k(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=i.prefix);var r=e.tags[e.tags.length-1]||e;
vendor: 6,177 bytes, lines 71-73
71n.ns&&r.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){L(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var a=0,o=e.attribList.length;a<o;a++){var s=e.attribList[a],l=s[0],u=s[1],d=B(l,!0),c=d.prefix,f=d.local,h=""===c?"":n.ns[c]||"",p={name:l,value:u,prefix:c,local:f,uri:h};c&&"xmlns"!==c&&!h&&(k(e,"Unbound namespace prefix: "+JSON.stringify(c)),p.uri=c),e.tag.attributes[l]=p,L(e,"onattribute",p)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),L(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=R.TEXT:e.state=R.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function G(e){if(!e.tagName)return k(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=R.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=R.SCRIPT);L(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var i=n;t--;){if(e.tags[t].name===i)break;k(e,"Unexpected close tag")}if(t<0)return k(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=R.TEXT);e.tagName=n;for(var r=e.tags.length;r-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,L(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var l=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==l.ns&&Object.keys(a.ns).forEach(function(t){var n=a.ns[t];L(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=R.TEXT}function V(e){var t,n=e.entity,i=n.toLowerCase(),r="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[i]?e.ENTITIES[i]:("#"===(n=i).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),r=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),r=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),r.toLowerCase()!==n?(k(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function H(e,t){"<"===t?(e.state=R.OPEN_WAKA,e.startTagPosition=e.position):A(l,t)&&(k(e,"Non-whitespace before first tag."),e.textNode=t,e.state=R.TEXT)}function z(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}R=t.STATE,String.fromCodePoint||(S=String.fromCharCode,x=Math.floor,M=function(){var e,t,n=[],i=-1,r=arguments.length;if(!r)return"";for(var a="";++i<r;){var o=Number(arguments[i]);if(!isFinite(o)||o<0||o>1114111||x(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?n.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,n.push(e,t)),(i+1===r||n.length>16384)&&(a+=S.apply(null,n),n.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:M,configurable:!0,writable:!0}):String.fromCodePoint=M)}(t)}).call(this,n(41).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=l(e),o=i[0],s=i[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),d=0,c=s>0?o-4:o;for(n=0;n<c;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[d++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,a=[],o=16383,s=0,l=n-r;s<l;s+=o)a.push(d(e,s,s+o>l?l:s+o));1===r?(t=e[n-1],a.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],a.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return a.join("")};for(var i=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[s]=o[s],r[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function d(e,t,n){for(var i,r=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(u(i));return r.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){
72/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
73t.read=function(e,t,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,u=l>>1,d=-7,c=n?r-1:0,f=n?-1:1,h=e[t+c];for(c+=f,a=h&(1<<-d)-1,h>>=-d,d+=s;d>0;a=256*a+e[t+c],c+=f,d-=8);for(o=a&(1<<-d)-1,a>>=-d,d+=i;d>0;o=256*o+e[t+c],c+=f,d-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,i),a-=u}return(h?-1:1)*o*Math.pow(2,a-i)},t.write=function(e,t,n,i,r,a){var o,s,l,u=8*a-r-1,d=(1<<u)-1,c=d>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:a-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=d):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=d?(s=0,o=d):o+c>=1?(s=(t*l-1)*Math.pow(2,r),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;e[n+h]=255&s,h+=p,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[n+h]=255&o,h+=p,o/=256,u-=8);e[n+h-p]|=128*m}},function(e,t,n){e.exports=r;var i=n(42).EventEmitter;function r(){i.call(this)}n(20)(r,i),r.Readable=n(43),r.Writable=n(132),r.Duplex=n(133),r.Transform=n(134),r.PassThrough=n(135),r.Stream=r,r.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(d(),0===i.listenerCount(this,"error"))throw e}function d(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",d),n.removeListener("close",d),e.removeListener("close",d)}return n.on("error",u),e.on("error",u),n.on("end",d),n.on("close",d),e.on("close",d),e.emit("pipe",n),e}},function(e,t,n){"use strict";var i=n(32).Buffer,r=n(263);function a(e,t,n){e.copy(t,n)}
vendor: 6,765 bytes, line 73
73e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)a(n.data,t,r),r+=n.data.length,n=n.next;return t},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new a(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(129),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},function(e,t,n){(function(e,t){!function(e){"use strict";if(!e.setImmediate){var n,i,r,a,o,s=1,l={},u=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){h(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){r.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),n=function(t){e.postMessage(a+t,"*")}),c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var r={callback:e,args:t};return l[s]=r,n(s),s++},c.clearImmediate=f}function f(e){delete l[e]}function h(e){if(u)setTimeout(h,0,e);else{var t=l[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(12),n(16))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,n(12))},function(e,t,n){"use strict";e.exports=a;var i=n(73),r=Object.create(n(24));function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}r.inherits=n(20),r.inherits(a,i),a.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(44)},function(e,t,n){e.exports=n(18)},function(e,t,n){e.exports=n(43).Transform},function(e,t,n){e.exports=n(43).PassThrough},function(e,t,n){var i=/firefox/i.test(navigator.userAgent);!function(e,t,n){function r(e,t,c,h){var p;if("region"===c.kind)(p=document.createElement("div")).style.position="absolute";else if("body"===c.kind)p=document.createElement("div");else if("div"===c.kind)p=document.createElement("div");else if("image"===c.kind){if(p=document.createElement("img"),null!==e.imgResolver&&null!==c.src){var v=e.imgResolver(c.src,p);v&&(p.src=v),p.height=e.regionH,p.width=e.regionW}}else if("p"===c.kind)p=document.createElement("p");else if("span"===c.kind)if("container"===c.styleAttrs[n.byName.ruby.qname])p=document.createElement("ruby"),e.ruby=!0;else if("base"===c.styleAttrs[n.byName.ruby.qname])p=document.createElement("span");else if("text"===c.styleAttrs[n.byName.ruby.qname])p=document.createElement("rt");else if("baseContainer"===c.styleAttrs[n.byName.ruby.qname])p=document.createElement("rbc");else if("textContainer"===c.styleAttrs[n.byName.ruby.qname])p=document.createElement("rtc");else{if("delimiter"===c.styleAttrs[n.byName.ruby.qname])return;p=document.createElement("span")}else"br"===c.kind&&(p=document.createElement("br"));if(p){if(c.lang&&("region"!==c.kind&&c.lang===h.lang||(p.lang=c.lang)),t.appendChild(p),p.style.margin="0","region"===c.kind){var E=c.styleAttrs[n.byName.writingMode.qname];"lrtb"===E||"lr"===E?(e.ipd="lr",e.bpd="tb"):"rltb"===E||"rl"===E?(e.ipd="rl",e.bpd="tb"):"tblr"===E?(e.ipd="tb",e.bpd="lr"):"tbrl"!==E&&"tb"!==E||(e.ipd="tb",e.bpd="rl")}else if("p"===c.kind&&"tb"===e.bpd){var b=c.styleAttrs[n.byName.direction.qname];e.ipd="ltr"===b?"lr":"rl"}for(var T=0;T<f.length;T++){var w=f[T],A=c.styleAttrs[w.qname];void 0!==A&&null!==w.map&&w.map(e,p,c,A)}var S=p,x=c.styleAttrs[n.byName.linePadding.qname];if(x&&!x.isZero()){var M=x.toUsedLength(e.w,e.h);if(M>0){var R=Math.ceil(M)+"px";"tb"===e.bpd?(S.style.paddingLeft=R,S.style.paddingRight=R):(S.style.paddingTop=R,S.style.paddingBottom=R),e.lp=x}}var C=c.styleAttrs[n.byName.multiRowAlign.qname];if(C&&"auto"!==C){var I=document.createElement("span");I.style.display="inline-block",I.style.textAlign=C,p.appendChild(I),S=I,e.mra=C}
vendor: 6,585 bytes, line 73
73var L=c.styleAttrs[n.byName.rubyReserve.qname];if(L&&"none"!==L[0]&&(e.rubyReserve=L),c.styleAttrs[n.byName.fillLineGap.qname]&&(e.flg=!0),"span"===c.kind&&c.text){var O=c.styleAttrs[n.byName.textEmphasis.qname];if(O&&"none"!==O.style&&(e.textEmphasis=!0),n.byName.textCombine.qname in c.styleAttrs&&"all"===c.styleAttrs[n.byName.textCombine.qname])p.textContent=c.text,p._isd_element=c,O&&d(e,p,c,O);else for(var D="",P=0;P<c.text.length;P++){D+=c.text.charAt(P);var N=c.text.charCodeAt(P);if(N<55296||N>56319||P===c.text.length-1){var k=document.createElement("span");k.textContent=D,O&&d(e,k,c,O),p.appendChild(k),D="",k._isd_element=c}}}if("contents"in c)for(var F=0;F<c.contents.length;F++)r(e,S,c.contents[F],c);var B=[];if("p"===c.kind&&(u(e,S,B,null),e.rubyReserve&&(!function(e,t){for(var n=0;n<e.length;n++){var i,r,a=document.createElement("ruby"),o=document.createElement("span");o.textContent="​",a.appendChild(o);var s,l=t.rubyReserve[1].toUsedLength(t.w,t.h)+"px";if("both"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&1==e.length)(i=document.createElement("rtc")).style[g]=m?"after":"under",i.textContent="​",i.style.fontSize=l,(r=document.createElement("rtc")).style[g]=m?"before":"over",r.textContent="​",r.style.fontSize=l,a.appendChild(i),a.appendChild(r);else(i=document.createElement("rtc")).textContent="​",i.style.fontSize=l,s="after"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&n>0?m?"after":"tb"===t.bpd||"rl"===t.bpd?"under":"over":m?"before":"tb"===t.bpd||"rl"===t.bpd?"over":"under",i.style[g]=s,a.appendChild(i);for(var u=null,d=0;d<e[n].rbc.length;d++)if("ruby"===e[n].rbc[d].localName){u=e[n].rbc[d];for(var c=0;c<u.style.length;c++)a.style.setProperty(u.style.item(c),u.style.getPropertyValue(u.style.item(c)));break}(u=u||e[n].elements[0].node).parentElement.insertBefore(a,u)}}(B,e),e.rubyReserve=null),(e.ruby||e.rubyReserve)&&(!function(e,t){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].rbc.length;i++){var r;if(!e[n].rbc[i].style[g])r=m?0===n?"before":"after":"tb"===t.bpd||"rl"===t.bpd?0===n?"over":"under":0===n?"under":"over",e[n].rbc[i].style[g]=r}}(B,e),e.ruby=null),e.textEmphasis&&(!function(e,t){for(var n=0;n<e.length;n++)for(var i=0;i<e[n].te.length;i++){var r;if(!e[n].te[i].style[y]||"none"===e[n].te[i].style[y])r="tb"===t.bpd?0===n?"left over":"left under":"rl"===t.bpd?0===n?"right under":"left under":0===n?"left under":"right under",e[n].te[i].style[y]=r}}(B,e),e.textEmphasis=null),e.mra&&(!function(e){for(var t=0;t<e.length-1;t++){var n=e[t].elements.length;if(0!==n&&!1===e[t].br){var i=document.createElement("br"),r=e[t].elements[n-1].node;r.parentElement.insertBefore(i,r.nextSibling)}}}(B),e.mra=null),e.lp&&(!function(e,t,n){if(null===e)return;for(var r=0;r<e.length;r++){var a=e[r].elements.length,o=Math.ceil(t)+"px",s="-"+Math.ceil(t)+"px";if(0!==a){var l=e[r].elements[e[r].start_elem],u=e[r].elements[e[r].end_elem];if(l===u){var d=l.node.getBoundingClientRect();if(0==d.width||0==d.height)continue}"lr"===n.ipd?(l.node.style.marginLeft=s,l.node.style.paddingLeft=o):"rl"===n.ipd?(l.node.style.paddingRight=o,l.node.style.marginRight=s):"tb"===n.ipd&&(l.node.style.paddingTop=o,l.node.style.marginTop=s),"lr"===n.ipd?(i||(u.node.style.marginRight=s),u.node.style.paddingRight=o):"rl"===n.ipd?(u.node.style.paddingLeft=o,i||(u.node.style.marginLeft=s)):"tb"===n.ipd&&(u.node.style.paddingBottom=o,u.node.style.marginBottom=s)}}}(B,e.lp.toUsedLength(e.w,e.h),e),e.lp=null),function(e,t){for(var n=0;n<e.length;n++)for(var i=e[n],r=1;r<i.elements.length;){var s=i.elements[r-1],l=i.elements[r];o(s.node,l.node,t)?i.elements.splice(r,1):r++}for(var u,d,c=[],f=0;f<e.length;f++)for(var h=0;h<e[f].elements.length;h++)(d=a(u=e[f].elements[h].node,c,!1))&&(u.style.backgroundColor=d);for(var p=0;p<c.length;p++)c[p].style.backgroundColor=""}(B,e),e.flg)){var U=l(S.getBoundingClientRect(),e);!function(e,t,n,i){for(var r=Math.sign(n-t),a=0;a<=e.length;a++){var o,s,l,u;if(o=0===a?Math.round(t):a===e.length?Math.round(n):Math.round((e[a-1].after+e[a].before)/2),a>0&&e[a-1])for(l=0;l<e[a-1].elements.length;l++)s=r*(o-(u=e[a-1].elements[l]).after)+"px","lr"===i.bpd?u.node.style.paddingRight=s:"rl"===i.bpd?u.node.style.paddingLeft=s:"tb"===i.bpd&&(u.node.style.paddingBottom=s);if(a<e.length)for(l=0;l<e[a].elements.length;l++)s=r*((u=e[a].elements[l]).before-o)+"px","lr"===i.bpd?u.node.style.paddingLeft=s:"rl"===i.bpd?u.node.style.paddingRight=s:"tb"===i.bpd&&(u.node.style.paddingTop=s)}}(B,U.before,U.after,e),e.flg=null}if("region"===c.kind&&"tb"===e.bpd&&e.enableRollUp&&c.contents.length>0&&"after"===c.styleAttrs[n.byName.displayAlign.qname]){u(e,S,B,null);var j=new s(""===c.id?"_":c.id,B);if(e.currentISDState[j.id]=j,e.previousISDState&&j.id in e.previousISDState&&e.previousISDState[j.id].plist.length>0&&j.plist.length>1&&j.plist[j.plist.length-2].text===e.previousISDState[j.id].plist[e.previousISDState[j.id].plist.length-1].text){var G=p.firstElementChild,V=j.plist[j.plist.length-1].after-j.plist[j.plist.length-1].before;G.style.bottom="-"+V+"px",G.style.transition="transform 0.4s",G.style.position="relative",G.style.transform="translateY(-"+V+"px)"}}}else _(e.errorHandler,"Error processing ISD element kind: "+c.kind)}function a(e,t,n){return e.style.backgroundColor?(n&&!t.includes(e)&&t.push(e),e.style.backgroundColor):"SPAN"===e.parentElement.nodeName||"RUBY"===e.parentElement.nodeName||"RBC"===e.parentElement.nodeName||"RTC"===e.parentElement.nodeName||"RT"===e.parentElement.nodeName?a(e.parentElement,t,!0):void 0}function o(e,t,n){if("SPAN"===e.tagName&&"SPAN"===t.tagName&&e._isd_element===t._isd_element){if(!e._isd_element)return _(n.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;e.textContent+=t.textContent;for(var i=0;i<t.style.length;i++){var r=t.style[i];(r.indexOf("border")>=0||r.indexOf("padding")>=0||r.indexOf("margin")>=0)&&(e.style[r]=t.style[r])}return t.parentElement.removeChild(t),!0}return!1}function s(e,t){this.id=e,this.plist=t}function l(e,t){var n={before:null,after:null,start:null,end:null};return"tb"===t.bpd?(n.before=e.top,n.after=e.bottom,"lr"===t.ipd?(n.start=e.left,n.end=e.right):(n.start=e.right,n.end=e.left)):"lr"===t.bpd?(n.before=e.left,n.after=e.right,n.start=e.top,n.end=e.bottom):"rl"===t.bpd&&(n.before=e.right,n.after=e.left,n.start=e.top,n.end=e.bottom),n}function u(e,t,n,i){if("rt"!==t.localName&&"rtc"!==t.localName){var r,a,o,s,d=t.style.backgroundColor||i;if(0===t.childElementCount)if("span"===t.localName||"rb"===t.localName){var c=l(t.getBoundingClientRect(),e);
vendor: 11,942 bytes, line 73
73if(0!==n.length&&(r=c.before,a=c.after,o=n[n.length-1].before,s=n[n.length-1].after,a<s&&r>o||s<=a&&o>=r)){var f=Math.sign(c.after-c.before),h=Math.sign(c.end-c.start);f*(c.before-n[n.length-1].before)<0&&(n[n.length-1].before=c.before),f*(c.after-n[n.length-1].after)>0&&(n[n.length-1].after=c.after),h*(c.start-n[n.length-1].start)<0&&(n[n.length-1].start=c.start,n[n.length-1].start_elem=n[n.length-1].elements.length),h*(c.end-n[n.length-1].end)>0&&(n[n.length-1].end=c.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:c.before,after:c.after,start:c.start,end:c.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});n[n.length-1].text+=t.textContent,n[n.length-1].elements.push({node:t,bgcolor:d,before:c.before,after:c.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var p=t.firstChild;p;)p.nodeType===Node.ELEMENT_NODE&&(u(e,p,n,d),"ruby"===p.localName||"rtc"===p.localName?n.length>0&&n[n.length-1].rbc.push(p):"span"===p.localName&&p.style[v]&&"none"!==p.style[v]&&n.length>0&&n[n.length-1].te.push(p)),p=p.nextSibling}}function d(e,t,n,i){var r;"none"!==i.style&&("auto"===i.style?t.style[v]="filled":t.style[v]=i.style+" "+i.symbol,("before"===i.position||"after"===i.position)&&(r="tb"===e.bpd?"before"===i.position?"left over":"left under":"rl"===e.bpd?"before"===i.position?"right under":"left under":"before"===i.position?"left under":"right under",t.style[y]=r))}function c(e,t){this.qname=e,this.map=t}e.render=function(e,t,n,i,a,o,s,l,u){var d=i||t.clientHeight,c=a||t.clientWidth;if(null!==e.aspectRatio){var f=d*e.aspectRatio;f>c?d=Math.round(c/e.aspectRatio):c=f}var h=document.createElement("div");h.style.position="relative",h.style.width=c+"px",h.style.height=d+"px",h.style.margin="auto",h.style.top=0,h.style.bottom=0,h.style.left=0,h.style.right=0,h.style.zIndex=0;var p={h:d,w:c,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:o||!1,isd:e,errorHandler:s,previousISDState:l,enableRollUp:u||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(t.appendChild(h),"contents"in e)for(var m=0;m<e.contents.length;m++)r(p,h,e.contents[m],e);return p.currentISDState};for(var f=[new c("http://www.w3.org/ns/ttml#styling backgroundColor",function(e,t,n,i){0!==i[3]&&(t.style.backgroundColor="rgba("+i[0].toString()+","+i[1].toString()+","+i[2].toString()+","+(i[3]/255).toString()+")")}),new c("http://www.w3.org/ns/ttml#styling color",function(e,t,n,i){t.style.color="rgba("+i[0].toString()+","+i[1].toString()+","+i[2].toString()+","+(i[3]/255).toString()+")"}),new c("http://www.w3.org/ns/ttml#styling direction",function(e,t,n,i){t.style.direction=i}),new c("http://www.w3.org/ns/ttml#styling display",function(e,t,n,i){}),new c("http://www.w3.org/ns/ttml#styling displayAlign",function(e,t,n,i){t.style.display="flex",t.style.flexDirection="column","before"===i?t.style.justifyContent="flex-start":"center"===i?t.style.justifyContent="center":"after"===i&&(t.style.justifyContent="flex-end")}),new c("http://www.w3.org/ns/ttml#styling extent",function(e,t,n,i){e.regionH=i.h.toUsedLength(e.w,e.h),e.regionW=i.w.toUsedLength(e.w,e.h);var r=0,a=0,o=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];o&&(r=o[0].toUsedLength(e.w,e.h)+o[2].toUsedLength(e.w,e.h),a=o[1].toUsedLength(e.w,e.h)+o[3].toUsedLength(e.w,e.h)),t.style.height=e.regionH-r+"px",t.style.width=e.regionW-a+"px"}),new c("http://www.w3.org/ns/ttml#styling fontFamily",function(e,t,n,i){for(var r=[],a=0;a<i.length;a++)i[a]=i[a].trim(),"monospaceSerif"===i[a]?(r.push("Courier New"),r.push('"Liberation Mono"'),r.push("Courier"),r.push("monospace")):"proportionalSansSerif"===i[a]?(r.push("Arial"),r.push("Helvetica"),r.push('"Liberation Sans"'),r.push("sans-serif")):"monospace"===i[a]?r.push("monospace"):"sansSerif"===i[a]?r.push("sans-serif"):"serif"===i[a]?r.push("serif"):"monospaceSansSerif"===i[a]?(r.push("Consolas"),r.push("monospace")):"proportionalSerif"===i[a]?r.push("serif"):r.push(i[a]);if(r.length>0){for(var o=[r[0]],s=1;s<r.length;s++)-1==o.indexOf(r[s])&&o.push(r[s]);r=o}t.style.fontFamily=r.join(",")}),new c("http://www.w3.org/ns/ttml#styling shear",function(e,t,n,i){if(0!==i){var r=-.9*i;"tb"===e.bpd?t.style.transform="skewX("+r+"deg)":t.style.transform="skewY("+r+"deg)"}}),new c("http://www.w3.org/ns/ttml#styling fontSize",function(e,t,n,i){t.style.fontSize=i.toUsedLength(e.w,e.h)+"px"}),new c("http://www.w3.org/ns/ttml#styling fontStyle",function(e,t,n,i){t.style.fontStyle=i}),new c("http://www.w3.org/ns/ttml#styling fontWeight",function(e,t,n,i){t.style.fontWeight=i}),new c("http://www.w3.org/ns/ttml#styling lineHeight",function(e,t,n,i){t.style.lineHeight="normal"===i?"normal":i.toUsedLength(e.w,e.h)+"px"}),new c("http://www.w3.org/ns/ttml#styling opacity",function(e,t,n,i){t.style.opacity=i}),new c("http://www.w3.org/ns/ttml#styling origin",function(e,t,n,i){t.style.top=i.h.toUsedLength(e.w,e.h)+"px",t.style.left=i.w.toUsedLength(e.w,e.h)+"px"}),new c("http://www.w3.org/ns/ttml#styling overflow",function(e,t,n,i){t.style.overflow=i}),new c("http://www.w3.org/ns/ttml#styling padding",function(e,t,n,i){var r=[];r[0]=i[0].toUsedLength(e.w,e.h)+"px",r[1]=i[3].toUsedLength(e.w,e.h)+"px",r[2]=i[2].toUsedLength(e.w,e.h)+"px",r[3]=i[1].toUsedLength(e.w,e.h)+"px",t.style.padding=r.join(" ")}),new c("http://www.w3.org/ns/ttml#styling position",function(e,t,n,i){t.style.top=i.h.toUsedLength(e.w,e.h)+"px",t.style.left=i.w.toUsedLength(e.w,e.h)+"px"}),new c("http://www.w3.org/ns/ttml#styling rubyAlign",function(e,t,n,i){t.style.rubyAlign="spaceAround"===i?"space-around":"center"}),new c("http://www.w3.org/ns/ttml#styling rubyPosition",function(e,t,n,i){var r;"before"!==i&&"after"!==i||(r=m?i:"tb"===e.bpd||"rl"===e.bpd?"before"===i?"over":"under":"before"===i?"under":"over",t.parentElement.style[g]=r)}),new c("http://www.w3.org/ns/ttml#styling showBackground",null),new c("http://www.w3.org/ns/ttml#styling textAlign",function(e,t,n,i){var r;r="start"===i?"rl"===e.ipd?"right":"left":"end"===i?"rl"===e.ipd?"left":"right":i,t.style.textAlign=r}),new c("http://www.w3.org/ns/ttml#styling textDecoration",function(e,t,n,i){t.style.textDecoration=i.join(" ").replace("lineThrough","line-through")}),new c("http://www.w3.org/ns/ttml#styling textOutline",function(e,t,n,i){}),new c("http://www.w3.org/ns/ttml#styling textShadow",function(e,t,i,r){var a=i.styleAttrs[n.byName.textOutline.qname];if("none"===r&&"none"===a)t.style.textShadow="";else{var o=[];if("none"!==a){var s="rgba("+a.color[0].toString()+","+a.color[1].toString()+","+a.color[2].toString()+","+(a.color[3]/255).toString()+")";o.push("1px 1px 1px "+s),o.push("-1px 1px 1px "+s),o.push("1px -1px 1px "+s),o.push("-1px -1px 1px "+s)}if("none"!==r)for(var l=0;l<r.length;l++)o.push(r[l].x_off.toUsedLength(e.w,e.h)+"px "+r[l].y_off.toUsedLength(e.w,e.h)+"px "+r[l].b_radius.toUsedLength(e.w,e.h)+"px rgba("+r[l].color[0].toString()+","+r[l].color[1].toString()+","+r[l].color[2].toString()+","+(r[l].color[3]/255).toString()+")");t.style.textShadow=o.join(",")}}),new c("http://www.w3.org/ns/ttml#styling textCombine",function(e,t,n,i){t.style.textCombineUpright=i}),new c("http://www.w3.org/ns/ttml#styling textEmphasis",function(e,t,n,i){}),new c("http://www.w3.org/ns/ttml#styling unicodeBidi",function(e,t,n,i){var r;r="bidiOverride"===i?"bidi-override":i,t.style.unicodeBidi=r}),new c("http://www.w3.org/ns/ttml#styling visibility",function(e,t,n,i){t.style.visibility=i}),new c("http://www.w3.org/ns/ttml#styling wrapOption",function(e,t,n,i){"wrap"===i?"preserve"===n.space?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="normal":"preserve"===n.space?t.style.whiteSpace="pre":t.style.whiteSpace="noWrap"}),new c("http://www.w3.org/ns/ttml#styling writingMode",function(e,t,n,i){"lrtb"===i||"lr"===i||"rltb"===i||"rl"===i?t.style.writingMode="horizontal-tb":"tblr"===i?t.style.writingMode="vertical-lr":"tbrl"!==i&&"tb"!==i||(t.style.writingMode="vertical-rl")}),new c("http://www.w3.org/ns/ttml#styling zIndex",function(e,t,n,i){t.style.zIndex=i}),new c("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(e,t,n,i){e.displayForcedOnlyMode&&!1===i&&(t.style.visibility="hidden")})],h={},p=0;p<f.length;p++)h[f[p].qname]=f[p];var m="webkitRubyPosition"in window.getComputedStyle(document.documentElement),g=m?"webkitRubyPosition":"rubyPosition",v="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",y="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function _(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(29):imscNames,"undefined"==typeof imscStyles?n(40):imscStyles,"undefined"==typeof imscUtils?n(30):imscUtils)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){var e=0;function t(e){for(var t="",n=0;n<e.length;++n){t+=e[n].uchar}return t.length-t.replace(/^\s+/,"").length}function n(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function i(e){return"red"===e?"rgb(255, 0, 0)":"green"===e?"rgb(0, 255, 0)":"blue"===e?"rgb(0, 0, 255)":"cyan"===e?"rgb(0, 255, 255)":"magenta"===e?"rgb(255, 0, 255)":"yellow"===e?"rgb(255, 255, 0)":"white"===e?"rgb(255, 255, 255)":"black"===e?"rgb(0, 0, 0)":e}function r(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?i(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?i(t.background):"transparent")+";":"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function a(e){return e.replace(/^\s+/g,"")}function o(e){return e.replace(/\s+$/g,"")}return{createHTMLCaptionsFromScreen:function(i,s,l,u){var d=null,c=!1,f=-1,h={start:s,end:l,spans:[]},p="style_cea608_white_black",m={},g={},v=[],y=void 0,_=void 0;for(y=0;y<15;++y){var E=u.rows[y],b="",T=null;if(!1===E.isEmpty()){var w=t(E.chars);null===d&&(d={x:w,y1:y,y2:y+1,p:[]}),w!==f&&c&&(d.p.push(h),h={start:s,end:l,spans:[]},d.y2=y,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===m.hasOwnProperty(d.name)?(v.push(d),m[d.name]=d):m[d.name].p.contat(d.p),d={x:w,y1:y,y2:y+1,p:[]});for(var A=0;A<E.chars.length;++A){var S=E.chars[A],x=S.penState;if(null===T||!x.equals(T)){b.trim().length>0&&(h.spans.push({name:p,line:b,row:y}),b="");var M="style_cea608_"+x.foreground+"_"+x.background;x.underline&&(M+="_underline"),x.italics&&(M+="_italics"),g.hasOwnProperty(M)||(g[M]=JSON.parse(JSON.stringify(x))),T=x,p=M}b+=S.uchar}b.trim().length>0&&h.spans.push({name:p,line:b,row:y}),c=!0,f=w}else c=!1,f=-1,d&&(d.p.push(h),h={start:s,end:l,spans:[]},d.y2=y,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===m.hasOwnProperty(d.name)?(v.push(d),m[d.name]=d):m[d.name].p.contat(d.p),d=null)}d&&(d.p.push(h),d.y2=y+1,d.name="region_"+d.x+"_"+d.y1+"_"+d.y2,!1===m.hasOwnProperty(d.name)?(v.push(d),m[d.name]=d):m[d.name].p.contat(d.p),d=null);var R=[];for(y=0;y<v.length;++y){var C=v[y],I="sub_cea608_"+e++,L=document.createElement("div");L.id=I;var O=n(C);L.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+O;var D=document.createElement("div");D.className="paragraph bodyStyle",D.style.cssText=r(i);var P=document.createElement("div");
vendor: 8,636 bytes, line 73
73P.className="cueUniWrapper",P.style.cssText="unicode-bidi: normal; direction: ltr;";for(var N=0;N<C.p.length;++N){var k=C.p[N],F=0;for(_=0;_<k.spans.length;++_){var B=k.spans[_];if(B.line.length>0){if(0!==_&&F!=B.row){var U=document.createElement("br");U.className="lineBreak",P.appendChild(U)}var j=!1;F===B.row&&(j=!0),F=B.row;var G=g[B.name],V=document.createElement("span");V.className="spanPadding "+B.name+" customSpanColor",V.style.cssText=r(i,G),0!==_&&j?_===k.spans.length-1?V.textContent=o(B.line):V.textContent=B.line:k.spans.length>1&&_<k.spans.length-1&&B.row===k.spans[_+1].row?V.textContent=a(B.line):V.textContent=B.line.trim(),P.appendChild(V)}}}D.appendChild(P),L.appendChild(D);var H={bodyStyle:["%",90]};for(var z in g)g.hasOwnProperty(z)&&(H[z]=["%",90]);R.push({type:"html",start:s,end:l,cueHTMLElement:L,cueID:I,cellResolution:[32,15],isFromCEA608:!0,fontSize:H,lineHeight:{},linePadding:{}})}return R}}}o.__dashjs_factory_name="EmbeddedTextHtmlRender",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this.context,t=void 0,n=void 0,i=void 0,a=void 0,o=void 0,s=void 0;function l(e){var t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2===n&&(e+=3600*parseInt(t[0],10)),e}function u(e){var t=e.split(a),n=t[1].split(s);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:d(n)}}function d(e){var t={};return e.forEach(function(e){if(e.split(/:/).length>1){var n=e.split(/:/)[1];n&&-1!=n.search(/%/)&&(n=parseInt(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line=n),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}}),t}function c(e,t){for(var n,i=t,r="",o="";""!==e[i]&&i<e.length;)i++;if((n=i-t)>1)for(var s=0;s<n;s++){if((o=e[t+s]).match(a)){r="";break}r+=o,s!==n-1&&(r+="\n")}else(o=e[t]).match(a)||(r=o);return r}return t={parse:function(e){var t,r=[],s=void 0;if(!e)return r;t=(e=e.split(i)).length,s=-1;for(var d=0;d<t;d++){var f=e[d];if(f.length>0&&"WEBVTT"!==f&&f.match(a)){var h=u(f),p=h.cuePoints,m=h.styles,g=c(e,d+1),v=l(p[0].replace(o,"")),y=l(p[1].replace(o,""));!isNaN(v)&&!isNaN(y)&&v>=s&&y>v?""!==g?(s=v,r.push({start:v,end:y,data:g,styles:m})):n.error("Skipping cue due to empty/malformed cue text"):n.error("Skipping cue due to incorrect cue timing")}}return r}},n=(0,r.default)(e).getInstance().getLogger(t),i=/(?:\r\n|\r|\n)/gm,a=/-->/,o=/(^[\s]+|[\s]+$)/g,s=/\s\b/g,t}o.__dashjs_factory_name="VTTParser",t.default=i.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(1)),r=l(n(3)),a=l(n(2)),o=l(n(5)),s=n(68);function l(e){return e&&e.__esModule?e:{default:e}}function u(){var e=this.context,t=(0,a.default)(e).getInstance(),n=void 0,i=void 0,l=0;function u(){var e="cue_TTML_"+l;return l++,e}return n={parse:function(e,n,r,a,l){var d="",c=[],f=void 0,h=void 0,p=void 0,m={},g={},v="",y="",_={onOpenTag:function(e,t,n){if("image"===t&&"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e){if(!n[" imagetype"]||"PNG"!==n[" imagetype"].value)return void i.warn("smpte-tt imagetype != PNG. Discarded");v=n["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){v&&(g[v]=y.trim()),y="",v=""},onText:function(e){v&&(y+=e)}};if(!e)throw d="no ttml data to parse",new Error(d);m.data=e,t.trigger(o.default.TTML_TO_PARSE,m);var E=(0,s.fromXML)(m.data,function(e){d=e},_);t.trigger(o.default.TTML_PARSED,{ttmlString:m.data,ttmlDoc:E});var b=E.getMediaTimeEvents();for(p=0;p<b.length;p++){var T=(0,s.generateISD)(E,b[p],function(e){d=e});T.contents.some(function(e){return e.contents.length})&&(f=b[p]+n<r?r:b[p]+n)<(h=b[p+1]+n>a?a:b[p+1]+n)&&c.push({start:f,end:h,type:"html",cueID:u(),isd:T,images:l,embeddedImages:g})}if(""!==d)throw i.error(d),new Error(d);return c}},i=(0,r.default)(e).getInstance().getLogger(n),n}u.__dashjs_factory_name="TTMLParser",t.default=i.default.getSingletonFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(3)),r=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=this.context,n=void 0,r=void 0,a=void 0,o=[],s=e;function l(e,t){o=o.filter(function(n){return!((isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e))})}return n={getAllBufferRanges:function(){for(var e=[],t=0;t<o.length;t++){var n=o[t];0===e.length||n.start>e[e.length-1].end?e.push({start:n.start,end:n.end}):e[e.length-1].end=n.end}var i={start:function(t){return e[t].start},end:function(t){return e[t].end}};return Object.defineProperty(i,"length",{get:function(){return e.length}}),i},append:function(e){"InitializationSegment"!==e.segmentType?(o.push(e),o.sort(function(e,t){return e.start-t.start}),a=null):a=e,r.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),s&&s({chunk:e})},remove:l,abort:function(){},discharge:function(e,t){var n=function(e,t){return o.filter(function(n){return(isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e)})}(e,t);return a&&(n.push(a),a=null),l(e,t),n},reset:function(){o=[],a=null,s=null},updateTimestampOffset:function(){},hasDiscontinuitiesAfter:function(){return!1},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},r=(0,i.default)(t).getInstance().getLogger(n),n}o.__dashjs_factory_name="PreBufferSink";var s=r.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(1)),r=l(n(3)),a=l(n(13)),o=l(n(4)),s=l(n(10));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){e=e||{};var t=this.context,n=e.dashMetrics,i=void 0,l=void 0;return i={getMaxIndex:function(e){var i=(0,a.default)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return i;!function(){if(!n||!n.hasOwnProperty("getLatestBufferInfoVO"))throw new Error(o.default.MISSING_CONFIG_ERROR)}();var r=e.getMediaInfo(),u=e.getMediaType(),d=n.getLatestBufferInfoVO(u,!0,s.default.BUFFER_STATE),c=e.getScheduleController(),f=e.getAbrController(),h=e.getStreamInfo(),p=h&&h.manifestInfo?h.manifestInfo.isDynamic:null,m=f.getThroughputHistory(),g=m.getSafeAverageThroughput(u,p),v=m.getAverageLatency(u),y=e.useBufferOccupancyABR();return isNaN(g)||!d||y||f.getAbandonmentStateFor(u)!==s.default.ABANDON_LOAD&&(d.state===s.default.BUFFER_LOADED||p)&&(i.quality=f.getQualityForBitrate(r,g,v),c.setTimeToLoadDelay(0),l.debug("["+u+"] requesting switch to index: ",i.quality,"Average throughput",Math.round(g),"kbps"),i.reason={throughput:g,latency:v}),i},reset:function(){}},l=(0,r.default)(t).getInstance().getLogger(i),i}u.__dashjs_factory_name="ThroughputRule",t.default=i.default.getClassFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(2)),r=d(n(5)),a=d(n(1)),o=d(n(3)),s=d(n(13)),l=d(n(4)),u=d(n(10));function d(e){return e&&e.__esModule?e:{default:e}}function c(e){e=e||{};var t=this.context,n=(0,i.default)(t).getInstance(),a=e.dashMetrics,d=void 0,c=void 0,f=void 0;function h(){f={}}function p(){h()}return d={getMaxIndex:function(e){var n=(0,s.default)(t).create();if(!e||!e.hasOwnProperty("getMediaType"))return n;!function(){if(!a||!a.hasOwnProperty("getCurrentBufferLevel")||!a.hasOwnProperty("getLatestBufferInfoVO"))throw new Error(l.default.MISSING_CONFIG_ERROR)}();var i=e.getMediaType(),r=a.getLatestBufferInfoVO(i,!0,u.default.BUFFER_STATE),o=e.getRepresentationInfo().fragmentDuration;if(!r||!function(e,t){f[e]=f[e]||{};var n=!1;f[e].firstBufferLoadedEvent?n=!0:t&&t.state===u.default.BUFFER_LOADED&&(f[e].firstBufferLoadedEvent=!0,n=!0);return n}(i,r)||!o)return n;if(r.state===u.default.BUFFER_EMPTY)c.debug("["+i+"] Switch to index 0; buffer is empty."),n.quality=0,n.reason="InsufficientBufferRule: Buffer is empty";else{var d=e.getMediaInfo(),h=e.getAbrController(),p=h.getThroughputHistory(),m=a.getCurrentBufferLevel(i,!0),g=p.getAverageThroughput(i),v=p.getAverageLatency(i),y=g*(m/o)*.5;n.quality=h.getQualityForBitrate(d,y,v),n.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return n},reset:function(){h(),n.off(r.default.PLAYBACK_SEEKING,p,d)}},c=(0,o.default)(t).getInstance().getLogger(d),h(),n.on(r.default.PLAYBACK_SEEKING,p,d),d}c.__dashjs_factory_name="InsufficientBufferRule",t.default=a.default.getClassFactory(c)},function(e,t,n){"use strict";
vendor: 4,135 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(13)),r=o(n(1)),a=o(n(3));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=this.context,n=e.mediaPlayerModel,r=e.dashMetrics,o=e.settings,l=void 0,u=void 0,d=void 0,c=void 0,f=void 0;function h(){d={},c={},f=[]}return l={shouldAbandon:function(e){var a=(0,i.default)(t).create(i.default.NO_CHANGE,{name:s.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return a;var l,h,p=e.getMediaInfo(),m=e.getMediaType(),g=e.getCurrentRequest();if(!isNaN(g.index)){l=m,h=g.index,d[l]=d[l]||{},d[l][h]=d[l][h]||{};var v=n.getStableBufferTime();if(r.getCurrentBufferLevel(m,!0)>v)return a;var y=d[m][g.index];if(null===y||null===g.firstByteDate||c.hasOwnProperty(y.id))return a;if(void 0===y.firstByteTime&&(f[m]=[],y.firstByteTime=g.firstByteDate.getTime(),y.segmentDuration=g.duration,y.bytesTotal=g.bytesTotal,y.id=g.index),y.bytesLoaded=g.bytesLoaded,y.elapsedTime=(new Date).getTime()-y.firstByteTime,y.bytesLoaded>0&&y.elapsedTime>0&&function(e,t){f[e]=f[e]||[],f[e].push(t)}(m,Math.round(8*y.bytesLoaded/y.elapsedTime)),f[m].length>=5&&y.elapsedTime>500&&y.bytesLoaded<y.bytesTotal){var _=f[m].reduce(function(e,t){return e+t},0);if(y.measuredBandwidthInKbps=Math.round(_/f[m].length),y.estimatedTimeOfDownload=+(8*y.bytesTotal/y.measuredBandwidthInKbps/1e3).toFixed(2),y.estimatedTimeOfDownload<1.8*y.segmentDuration||0===e.getRepresentationInfo().quality)return a;if(!c.hasOwnProperty(y.id)){var E=e.getAbrController(),b=y.bytesTotal-y.bytesLoaded,T=E.getBitrateList(p),w=E.getQualityForBitrate(p,y.measuredBandwidthInKbps*o.get().streaming.abr.bandwidthSafetyFactor),A=E.getMinAllowedIndexFor(m),S=void 0!==A?Math.max(A,w):w;b>y.bytesTotal*T[S].bitrate/T[E.getQualityFor(m)].bitrate&&(a.quality=S,a.reason.throughput=y.measuredBandwidthInKbps,a.reason.fragmentID=y.id,c[y.id]=y,u.debug("["+m+"] frag id",y.id," is asking to abandon and switch to quality to ",S," measured bandwidth was",y.measuredBandwidthInKbps),delete d[m][y.id])}}else y.bytesLoaded===y.bytesTotal&&delete d[m][y.id]}return a},reset:h},u=(0,a.default)(t).getInstance().getLogger(l),h(),l}s.__dashjs_factory_name="AbandonRequestsRule",t.default=r.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(1)),r=o(n(13)),a=o(n(3));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=void 0,n=void 0;return t={getMaxIndex:function(t){var i=(0,r.default)(e).create();if(!t||!t.hasOwnProperty("getDroppedFramesHistory"))return i;var a=t.getDroppedFramesHistory();if(a){for(var o=a.getFrameHistory(),s=0,l=0,u=r.default.NO_CHANGE,d=1;d<o.length;d++)if(o[d]&&(s=o[d].droppedVideoFrames,(l=o[d].totalVideoFrames)>375&&s/l>.15)){u=d-1,n.debug("index: "+u+" Dropped Frames: "+s+" Total Frames: "+l);break}return(0,r.default)(e).create(u,{droppedFrames:s})}return i}},n=(0,a.default)(e).getInstance().getLogger(t),t}s.__dashjs_factory_name="DroppedFramesRule",t.default=i.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(1)),r=o(n(3)),a=o(n(13));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=void 0,n=void 0;return t={getMaxIndex:function(t){for(var i=t?t.getSwitchHistory():null,r=i?i.getSwitchRequests():[],o=0,s=0,l=0,u=(0,a.default)(e).create(),d=0;d<r.length;d++)if(void 0!==r[d]&&(o+=r[d].drops,s+=r[d].noDrops,l+=r[d].dropSize,o+s>=6&&o/s>.075)){u.quality=d>0&&r[d].drops>0?d-1:d,u.reason={index:u.quality,drops:o,noDrops:s,dropSize:l},n.debug("Switch history rule index: "+u.quality+" samples: "+(o+s)+" drops: "+o);break}return u}},n=(0,r.default)(e).getInstance().getLogger(t),t}s.__dashjs_factory_name="SwitchHistoryRule",t.default=i.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(10)),r=d(n(13)),a=d(n(1)),o=n(9),s=d(n(2)),l=d(n(5)),u=d(n(3));
vendor: 4,531 bytes, line 73
73function d(e){return e&&e.__esModule?e:{default:e}}var c=10;function f(e){e=e||{};var t=this.context,n=e.dashMetrics,a=e.mediaPlayerModel,d=(0,s.default)(t).getInstance(),f=void 0,h=void 0,p=void 0;function m(e,t,n){var i=n.reduce(function(e,t,i){return t>n[e]?i:e},0);if(0===i)return null;var r=Math.max(e,c+2*t.length),a=(n[i]-1)/(r/c-1);return{gp:a,Vp:c/a}}function g(e){var t={},n=e.getMediaInfo().bitrateList.map(function(e){return e.bandwidth}),i=function(e){return e.map(function(e){return Math.log(e)})}(n);i=i.map(function(e){return e-i[0]+1});var r=a.getStableBufferTime(),o=m(r,n,i);return o?(t.state=1,t.bitrates=n,t.utilities=i,t.stableBufferTime=r,t.Vp=o.Vp,t.gp=o.gp,t.lastQuality=0,v(t)):t.state=0,t}function v(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function y(e,t){var i=a.getStableBufferTime();if(e.stableBufferTime!==i){var r=m(i,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var o=n.getCurrentBufferLevel(t,!0),s=o+e.placeholderBuffer;s-=c,s*=r.Vp/e.Vp,s+=c,e.stableBufferTime=i,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,s-o)}}}function _(e,t){return e.Vp*(e.utilities[t]+e.gp)}function E(e,t){for(var n=e.bitrates[t],i=e.utilities[t],r=0,a=t-1;a>=0;--a)if(e.utilities[a]<e.utilities[t]){var o=e.bitrates[a],s=e.utilities[a],l=e.Vp*(e.gp+(n*s-o*i)/(n-o));r=Math.max(r,l)}return r}function b(){for(var e in p)p.hasOwnProperty(e)&&2===p[e].state&&(p[e].placeholderBuffer=0)}function T(){for(var e in p)if(p.hasOwnProperty(e)){var t=p[e];0!==t.state&&(t.state=1,v(t))}}function w(){}function A(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=p[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,x(t,e.chunk.mediaInfo.type)}}}function S(e){if(e&&e.metric===i.default.HTTP_REQUEST&&e.value&&e.value.type===o.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=p[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),x(t,e.mediaType))}}function x(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var i=n.getCurrentBufferLevel(t,!0)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=_(e,e.lastQuality),a=Math.max(0,r-i);e.placeholderBuffer=Math.min(a,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function M(e){if(e){var t=p[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function R(e){if(e){var t=p[e.mediaType];if(t&&0!==t.state){var i=n.getCurrentBufferLevel(e.mediaType,!0),r=void 0;r=t.abrQuality>0?E(t,t.abrQuality):c;var a=Math.max(0,r-i);t.placeholderBuffer=Math.min(t.placeholderBuffer,a)}}}function C(){p={}}return f={getMaxIndex:function(e){var i=(0,r.default)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return i;var a=e.getMediaInfo(),o=e.getMediaType(),s=e.getScheduleController(),l=e.getStreamInfo(),u=e.getAbrController(),d=u.getThroughputHistory(),c=l?l.id:null,f=l&&l.manifestInfo&&l.manifestInfo.isDynamic,m=e.useBufferOccupancyABR();if(i.reason=i.reason||{},!m)return i;s.setTimeToLoadDelay(0);var b=function(e){var t=e.getMediaType(),n=p[t];return n?0!==n.state&&y(n,t):(n=g(e),p[t]=n),n}(e);if(0===b.state)return i;var T=n.getCurrentBufferLevel(o,!0),w=d.getAverageThroughput(o,f),A=d.getSafeAverageThroughput(o,f),S=d.getAverageLatency(o),x=void 0;if(i.reason.state=b.state,i.reason.throughput=w,i.reason.latency=S,isNaN(w))return i;switch(b.state){case 1:x=u.getQualityForBitrate(a,A,S),i.quality=x,i.reason.throughput=A,b.placeholderBuffer=Math.max(0,E(b,x)-T),b.lastQuality=x,!isNaN(b.lastSegmentDurationS)&&T>=b.lastSegmentDurationS&&(b.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var i=.001*(n-e.last
vendor: 8,642 bytes, line 73
73CallTimeMs);e.placeholderBuffer+=Math.max(0,i)}}else{var r=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,r)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,y(e,t)}(b,o),x=function(e,t){for(var n=e.bitrates.length,i=NaN,r=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]+e.gp)-t)/e.bitrates[a];(isNaN(r)||o>=r)&&(r=o,i=a)}return i}(b,T+b.placeholderBuffer);var M=u.getQualityForBitrate(a,A,S);x>b.lastQuality&&x>M&&(x=Math.max(M,b.lastQuality));var R=Math.max(0,T+b.placeholderBuffer-_(b,x));R<=b.placeholderBuffer?(b.placeholderBuffer-=R,R=0):(R-=b.placeholderBuffer,b.placeholderBuffer=0,x<u.getTopQualityIndexFor(o,c)?s.setTimeToLoadDelay(1e3*R):R=0),i.quality=x,i.reason.throughput=w,i.reason.latency=S,i.reason.bufferLevel=T,i.reason.placeholderBuffer=b.placeholderBuffer,i.reason.delay=R,b.lastQuality=x;break;default:h.debug("BOLA ABR rule invoked in bad state."),i.quality=u.getQualityForBitrate(a,A,S),i.reason.state=b.state,i.reason.throughput=A,i.reason.latency=S,b.state=1,v(b)}return i},reset:function(){C(),d.off(l.default.BUFFER_EMPTY,b,f),d.off(l.default.PLAYBACK_SEEKING,T,f),d.off(l.default.PERIOD_SWITCH_STARTED,w,f),d.off(l.default.MEDIA_FRAGMENT_LOADED,A,f),d.off(l.default.METRIC_ADDED,S,f),d.off(l.default.QUALITY_CHANGE_REQUESTED,M,f),d.off(l.default.FRAGMENT_LOADING_ABANDONED,R,f)}},h=(0,u.default)(t).getInstance().getLogger(f),C(),d.on(l.default.BUFFER_EMPTY,b,f),d.on(l.default.PLAYBACK_SEEKING,T,f),d.on(l.default.PERIOD_SWITCH_STARTED,w,f),d.on(l.default.MEDIA_FRAGMENT_LOADED,A,f),d.on(l.default.METRIC_ADDED,S,f),d.on(l.default.QUALITY_CHANGE_REQUESTED,M,f),d.on(l.default.FRAGMENT_LOADING_ABANDONED,R,f),f}f.__dashjs_factory_name="BolaRule",t.default=a.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=(e=e||{}).abrController,n=e.switchHistory,i=e.droppedFramesHistory,r=e.currentRequest,a=e.useBufferOccupancyABR,o=e.streamProcessor?e.streamProcessor.getScheduleController():null,s=e.streamProcessor?e.streamProcessor.getRepresentationInfo():null;function l(){return s?s.mediaInfo:null}return{getMediaType:function(){var e=l();return e?e.type:null},getMediaInfo:l,getDroppedFramesHistory:function(){return i},getCurrentRequest:function(){return r},getSwitchHistory:function(){return n},getStreamInfo:function(){var e=l();return e?e.streamInfo:null},getScheduleController:function(){return o},getAbrController:function(){return t},getRepresentationInfo:function(){return s},useBufferOccupancyABR:function(){return a}}}o.__dashjs_factory_name="RulesContext",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(13));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=[],t=[];return{push:function(n){n.newValue===r.default.NO_CHANGE&&(n.newValue=n.oldValue),e[n.oldValue]||(e[n.oldValue]={noDrops:0,drops:0,dropSize:0});var i=n.newValue-n.oldValue,a=i<0?1:0,o=a?-i:0,s=a?0:1;if(e[n.oldValue].drops+=a,e[n.oldValue].dropSize+=o,e[n.oldValue].noDrops+=s,t.push({idx:n.oldValue,noDrop:s,drop:a,dropSize:o}),t.length>8){var l=t.shift();e[l.idx].drops-=l.drop,e[l.idx].dropSize-=l.dropSize,e[l.idx].noDrops-=l.noDrop}},getSwitchRequests:function(){return e},reset:function(){e=[],t=[]}}}o.__dashjs_factory_name="SwitchRequestHistory";var s=i.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){var e=[],t=0,n=0;return{push:function(i,r){var a=r&&r.droppedVideoFrames?r.droppedVideoFrames:0,o=r&&r.totalVideoFrames?r.totalVideoFrames:0,s=a-t;t=a;var l=o-n;n=o,isNaN(i)||(e[i]?(e[i].droppedVideoFrames+=s,e[i].totalVideoFrames+=l):e[i]={droppedVideoFrames:s,totalVideoFrames:l})},getFrameHistory:function(){return e},reset:function(i){e=[],t=i.droppedVideoFrames,n=i.totalVideoFrames}}}o.__dashjs_factory_name="DroppedFramesHistory";var s=a.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(4)),r=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e=e||{}).settings,n=void 0,r=void 0,a=void 0,o=void 0,s=void 0;function l(e,t,n,i){var r=Math.pow(.5,n/i.fast);e.fastEstimate=(1-r)*t+r*e.fastEstimate;var a=Math.pow(.5,n/i.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function u(e,l,u){return t.get().streaming.abr.movingAverageMethod!==i.default.MOVING_AVERAGE_SLIDING_WINDOW?function(e,t){var n=e?s.throughputHalfLife:s.latencyHalfLife,i=e?a[t]:o[t];if(!i||i.totalWeight<=0)return NaN;var r=i.fastEstimate/(1-Math.pow(.5,i.totalWeight/n.fast)),l=i.slowEstimate/(1-Math.pow(.5,i.totalWeight/n.slow));return e?Math.min(r,l):Math.max(r,l)}(e,l):function(e,t,i){var a=function(e,t,i){var a=void 0,o=void 0;if(e?(a=n[t],o=i?3:4):(a=r[t],o=4),a){if(o>=a.length)o=a.length;else if(e)for(var s=1;s<o;++s){var l=a[s]/a[s-1];if((l>=1.3||l<=1/1.3)&&(o+=1)===a.length)break}}else o=0;return o}(e,t,i),o=e?n:r,s=o[t];if(0===a||!s||0===s.length)return NaN;return(s=s.slice(-a)).reduce(function(e,t){return e+t})/s.length}(e,l,u)}function d(e,t){return u(!0,e,t)}function c(e){n[e]=n[e]||[],r[e]=r[e]||[],a[e]=a[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},o[e]=o[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function f(){n={},r={},a={},o={}}var h={push:function(e,u,d){if(u.trace&&u.trace.length){var f=u.tresponse.getTime()-u.trequest.getTime()||1,h=u._tfinish.getTime()-u.tresponse.getTime()||1,p=u.trace.reduce(function(e,t){return e+t.b[0]},0),m=void 0;m=t.get().streaming.lowLatencyEnabled?u.trace.reduce(function(e,t){return e+t.d},0):d?h:f+h;var g=Math.round(8*p/m);if(c(e),function(e,n,r){return e===i.default.VIDEO?r<t.get().streaming.cacheLoadThresholds[i.default.VIDEO]:e===i.default.AUDIO?r<t.get().streaming.cacheLoadThresholds[i.default.AUDIO]:void 0}(e,0,h)){if(n[e].length>0&&!n[e].hasCachedEntries)return;n[e].hasCachedEntries=!0}else n[e]&&n[e].hasCachedEntries&&function(e){delete n[e],delete r[e],delete a[e],delete o[e],c(e)}(e);n[e].push(g),n[e].length>20&&n[e].shift(),r[e].push(f),r[e].length>20&&r[e].shift(),l(a[e],g,.001*h,s.throughputHalfLife),l(o[e],f,1,s.latencyHalfLife)}},getAverageThroughput:d,getSafeAverageThroughput:function(e,n){var i=d(e,n);return isNaN(i)||(i*=t.get().streaming.abr.bandwidthSafetyFactor),i},getAverageLatency:function(e){return u(!1,e)},reset:f};return s={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},f(),h}o.__dashjs_factory_name="ThroughputHistory",t.default=r.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(4)),r=s(n(1)),a=s(n(65)),o=s(n(152));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){e=e||{};var t,n=this.context,r=void 0;function s(){return r.getBuffer()}return t={getBufferControllerType:function(){return r.getBufferControllerType()},initialize:function(e,t){return r.initialize(e,t)},createBuffer:function(e){return r.createBuffer(e)},getType:function(){return r.getType()},getStreamProcessor:function(){r.getStreamProcessor()},setSeekStartTime:function(e){r.setSeekStartTime(e)},getBuffer:s,setBuffer:function(e){r.setBuffer(e)},getBufferLevel:function(){return r.getBufferLevel()},setMediaSource:function(e){r.setMediaSource(e)},getMediaSource:function(){return r.getMediaSource()},getIsBufferingCompleted:function(){return r.getIsBufferingCompleted()},getIsPruningInProgress:function(){return r.getIsPruningInProgress()},dischargePreBuffer:function(){return r.dischargePreBuffer()},switchInitData:function(e,t){r.switchInitData(e,t)},getRangeAt:function(e){return r.getRangeAt(e)},reset:function(e){r.reset(e)},updateTimestampOffset:function(e){var t=s();t.timestampOffset===e||isNaN(e)||(t.timestampOffset=e)}},r=e.type===i.default.FRAGMENTED_TEXT?(0,a.default)(n).create({type:e.type,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,manifestModel:e.manifestModel,errHandler:e.errHandler,streamController:e.streamController,mediaController:e.mediaController,adapter:e.adapter,textController:e.textController,abrController:e.abrController,playbackController:e.playbackController,streamProcessor:e.streamProcessor,settings:e.settings}):(0,o.default)(n).create({type:e.type,mimeType:e.mimeType,errHandler:e.errHandler,streamProcessor:e.streamProcessor}),t}l.__dashjs_factory_name="TextBufferController",t.default=r.default.getClassFactory(l)},function(e,t,n){"use strict";
vendor: 3,464 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i=f(n(4)),r=f(n(2)),a=f(n(5)),o=f(n(1)),s=f(n(47)),l=f(n(66)),u=f(n(37)),d=f(n(7)),c=f(n(8));function f(e){return e&&e.__esModule?e:{default:e}}var h="NotFragmentedTextBufferController";function p(e){e=e||{};var t=this.context,n=(0,r.default)(t).getInstance(),o=(0,u.default)(t).getInstance(),f=e.errHandler,p=e.type,m=e.mimeType,g=e.streamProcessor,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0;function w(e){E=e}function A(e){if(e.sender.getType()===g.getType()&&!e.error){var t=e.sender.getStreamId(),i=e.sender.getCurrentRepresentation();T.extract(t,i?i.id:null)||n.trigger(a.default.TIMED_TEXT_REQUESTED,{index:0,sender:e.sender})}}function S(e){e.fragmentModel===g.getFragmentModel()&&e.chunk.bytes&&(T.save(e.chunk),b.append(e.chunk),n.trigger(a.default.STREAM_COMPLETED,{request:e.request,fragmentModel:e.fragmentModel}))}return v={getBufferControllerType:function(){return h},initialize:function(e){w(e),T=(0,s.default)(t).getInstance()},createBuffer:function(e){try{if(b=(0,l.default)(t).create(E,e),!_){var n=b.getBuffer();n.hasOwnProperty(i.default.INITIALIZE)&&n.initialize(m,g),_=!0}return b}catch(t){if(e&&(e.isText||-1!==e.codec.indexOf('codecs="stpp')||-1!==e.codec.indexOf('codecs="wvtt')))try{b=o.getTextSourceBuffer()}catch(e){f.error(new d.default(c.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,c.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+p+" : "+e.message))}else f.error(new d.default(c.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,c.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+p))}},getType:function(){return p},getStreamProcessor:function(){return g},setSeekStartTime:function(){},getBuffer:function(){return b},getBufferLevel:function(){return 0},setMediaSource:w,getMediaSource:function(){return E},getIsBufferingCompleted:function(){return y},getIsPruningInProgress:function(){return!1},dischargePreBuffer:function(){},switchInitData:function(e,t){T.extract(e,t)||n.trigger(a.default.TIMED_TEXT_REQUESTED,{index:0,sender:v})},getRangeAt:function(){return null},reset:function(e){n.off(a.default.DATA_UPDATE_COMPLETED,A,v),n.off(a.default.INIT_FRAGMENT_LOADED,S,v),!e&&b&&(b.abort(),b.reset(),b=null)},updateTimestampOffset:function(e){b.timestampOffset===e||isNaN(e)||(b.timestampOffset=e)}},_=!1,E=null,y=!1,n.on(a.default.DATA_UPDATE_COMPLETED,A,v),n.on(a.default.INIT_FRAGMENT_LOADED,S,v),v}p.__dashjs_factory_name=h,t.default=o.default.getClassFactory(p)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=m(n(4)),r=m(n(10)),a=n(48),o=m(n(154)),s=m(n(155)),l=m(n(28)),u=m(n(2)),d=m(n(5)),c=m(n(1)),f=m(n(3)),h=m(n(46)),p=m(n(156));function m(e){return e&&e.__esModule?e:{default:e}}function g(e){e=e||{};var t=this.context,n=(0,u.default)(t).getInstance(),c=e.adapter,m=e.dashMetrics,g=e.timelineConverter,v=e.mediaPlayerModel,y=e.abrController,_=e.playbackController,E=e.streamController,b=e.textController,T=e.type,w=e.streamProcessor,A=e.mediaController,S=e.settings,x=void 0,M=void 0,R=void 0,C=void 0,I=void 0,L=void 0,O=void 0,D=void 0,P=void 0,N=void 0,k=void 0,F=void 0,B=void 0,U=void 0,j=void 0,G=void 0,V=void 0,H=void 0,z=void 0,W=void 0,q=void 0,Y=void 0;function K(){C&&!w.isBufferingCompleted()?(M.debug("Schedule Controller starts"),we(),L=!1,I&&(I=!1),Z(0)):M.warn("Start denied to Schedule Controller")}function X(){L||(M.debug("Schedule Controller stops"),L=!0,clearTimeout(P))}function Q(){var e=w.getBufferController();
73if(L||O||!e||_.isPaused()&&!S.get().streaming.scheduleWhilePaused||!(T!==i.default.FRAGMENTED_TEXT&&T!==i.default.TEXT||b.isTextEnabled()))M.debug("Schedule stop!");else if(e.getIsBufferingCompleted())M.debug("Schedule stop because buffering is completed!");else{!function(){var e=_.getTime(),t=1.5;if(isNaN(C.fragmentDuration)){var n=m.getLatestBufferInfoVO(C.mediaInfo.type,!0,r.default.SCHEDULING_INFO);t=n?1.5*n.duration:1.5}var i=R.getRequests({state:l.default.FRAGMENT_MODEL_EXECUTED,time:e+t,threshold:0})[0];if(i&&-1===G.indexOf(i)&&!c.getIsTextTrack(T)){var a=S.get().streaming.fastSwitchEnabled,o=w.getBufferLevel(),s=y.getAbandonmentStateFor(T),u=!A.isCurrentTrack(i.mediaInfo)&&A.getSwitchMode(i.mediaInfo.type)===h.default.TRACK_SWITCH_MODE_NEVER_REPLACE,d=i.quality<C.quality;a&&(u||d)&&o>=t&&s!==r.default.ABANDON_LOAD?(te(i),Y=!0,M.debug("Reloading outdated fragment at index: ",i.index)):i.quality>C.quality&&!H&&Ee(_.getTime()+o)}}();var t=G.length>0,n=w.getStreamInfo();if(H||isNaN(j)||V||t||function(e,t){U[t]=U[t]||{};var n=y.getTopQualityIndexFor(e,t);return U[t][e]!=n&&(M.info("Top quality "+e+" index has changed from "+U[t][e]+" to "+n),U[t][e]=n,!0)}(C.mediaInfo.type,n.id)||k.execute(w,E.isTrackTypePresent(i.default.VIDEO))){$(!0),!t&&q&&y.checkPlaybackQuality(T),function(){if(C.quality===j&&!V||H){var e=G.shift();if(e&&e.isInitializationRequest())w.switchInitData(e.representationId),q=!1;else{var t=void 0;w.getBufferController().getIsPruningInProgress()||(t=F.execute(w,N,e),Ee(NaN),t&&!e&&(isNaN(t.startTime+t.duration)||w.setIndexHandlerTime(t.startTime+t.duration),t.delayLoadingTime=(new Date).getTime()+D,be(0)),!t&&n.manifestInfo&&n.manifestInfo.isDynamic&&M.debug("Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling.")),t?(M.debug("Next fragment request url is "+t.url),R.executeRequest(t)):($(!1),Z(S.get().streaming.lowLatencyEnabled?100:500)),q=!0}}else M.debug("Quality has changed, get init request for representationid = "+C.id),V?(H=A.getSwitchMode(T)===h.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,M.debug("Switch track has been asked, get init request for "+T+" with representationid = "+C.id+"bufferResetInProgress = "+H),w.switchInitData(C.id,H),V=!1):w.switchInitData(C.id),j=C.quality,q=!1}()}else Z(500)}}function Z(e){clearTimeout(P),P=setTimeout(Q,e)}function J(e){e.sender&&e.sender.getStreamProcessor()===w&&ee(C.quality)}function $(e){O!==e?O=e:M.debug("isFragmentProcessingInProgress is already equal to",e)}function ee(e){var t=w.getInitRequest(e);t&&($(!0),R.executeRequest(t))}function te(e){G.push(e)}function ne(e){if(T===e.mediaType&&w.getStreamInfo().id===e.streamInfo.id){if(null==(C=w.getRepresentationInfo(e.newQuality)))throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");Te(new Date,a.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),we()}}function ie(e){if(_&&R){var t=R.getRequests({state:l.default.FRAGMENT_MODEL_EXECUTED,time:_.getTime(),threshold:0})[0];t&&_.getTime()>=t.startTime&&((!B.mediaInfo||t.mediaInfo.type===B.mediaInfo.type&&t.mediaInfo.id!==B.mediaInfo.id)&&e&&n.trigger(d.default.TRACK_CHANGE_RENDERED,{mediaType:T,oldMediaInfo:B.mediaInfo,newMediaInfo:t.mediaInfo}),t.quality===B.quality&&t.adaptationIndex===B.adaptationIndex||!e||n.trigger(d.default.QUALITY_CHANGE_RENDERED,{mediaType:T,oldQuality:B.quality,newQuality:t.quality}),B={mediaInfo:t.mediaInfo,quality:t.quality,adaptationIndex:t.adaptationIndex})}}
vendor: 10,698 bytes, line 73
73function re(e){e.error||e.sender.getType()!==w.getType()||(C=c.convertDataToRepresentationInfo(e.currentRepresentation))}function ae(e){e.streamInfo&&w.getStreamInfo().id===e.streamInfo.id&&(C=w.getRepresentationInfo(),I&&(_.getIsDynamic()?(g.setTimeSyncCompleted(!0),function(){if(W){var e=W.getLiveEdge(w.getRepresentationInfo()),t=e-_.computeLiveDelay(C.fragmentDuration,C.mediaInfo.streamInfo.manifestInfo.DVRWindowSize),n=w.getFragmentRequest(C,t,{ignoreIsFinished:!0});if(n)if(S.get().streaming.lowLatencyEnabled){var i=n.duration<v.getLiveDelay()?n.startTime:n.startTime+n.duration-v.getLiveDelay();_.setLiveStartTime(i)}else _.setLiveStartTime(n.startTime);else M.debug("setLiveEdgeSeekTarget : getFragmentRequest returned undefined request object");Ee(_.getStreamStartTime(!1,e)),w.getBufferController().setSeekStartTime(N),N>C.mediaInfo.streamInfo.start+C.mediaInfo.streamInfo.duration&&_.seek(N),m.updateManifestUpdateInfo({currentTime:N,presentationStartTime:e,latency:e-N,clientTimeOffset:g.getClientTimeOffset()})}}()):(Ee(_.getStreamStartTime(!1)),w.getBufferController().setSeekStartTime(N))),L&&K())}function oe(e){e.fragmentModel===R&&(X(),$(!1),M.info("Stream is complete"))}function se(e){e.sender===R&&(M.info("OnFragmentLoadingCompleted - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),c.getIsTextTrack(T)&&$(!1),e.error&&e.request.serviceLocation&&!L&&(te(e.request),$(!1),Z(0)),H&&(z=e.request))}function le(){ie(!0)}function ue(e){if(e.sender.getStreamProcessor()===w)if(H&&!isNaN(e.startTime)&&(H=!1,R.addExecutedRequest(z)),$(!1),Y&&!isNaN(e.startTime)){var t=_.getTime(),n=e.startTime+C.fragmentDuration,i=1.5*C.fragmentDuration;Z(t+i>=n?0:1e3*(n-(t+i))),Y=!1}else Z(0)}function de(e){e.streamProcessor===w&&(M.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),_.isSeeking()||V||(M.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),te(e.request)),$(!1),Z(0))}function ce(e){e.sender.getType()===w.getType()&&e.sender.getStreamId()===w.getStreamInfo().id&&X()}function fe(e){if(e.sender.getStreamProcessor()===w){var t=w.getStreamInfo();t&&(e.unintended?R.removeExecutedRequestsAfterTime(e.from):R.syncExecutedRequestsWithBufferedRange(w.getBufferController().getBuffer().getAllBufferRanges(),t.duration)),e.hasEnoughSpaceToAppend&&L&&K()}}function he(e){e.sender.getStreamProcessor()!==w||e.state!==r.default.BUFFER_EMPTY||_.isSeeking()||(M.info("Buffer is empty! Stalling!"),Te(new Date,a.PlayListTrace.REBUFFERING_REASON))}function pe(e){e.sender.getStreamProcessor()===w&&(X(),$(!1))}function me(){R.abortRequests(),X()}function ge(e){var t=w.getStreamInfo(),n=t?t.id:null;e.sender.getStreamId()===n&&b.isTextEnabled()&&ee(e.index)}function ve(){!L&&S.get().streaming.scheduleWhilePaused||K()}function ye(e){Ee(e.seekTime),be(0),L&&K();var t=C.DVRWindow&&_?C.DVRWindow.end-_.getTime():NaN;m.updateManifestUpdateInfo({latency:t}),O?(M.debug("onPlaybackSeeking, call fragmentModel.abortRequests in order to seek quicker"),R.abortRequests()):Z(0)}function _e(e){m.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function Ee(e){N=e}function be(e){D=e}function Te(e,t){m.pushPlayListTraceMetrics(e,t)}function we(){if(C){var e=_.getPlaybackRate();m.createPlaylistTraceMetrics(C.id,1e3*_.getTime(),null!==e?e.toString():null)}}function Ae(){q=!0,O=!1,D=0,N=NaN,I=!0,j=NaN,B={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},U={},G=[],L=!0,V=!1,H=!1,z=null,Y=!1}return x={initialize:function(){R=w.getFragmentModel(),k=(0,o.default)(t).create({abrController:y,dashMetrics:m,mediaPlayerModel:v,textController:b,settings:S}),F=(0,s.default)(t).create({textController:b,playbackController:_}),c.getIsTextTrack(e.mimeType)&&n.on(d.default.TIMED_TEXT_REQUESTED,ge,this),n.on(d.default.QUALITY_CHANGE_REQUESTED,ne,this),n.on(d.default.DATA_UPDATE_STARTED,ce,this),n.on(d.default.DATA_UPDATE_COMPLETED,re,this),n.on(d.default.FRAGMENT_LOADING_COMPLETED,se,this),n.on(d.default.STREAM_COMPLETED,oe,this),n.on(d.default.STREAM_INITIALIZED,ae,this),n.on(d.default.BUFFER_LEVEL_STATE_CHANGED,he,this),n.on(d.default.BUFFER_CLEARED,fe,this),n.on(d.default.BYTES_APPENDED_END_FRAGMENT,ue,this),n.on(d.default.INIT_REQUESTED,J,this),n.on(d.default.QUOTA_EXCEEDED,pe,this),n.on(d.default.PLAYBACK_SEEKING,ye,this),n.on(d.default.PLAYBACK_STARTED,ve,this),n.on(d.default.PLAYBACK_RATE_CHANGED,_e,this),n.on(d.default.PLAYBACK_TIME_UPDATED,le,this),n.on(d.default.URL_RESOLUTION_FAILED,me,this),n.on(d.default.FRAGMENT_LOADING_ABANDONED,de,this)},getType:function(){return T},setSeekTarget:Ee,setTimeToLoadDelay:be,replaceRequest:te,switchTrackAsked:function(){V=!0},isStarted:function(){return!1===L},start:K,stop:X,reset:function(){n.off(d.default.DATA_UPDATE_STARTED,ce,this),n.off(d.default.DATA_UPDATE_COMPLETED,re,this),n.off(d.default.BUFFER_LEVEL_STATE_CHANGED,he,this),n.off(d.default.QUALITY_CHANGE_REQUESTED,ne,this),n.off(d.default.FRAGMENT_LOADING_COMPLETED,se,this),n.off(d.default.STREAM_COMPLETED,oe,this),n.off(d.default.STREAM_INITIALIZED,ae,this),n.off(d.default.QUOTA_EXCEEDED,pe,this),n.off(d.default.BYTES_APPENDED_END_FRAGMENT,ue,this),n.off(d.default.BUFFER_CLEARED,fe,this),n.off(d.default.INIT_REQUESTED,J,this),n.off(d.default.PLAYBACK_RATE_CHANGED,_e,this),n.off(d.default.PLAYBACK_SEEKING,ye,this),n.off(d.default.PLAYBACK_STARTED,ve,this),n.off(d.default.PLAYBACK_TIME_UPDATED,le,this),n.off(d.default.URL_RESOLUTION_FAILED,me,this),n.off(d.default.FRAGMENT_LOADING_ABANDONED,de,this),c.getIsTextTrack(T)&&n.off(d.default.TIMED_TEXT_REQUESTED,ge,this),X(),ie(!1),Ae(),W&&(W.reset(),W=null)},getBufferTarget:function(){return k.getBufferTarget(w,E.isTrackTypePresent(i.default.VIDEO))},finalisePlayList:function(e,t){Te(e,t)}},M=(0,f.default)(t).getInstance().getLogger(x),_&&_.getIsDynamic()&&(W=(0,p.default)(t).create({timelineConverter:g})),Ae(),x}g.__dashjs_factory_name="ScheduleController",t.default=c.default.getClassFactory(g)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(4)),r=o(n(1)),a=o(n(10));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=(e=e||{}).dashMetrics,n=e.mediaPlayerModel,r=e.textController,o=e.abrController,s=e.settings;function l(e,l){var u=NaN;if(!e)return u;var d=e.getType(),c=e.getRepresentationInfo();if(d===i.default.FRAGMENTED_TEXT)if(r.isTextEnabled())if(isNaN(c.fragmentDuration)){var f=t.getLatestBufferInfoVO(i.default.FRAGMENTED_TEXT,!0,a.default.SCHEDULING_INFO);u=f?f.duration:0}else u=c.fragmentDuration;else u=0;else if(d===i.default.AUDIO&&l){var h=t.getCurrentBufferLevel(i.default.VIDEO,!0);u=isNaN(c.fragmentDuration)?h:Math.max(h,c.fragmentDuration)}else{var p=c.mediaInfo.streamInfo;if(o.isPlayingAtTopQuality(p))u=p.manifestInfo.duration>=s.get().streaming.longFormContentDurationThreshold?s.get().streaming.bufferTimeAtTopQualityLongForm:s.get().streaming.bufferTimeAtTopQuality;else u=n.getStableBufferTime()}return u}return{execute:function(e,n){return!e||t.getCurrentBufferLevel(e.getType(),!0)<l(e,n)},getBufferTarget:l}}s.__dashjs_factory_name="BufferLevelRule",t.default=r.default.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(4)),r=s(n(3)),a=s(n(1)),o=s(n(17));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){e=e||{};var t=this.context,n=e.textController,a=e.playbackController,s=void 0;return s={execute:function(e,t,r){if(!e)return null;var s=e.getRepresentationInfo(),l=e.getType(),u=!isNaN(t),d=e.getBufferController(),c=a.getNormalizedTime(),f=u?t:e.getIndexHandlerTime(),h=!1,p=void 0;if(isNaN(f)||l===i.default.FRAGMENTED_TEXT&&!n.isTextEnabled())return null;if(d){var m=d.getRangeAt(f),g=d.getRangeAt(c),v=d.getBuffer().hasDiscontinuitiesAfter(c);null===m&&null===g||u||(!m||g&&g.start!=m.start&&g.end!=m.end)&&(v&&l!==i.default.FRAGMENTED_TEXT&&(e.getFragmentModel().removeExecutedRequestsAfterTime(g.end),h=!0),m=g)}if(r)f=r.startTime+r.duration/2,p=e.getFragmentRequest(s,f,{timeThreshold:0,ignoreIsFinished:!0});else for(p=e.getFragmentRequest(s,u||h?f:void 0,{keepIdx:!u&&!h});p&&p.action!==o.default.ACTION_COMPLETE&&e.getFragmentModel().isFragmentLoaded(p);)p=e.getFragmentRequest(s);return p}},(0,r.default)(t).getInstance().getLogger(s),s}l.__dashjs_factory_name="NextFragmentRequestRule",t.default=a.default.getClassFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e=e||{}).timelineConverter;return{getLiveEdge:function(e){!function(){if(!t||!t.hasOwnProperty("getExpectedLiveEdge"))throw new Error(r.default.MISSING_CONFIG_ERROR)}();var n=e.DVRWindow?e.DVRWindow.end:0,i=n;return e.useCalculatedLiveEdgeTime&&(i=t.getExpectedLiveEdge(),t.setClientTimeOffset(i-n)),i},reset:function(){t=null}}}o.__dashjs_factory_name="LiveEdgeFinder",t.default=i.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(4)),r=d(n(8)),a=d(n(11)),o=d(n(7)),s=d(n(2)),l=d(n(5)),u=d(n(1));function d(e){return e&&e.__esModule?e:{default:e}}function c(){var e=this.context,t=(0,s.default)(e).getInstance(),n=void 0,u=void 0,d=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0;function E(){if(!(h&&g&&p&&m&&_))throw new Error(i.default.MISSING_CONFIG_ERROR)}function b(){return d}function T(){return f}function w(){u=null,d=!0,c=[],h=null,p=null,m=null,g=null}function A(){return v}function S(){E();var e=new Date,t=T(),n=1e3*p.getTime();t&&g.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function x(e){return null==e||e>=c.length?null:c[e]}function M(e,t){var n;(e.segmentAvailabilityRange=m.calcSegmentAvailabilityRange(e,t),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start&&!e.useCalculatedLiveEdgeTime)?I(new o.default(r.default.SEGMENTS_UNAVAILABLE_ERROR_CODE,r.default.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end})):t&&(n=e.segmentAvailabilityRange.end,m.setExpectedLiveEdge(n),g.updateManifestUpdateInfo({presentationStartTime:n}))}function R(e,i){E();for(var r=0,a=c.length;r<a;r++)M(c[r],e),i&&t.trigger(l.default.REPRESENTATION_UPDATE_STARTED,{sender:n,representation:c[r]})}function C(){d=!0,t.trigger(l.default.DATA_UPDATE_STARTED,{sender:n})}function I(e){d=!1;var i={sender:n,data:u,currentRepresentation:f};e&&(i.error=e),t.trigger(l.default.DATA_UPDATE_COMPLETED,i)}function L(e){var n=e;t.trigger(l.default.AST_IN_FUTURE,{delay:n}
73),setTimeout(function(){b()||(C(),c.forEach(function(e){e.segmentAvailabilityRange=null}),R(p.getIsDynamic(),!0))},n)}function O(e){if(e.sender.getType()===A()&&e.sender.getStreamInfo().id===y&&b())if(e.error)I(e.error);else{var t,n=e.sender.getStreamInfo(),i=e.representation,s=g.getCurrentManifestUpdate(),l=!1,u=0,d=void 0;if(i.adaptation.period.mpd.manifest.type===a.default.DYNAMIC&&!i.adaptation.period.mpd.manifest.ignorePostponeTimePeriod){var m=i.segmentAvailabilityRange.end-i.segmentAvailabilityRange.start;u=1e3*(p.computeLiveDelay(f.segmentDuration,n.manifestInfo.DVRWindowSize)-m)}if(u>0)return L(u),void I(new o.default(r.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE,r.default.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE));if(s){for(var v=0;v<s.representationInfo.length;v++)if((d=s.representationInfo[v]).index===i.index&&d.mediaType===A()){l=!0;break}l||g.addManifestUpdateRepresentationInfo(i,A())}(function(){for(var e=0,t=c.length;e<t;e++){var n=c[e].segmentInfoType;if(null===c[e].segmentAvailabilityRange||!c[e].hasInitialization()||(n===a.default.SEGMENT_BASE||n===a.default.BASE_URL)&&!c[e].segments)return!1}return!0})()&&(h.setPlaybackQuality(A(),n,(t=f,c.indexOf(t))),g.updateManifestUpdateInfo({latency:f.segmentAvailabilityRange.end-p.getTime()}),g.getCurrentRepresentationSwitch(T().adaptation.type)||S(),I())}}function D(e){e.isDynamic&&R(e.isDynamic)}function P(e){e.mediaType===A()&&y===e.streamInfo.id&&(f=x(e.newQuality),S())}function N(e){if(e.newDuration){var t=T();if(t&&t.adaptation.period)t.adaptation.period.duration=e.newDuration}}return n={setConfig:function(e){e.abrController&&(h=e.abrController),e.dashMetrics&&(g=e.dashMetrics),e.playbackController&&(p=e.playbackController),e.timelineConverter&&(m=e.timelineConverter),e.manifestModel&&(_=e.manifestModel),e.type&&(v=e.type),e.streamId&&(y=e.streamId)},getData:function(){return u},isUpdating:b,updateData:function(e,t,n,r){E(),C(),c=t,f=x(r),u=e,n===i.default.VIDEO||n===i.default.AUDIO||n===i.default.FRAGMENTED_TEXT?R(p.getIsDynamic(),!0):I()},updateRepresentation:M,getCurrentRepresentation:T,getRepresentationForQuality:x,getType:A,getStreamId:function(){return y},reset:function(){t.off(l.default.QUALITY_CHANGE_REQUESTED,P,n),t.off(l.default.REPRESENTATION_UPDATE_COMPLETED,O,n),t.off(l.default.WALLCLOCK_TIME_UPDATED,D,n),t.off(l.default.MANIFEST_VALIDITY_CHANGED,N,n),w()}},w(),t.on(l.default.QUALITY_CHANGE_REQUESTED,P,n),t.on(l.default.REPRESENTATION_UPDATE_COMPLETED,O,n),t.on(l.default.WALLCLOCK_TIME_UPDATED,D,n),t.on(l.default.MANIFEST_VALIDITY_CHANGED,N,n),n}c.__dashjs_factory_name="RepresentationController",t.default=u.default.getClassFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(11)),r=c(n(1)),a=c(n(159)),o=c(n(160)),s=c(n(161)),l=c(n(162)),u=c(n(79)),d=c(n(171));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t,n,r=this.context,c=e.dashMetrics,f=e.mediaPlayerModel,h=e.errHandler,p=e.baseURLController,m=void 0,g=void 0;function v(e){return e?e.segments?m[i.default.SEGMENT_BASE]:m[e.segmentInfoType]:null}return t={initialize:function(t){g.initialize(),m[i.default.SEGMENT_TIMELINE]=(0,a.default)(r).create(e,t),m[i.default.SEGMENT_TEMPLATE]=(0,o.default)(r).create(e,t),m[i.default.SEGMENT_LIST]=(0,s.default)(r).create(e,t),m[i.default.SEGMENT_BASE]=(0,l.default)(r).create(e,t)},update:function(e,t,n,i){n||function(e){g.loadInitialization(e)}(e),i||function(e,t){g.loadSegments(e,t,e?e.indexRange:null)}(e,t)},getSegmentByIndex:function(e,t,n){var i=v(e);return i?i.getSegmentByIndex(e,t,n):null},getSegmentByTime:function(e,t){var n=v(e);return n?n.getSegmentByTime(e,t):null}},m={},n=e.mimeType,(g="webm"===(n?n.split("/")[1]:"").toLowerCase()?(0,d.default)(r).getInstance():(0,u.default)(r).getInstance()).setConfig({baseURLController:p,dashMetrics:c,mediaPlayerModel:f,errHandler:h}),t}f.__dashjs_factory_name="SegmentsController";var h=r.default.getClassFactory(f);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(1)),r=o(n(4)),a=n(21);
vendor: 8,770 bytes, line 73
73function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=(e=e||{}).timelineConverter;function i(){if(!n||!n.hasOwnProperty("calcMediaTimeFromPresentationTime")||!n.hasOwnProperty("calcSegmentAvailabilityRange"))throw new Error(r.default.MISSING_CONFIG_ERROR)}function o(e,i){var r,a,o,s=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,l=s.SegmentTimeline,u=s.SegmentURL_asArray,d=0,c=0,f=-1,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0;o=e.timescale;var _=!1;for(p=0,a=(r=l.S_asArray).length;p<a&&!_;p++){if(g=0,(h=r[p]).hasOwnProperty("r")&&(g=h.r),h.hasOwnProperty("t")&&(c=(d=h.t)/o),g<0){if((y=r[p+1])&&y.hasOwnProperty("t"))v=y.t/o;else{var E=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:n.calcSegmentAvailabilityRange(e,t).end;v=n.calcMediaTimeFromPresentationTime(E,e),e.segmentDuration=h.d/o}g=Math.ceil((v-c)/(h.d/o))-1}for(m=0;m<=g&&!_;m++)(_=i(d,c,s,u,h,o,++f,p))&&(e.segmentDuration=h.d/o,(m<g-1||p<a-1)&&f++),c=(d+=h.d)/o}e.availableSegmentsNumber=f}return{getSegmentByIndex:function(e,r,s){if(i(),!e)return null;var l=null,u=!1;return o(e,function(i,r,o,d,c,f,h,p){if(u||s<0){var m=o.media,g=c.mediaRange;return d&&(m=d[p].media||"",g=d[p].mediaRange),l=(0,a.getTimeBasedSegment)(n,t,e,i,c.d,f,m,g,h,c.tManifest),!0}return r>=s-.5*c.d/f&&(u=!0),!1}),l},getSegmentByTime:function(e,r){if(i(),!e)return null;void 0===r&&(r=null);var s=null,l=n.calcMediaTimeFromPresentationTime(r,e);return o(e,function(i,r,o,u,d,c,f,h){if(l<r+d.d/c){var p=o.media,m=d.mediaRange;return u&&(p=u[h].media||"",m=u[h].mediaRange),s=(0,a.getTimeBasedSegment)(n,t,e,i,d.d,c,p,m,f,d.tManifest),!0}return!1}),s}}}s.__dashjs_factory_name="TimelineSegmentsGetter";var l=i.default.getClassFactory(s);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(1)),r=o(n(4)),a=n(21);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=(e=e||{}).timelineConverter;function i(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(r.default.MISSING_CONFIG_ERROR)}function o(e,r){if(i(),!e)return null;var o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate;r=Math.max(r,0);var s=(0,a.getIndexBasedSegment)(n,t,e,r);if(s){s.replacementTime=(r-1)*e.segmentDuration;var l=o.media;l=(0,a.replaceTokenForTemplate)(l,"Number",s.replacementNumber),l=(0,a.replaceTokenForTemplate)(l,"Time",s.replacementTime),s.media=l}var u=e.segmentDuration,d=e.segmentAvailabilityRange;return isNaN(u)?e.availableSegmentsNumber=1:e.availableSegmentsNumber=Math.ceil((d.end-d.start)/u),s}return{getSegmentByIndex:o,getSegmentByTime:function(e,t){if(i(),!e)return null;var r=e.segmentDuration;if(isNaN(r))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return o(e,Math.floor(a/r))}}}s.__dashjs_factory_name="TemplateSegmentsGetter";var l=i.default.getClassFactory(s);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(1)),r=o(n(4)),a=n(21);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=(e=e||{}).timelineConverter;function i(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(r.default.MISSING_CONFIG_ERROR)}function o(e,r){if(i(),!e)return null;var o=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,s=o.SegmentURL_asArray.length,l=e.startNumber,u=null;if(r<s){var d=o.SegmentURL_asArray[r];(u=(0,a.getIndexBasedSegment)(n,t,e,r)).replacementTime=(l+r-1)*e.segmentDuration,u.media=d.media?d.media:"",u.mediaRange=d.mediaRange,u.index=r,u.indexRange=d.indexRange}return e.availableSegmentsNumber=s,u}return{getSegmentByIndex:o,getSegmentByTime:function(e,t){if(i(),!e)return null;var r=e.segmentDuration;if(isNaN(r))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return o(e,Math.floor(a/r))}}}s.__dashjs_factory_name="ListSegmentsGetter";var l=i.default.getClassFactory(s);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e=e||{}).timelineConverter;function n(){if(!t||!t.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(r.default.MISSING_CONFIG_ERROR)}function i(e,t){if(n(),!e)return null;var i=e.segments?e.segments.length:-1,r=void 0;if(t<i&&(r=e.segments[t])&&r.availabilityIdx===t)return r;for(var a=0;a<i;a++)if((r=e.segments[a])&&r.availabilityIdx===t)return r;return null}return{getSegmentByIndex:i,getSegmentByTime:function(e,r){n();var a=function(e,t){if(!e)return-1;var n=e.segments,i=n?n.length:null,r=-1,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0;if(n&&i>0)for(u=0;u<i;u++)if(s=(o=n[u]).presentationStartTime,t+(a=(l=o.duration)/2)>=s&&t-a<s+l){r=o.availabilityIdx;break}return r}(e,t.calcPeriodRelativeTimeFromMpdRelativeTime(e,r));return i(e,a)}}}o.__dashjs_factory_name="SegmentBaseGetter";var s=i.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=(e=e||{}).requestModifier,n=e.boxParser;function i(e,t){e.reader.read().then(t).catch(function(t){e.onerror&&200===e.response.status&&e.onerror(t)})}function r(e,t){if((e=e.filter(function(n){return n.bytes>t/4/e.length})).length>1){var n=0,i=(e[e.length-1].ts-e[0].ts)/e.length;return e.forEach(function(t,r){var a=e[r+1];if(a){var o=a.ts-t.ts;n+=o<i?o:0}}),n}return null}return{load:function(e){var a=new Date,o=e.request,s=new Headers;o.range&&s.append("Range","bytes="+o.range),o.requestStartDate||(o.requestStartDate=a),t&&t.modifyRequestHeader({setRequestHeader:function(e,t){s.append(e,t)}});var l=void 0;"function"==typeof window.AbortController&&(l=new AbortController,e.abortController=l);var u={method:e.method,headers:s,credentials:e.withCredentials?"include":void 0,signal:l?l.signal:void 0};fetch(e.url,u).then(function(t){e.response||(e.response={}),e.response.status=t.status,e.response.statusText=t.statusText,e.response.responseURL=t.url,t.ok||e.onerror();var a="",o=!0,s=!1,l=void 0;try{for(var u,d=t.headers.keys()[Symbol.iterator]();!(o=(u=d.next()).done);o=!0){var c=u.value;a+=c+": "+t.headers.get(c)+"\r\n"}}catch(e){s=!0,l=e}finally{try{!o&&d.return&&d.return()}finally{if(s)throw l}}if(e.response.responseHeaders=a,!t.body)return t.arrayBuffer().then(function(t){e.response.response=t;var n={loaded:t.byteLength,total:t.byteLength,stream:!1};e.progress(n),e.onload(),e.onend()});var f=parseInt(t.headers.get("Content-Length"),10),h=0,p=!1,m=new Uint8Array,g=0;e.reader=t.body.getReader();var v=[];i(e,function t(a){var o=a.value;if(a.done)return m&&(e.progress({loaded:h,total:isNaN(f)?h:f,lengthComputable:!0,time:r(v,h),stream:!0}),e.response.response=m.buffer),e.onload(),void e.onend();if(o&&o.length>0){m=function(e,t){if(0===e.length)return t;var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(m,o),h+=o.length,v.push({ts:Date.now(),bytes:o.length});var s=n.findLastTopIsoBoxCompleted(["moov","mdat"],m,g);if(s.found){var l=s.lastCompletedOffset+s.size,u=void 0;l===m.length?(u=m,m=new Uint8Array):(u=new Uint8Array(m.subarray(0,l)),m=m.subarray(l)),e.progress({data:u.buffer,lengthComputable:!1,noTrace:!0}),g=0}else g=s.lastCompletedOffset,p||(e.progress({lengthComputable:!1,noTrace:!0}),p=!0)}i(e,t)})}).catch(function(t){e.onerror&&e.onerror(t)})},abort:function(e){if(e.abortController)e.abortController.abort();else if(e.reader)try{e.reader.cancel()}catch(e){}},calculateDownloadedTime:r}}o.__dashjs_factory_name="FetchLoader";var s=a.default.getClassFactory(o);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(11),o=(i=a)&&i.__esModule?i:{default:i};var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.co
vendor: 6,866 bytes, line 73
73decs=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}return r(e,[{key:"hasInitialization",value:function(){return null!==this.initialization||null!==this.range}},{key:"hasSegments",value:function(){return this.segmentInfoType!==o.default.BASE_URL&&this.segmentInfoType!==o.default.SEGMENT_BASE&&!this.indexRange}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.period=null,this.index=-1,this.type=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};i.DEFAULT_ID="defaultId",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""}},function(e,t,n){"use strict";var i=Array.isArray,r=Object.keys,a=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var o,s,l,u=i(t),d=i(n);if(u&&d){if((s=t.length)!=n.length)return!1;for(o=s;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(u!=d)return!1;var c=t instanceof Date,f=n instanceof Date;if(c!=f)return!1;if(c&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var m=r(t);if((s=m.length)!==r(n).length)return!1;for(o=s;0!==o--;)if(!a.call(n,m[o]))return!1;for(o=s;0!==o--;)if(!e(t[l=m[o]],n[l]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=m(n(5)),r=m(n(2)),a=m(n(172)),o=m(n(4)),s=m(n(1)),l=m(n(3)),u=m(n(33)),d=m(n(49)),c=m(n(17)),f=m(n(25)),h=m(n(7)),p=m(n(8));function m(e){return e&&e.__esModule?e:{default:e}}function g(){var e=this.context,t=(0,r.default)(e).getInstance(),n=void 0,s=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0;function T(t,n,i,r){var o,l,u=void 0,c=void 0,f=void 0,h=void 0,p=void 0,g=void 0;for(c=[],h=0,l=(o=function(t){var n=[],i=(0,a.default)(e).create({data:t}),r=void 0,o=void 0;for(i.consumeTagAndSize(m.Segment.Cues);i.moreData()&&i.consumeTagAndSize(m.Segment.Cues.CuePoint,!0);){for((r={}).CueTime=i.parseTag(m.Segment.Cues.CuePoint.CueTime),r.CueTracks=[];i.moreData()&&i.consumeTag(m.Segment.Cues.CuePoint.CueTrackPositions,!0);){var s=i.getMatroskaCodedNum(),l=i.getPos();if((o={}).Track=i.parseTag(m.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===o.Track)throw new Error("Cue track cannot be 0");o.ClusterPosition=i.parseTag(m.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),r.CueTracks.push(o),i.setPos(l+s)}if(0===r.CueTracks.length)throw new Error("Mandatory cuetrack not found");n.push(r)}if(0===n.length)throw new Error("mandatory cuepoint not found");return n}(t)).length;h<l;h+=1)f=new d.default,u=0,u=h<o.length-1?o[h+1].CueTime-o[h].CueTime:r-o[h].CueTime,f.duration=u,f.startTime=o[h].CueTime,f.timescale=1e3,p=o[h].CueTracks[0].ClusterPosition+n,g=h<o.length-1?o[h+1].CueTracks[0].ClusterPosition+n-1:i-1,f.mediaRange=p+"-"+g,c.push(f);return s.debug("Parsed cues: "+c.length+" cues."),c}function w(){if(!b||!b.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function A(e,n,r){e?t.trigger(i.default.SEGMENTS_LOADED,{segments:e,representation:n,mediaType:r}):t.trigger(i.default.SEGMENTS_LOADED,{segments:null,representation:n,mediaType:r,error:new h.default(p.default.SEGMENT_BASE_LOADER_ERROR_CODE,p.default.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function S(e){var t=new c.default;return t.setInfo(e),t}return n={setConfig:function(e){if(!(e.baseURLController&&e.dashMetrics&&e.mediaPlayerModel&&e.errHandler))throw new Error(o.default.MISSING_CONFIG_ERROR);b=e.baseURLController,y=e.dashMetrics,_=e.mediaPlayerModel,g=e.errHandler},initialize:function(){v=(0,u.default)(e).getInstance(),E=(0,f.default)(e).create({errHandler:g,dashMetrics:y,mediaPlayerModel:_,requestModifier:v})},loadInitialization:function(e,n){w();var r=null,a=e?b.resolve(e.path):null,o=e?e.range.split("-"):null,l=n||{range:{start:o?parseFloat(o[0]):null,end:o?parseFloat(o[1]):null},request:r,url:a?a.url:void 0,init:!0,mediaType:e&&e.adaptation?e.adaptation.type:null};s.info("Start loading initialization."),r=S(l),E.load({request:r,success:function(){t.trigger(i.default.INITIALIZATION_LOADED,{representation:e})},error:function(){t.trigger(i.default.INITIALIZATION_LOADED,{representation:e})}}),s.debug("Perform init load: "+l.url)},loadSegments:function(t,n,i,r){w();var o=null,l=t?b.resolve(t.path):null,u=l?l.url:void 0,d={bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:o,url:u,init:!1,mediaType:t&&t.adaptation?t.adaptation.type:null};r=r||A,o=S(d),s.debug("Parsing ebml header"),E.load({request:o,success:function(o){!function(t,n,i,r){if(t&&0!==t.byteLength){var o,l=(0,a.default)(e).create({data:t}),u=void 0,d=void 0,c=void 0,f=i?i.split("-"):null,h=null,p={url:n,range:{start:f?parseFloat(f[0]):null,end:f?parseFloat(f[1]):null},request:h};for(s.debug("Parse EBML header: "+p.url),l.skipOverElement(m.EBML),l.consumeTag(m.Segment),c=l.getMatroskaCodedNum(),c+=l.getPos(),o=l.getPos();
73l.moreData()&&!l.consumeTagAndSize(m.Segment.Info,!0);)if(!(l.skipOverElement(m.Segment.SeekHead,!0)||l.skipOverElement(m.Segment.Tracks,!0)||l.skipOverElement(m.Segment.Cues,!0)||l.skipOverElement(m.Void,!0)))throw new Error("no valid top level element found");for(;void 0===u;){var g=l.getMatroskaCodedNum(!0),v=l.getMatroskaCodedNum();g===m.Segment.Info.Duration.tag?u=l[m.Segment.Info.Duration.parse](v):l.setPos(l.getPos()+v)}h=S(p),E.load({request:h,success:function(e){d=T(e,o,c,u),r(d)},error:function(){s.error("Download Error: Cues "+p.url),r(null)}}),s.debug("Perform cues load: "+p.url+" bytes="+p.range.start+"-"+p.range.end)}else r(null)}(o,u,i,function(e){r(e,t,n)})},error:function(){r(null,t,n)}})},reset:function(){g=null,v=null}},s=(0,l.default)(e).getInstance().getLogger(n),m={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},n}g.__dashjs_factory_name="WebmSegmentBaseLoader",t.default=s.default.getSingletonFactory(g)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(e){e=e||{};var t=void 0,n=new DataView(e.data),i=0;function r(e,t){var r=!0,a=0;if(void 0===t&&(t=!1),e.tag>16777215?(n.getUint32(i)!==e.tag&&(r=!1),a=4):e.tag>65535?(256*n.getUint16(i)+n.getUint8(i+2)!==e.tag&&(r=!1),a=3):e.tag>255?(n.getUint16(i)!==e.tag&&(r=!1),a=2):(n.getUint8(i)!==e.tag&&(r=!1),a=1),!r&&e.required&&!t)throw new Error("required tag not found");return r&&(i+=a),r}function a(e){var t=1,r=128,a=-1,o=0,s=n.getUint8(i),l=0;for(l=0;l<8;l+=1){if((s&r)===r){o=void 0===e?s&~r:s,a=l;break}r>>=1}for(l=0;l<a;l+=1,t+=1)o=o<<8|255&n.getUint8(i+t);return i+=t,o}return t={getPos:function(){return i},setPos:function(e){i=e},consumeTag:r,consumeTagAndSize:function(e,t){var n=r(e,t);return n&&a(),n},parseTag:function(e){var n;return r(e),n=a(),t[e.parse](n)},skipOverElement:function(e,t){var n=r(e,t),o=void 0;return n&&(o=a(),i+=o),n},getMatroskaCodedNum:a,getMatroskaFloat:function(e){var t=void 0;switch(e){case 4:t=n.getFloat32(i),i+=4;break;case 8:t=n.getFloat64(i),i+=8}return t},getMatroskaUint:function(e){for(var t=0,r=0;r<e;r+=1)t<<=8,t|=255&n.getUint8(i+r);return i+=e,t},moreData:function(){return i<n.byteLength}}}o.__dashjs_factory_name="EBMLParser",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(1)),r=l(n(3)),a=l(n(2)),o=l(n(5)),s=l(n(50));function l(e){return e&&e.__esModule?e:{default:e}}function u(){var e="urn:mpeg:dash:event:2012",t=this.context,n=(0,a.default)(t).getInstance(),i=void 0,l=void 0,u=void 0,d=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;function y(){v=!1,u={},d={},c={},f=null,h=100,p=Date.now()/1e3}function _(){if(!m||!g)throw new Error("setConfig function has to be called previously")}function E(){null!==f&&v&&(clearInterval(f),f=null,v=!1)}function b(e){if(1==e.eventStream.value){var t=e.eventStream.timescale||1,i=e.presentationTime/t,r=void 0;r=4294967295==e.presentationTime?NaN:(e.presentationTime+e.duration)/t,l.info("Manifest validity changed: Valid until: "+i+"; remaining duration: "+r),n.trigger(o.default.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:i,newDuration:r,newManifestValidAfter:NaN})}}function T(){var e=g.getTime(),t=e-p;p=e,t=Math.max(0,t),S(d,t,e),S(u,t,e),function(){if(c)for(var e=g.getTime(),t=Object.keys(c),n=0;n<t.length;n++){var i=t[n],r=c[i];null!==r&&(r.duration+r.presentationTime)/r.eventStream.timescale<e&&(l.debug("Remove Event "+i+" at time "+e),r=null,delete c[i])}}()}function w(){_(),m.refreshManifest()}function A(e){(0,s.default)(t).create({}).load({method:"get",url:e,request:{responseType:"arraybuffer"}})}function S(t,i,r){var a;if(t)for(var o=Object.keys(t),s=0;s<o.length;s++){var u=o[s],d=t[u];void 0!==d&&(0===(a=d.presentationTime/d.eventStream.timescale)||a<=r&&a+i>r?(l.debug("Start Event "+u+" at "+r),d.duration>0&&(c[u]=d),d.eventStream.schemeIdUri==e&&1==d.eventStream.value?0===d.duration&&0===d.presentationTimeDelta||w():"ur
73n:mpeg:dash:event:callback:2015"==d.eventStream.schemeIdUri&&1==d.eventStream.value?A(d.messageData):n.trigger(d.eventStream.schemeIdUri,{event:d}),delete t[u]):a<=r-i&&delete t[u])}}return i={addInlineEvents:function(e){if(_(),u={},e)for(var t=0;t<e.length;t++){var n=e[t];u[n.id]=n,l.debug("Add inline event with id "+n.id)}l.debug("Added "+e.length+" inline events")},addInbandEvents:function(t){_();for(var n=0;n<t.length;n++){var i=t[n];i.id in d?l.debug("Repeated event with id "+i.id):(i.eventStream.schemeIdUri===e&&void 0===d[i.id]&&b(i),d[i.id]=i,l.debug("Add inband event with id "+i.id))}},stop:E,start:function(){_(),l.debug("Start Event Controller"),v||isNaN(h)||(v=!0,f=setInterval(T,h))},setConfig:function(e){e&&(e.manifestUpdater&&(m=e.manifestUpdater),e.playbackController&&(g=e.playbackController))},reset:function(){E(),y()}},l=(0,r.default)(t).getInstance().getLogger(i),y(),i}u.__dashjs_factory_name="EventController",t.default=i.default.getClassFactory(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=f(n(4)),r=f(n(175)),a=f(n(28)),o=f(n(176)),s=f(n(33)),l=f(n(2)),u=f(n(5)),d=f(n(1)),c=f(n(3));function f(e){return e&&e.__esModule?e:{default:e}}function h(e){e=e||{};var t=this.context,n=(0,l.default)(t).getInstance(),d=e.errHandler,f=e.mediaPlayerModel,h=e.dashMetrics,p=void 0,m=void 0,g=void 0;function v(){for(var e in g)g[e].reset();g={}}function y(e){if(g[e.request.mediaType]===e.sender){var t=e.request,a=e.response,o=t.isInitializationRequest(),s=t.mediaInfo.streamInfo;if(e.error&&(e.request.mediaType!==i.default.AUDIO&&e.request.mediaType!==i.default.VIDEO&&e.request.mediaType!==i.default.FRAGMENTED_TEXT||n.trigger(u.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:e.request.serviceLocation})),a&&s){var l=function(e,t,n,i){var a=new r.default;return a.streamId=n,a.mediaInfo=t.mediaInfo,a.segmentType=t.type,a.start=t.startTime,a.duration=t.duration,a.end=a.start+a.duration,a.bytes=e,a.index=t.index,a.quality=t.quality,a.representationId=t.representationId,a.endFragment=i,a}(a,t,s.id,e.type!==u.default.FRAGMENT_LOADING_PROGRESS);n.trigger(o?u.default.INIT_FRAGMENT_LOADED:u.default.MEDIA_FRAGMENT_LOADED,{chunk:l,fragmentModel:e.sender})}else m.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return p={getModel:function(n){var i=g[n];return i||(i=(0,a.default)(t).create({dashMetrics:h,fragmentLoader:(0,o.default)(t).create({dashMetrics:h,mediaPlayerModel:f,errHandler:d,requestModifier:(0,s.default)(t).getInstance(),settings:e.settings})}),g[n]=i),i},reset:function(){n.off(u.default.FRAGMENT_LOADING_COMPLETED,y,this),n.off(u.default.FRAGMENT_LOADING_PROGRESS,y,this),v()}},m=(0,c.default)(t).getInstance().getLogger(p),v(),n.on(u.default.FRAGMENT_LOADING_COMPLETED,y,p),n.on(u.default.FRAGMENT_LOADING_PROGRESS,y,p),p}h.__dashjs_factory_name="FragmentController",t.default=d.default.getClassFactory(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(25)),r=c(n(177)),a=c(n(7)),o=c(n(2)),s=c(n(23)),l=c(n(5)),u=c(n(8)),d=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t,n=this.context,d=(0,o.default)(n).getInstance(),c=void 0,f=void 0;return c={checkForExistence:function(e){var t=function(t){d.trigger(l.default.CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var n=new r.default(e.url);f.load({request:n,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(e){var t=function(t,n){d.trigger(l.default.LOADING_COMPLETED,{request:e,response:t||null,error:n||null,sender:c})};e?f.load({request:e,progress:function(t){d.trigger(l.default.LOADING_PROGRESS,{request:e,stream:t.stream}),t.data&&d.trigger(l.default.LOADING_DATA_PROGRESS,{request:e,response:t.data||null,error:null,sender:c})},success:function(e){t(e)},error:function(e,n,i){t(void 0,new a.default(u.default.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,i,n))},abort:function(e){e&&d.trigger(l.default.LOADING_ABANDONED,{request:e,mediaType:e.mediaType,sender:c})}}):t(void 0,new a.default(u.default.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,u.default.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){f&&f.abort()},reset:function(){f&&(f.abort(),f=null)}},t=(0,s.default)(n).getInstance(),f=(0,i.default)(n).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,boxParser:t,useFetch:e.settings.get().streaming.lowLatencyEnabled}),c}f.__dashjs_factory_name="FragmentLoader",t.default=d.default.getClassFactory(f)},function(e,t,n){"use strict";
vendor: 4,892 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(17);var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.url=e||null,n.checkForExistenceOnly=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=u(n(1)),r=u(n(4)),a=u(n(179)),o=u(n(86)),s=u(n(77)),l=n(21);function u(e){return e&&e.__esModule?e:{default:e}}function d(e){var t,n=this.context,i=void 0;function u(){i&&i.reset()}return t={get:function(e,t){var n,r=i.getCurrentTrack(),o=void 0;if(!r||r.segmentDuration<=0||null==e)return null;isNaN(r.segmentDuration)&&(o=i.getThumbnailRequestForTime(e))&&(r.segmentDuration=o.duration),n=e%r.segmentDuration;var s=Math.floor(n*r.tilesHor*r.tilesVert/r.segmentDuration),u=new a.default;if(u.width=Math.floor(r.widthPerTile),u.height=Math.floor(r.heightPerTile),u.x=Math.floor(s%r.tilesHor)*r.widthPerTile,u.y=Math.floor(s/r.tilesHor)*r.heightPerTile,"readThumbnail"in r)return r.readThumbnail(e,function(e){u.url=e,t&&t(u)});if(o)u.url=o.url,r.segmentDuration=NaN;else{var d=Math.floor(e/r.segmentDuration);u.url=function(e,t){var n=t+e.startNumber,i=(0,l.replaceTokenForTemplate)(e.templateUrl,"Number",n);return i=(0,l.replaceTokenForTemplate)(i,"Time",(n-1)*e.segmentDuration),i=(0,l.replaceTokenForTemplate)(i,"Bandwidth",e.bandwidth),(0,l.unescapeDollarsInTemplate)(i)}(r,d)}return t&&t(u),u},setTrackByIndex:function(e){i.setTrackByIndex(e)},getCurrentTrackIndex:function(){return i.getCurrentTrackIndex()},getBitrateList:function(){var e=i.getTracks(),t=0;return e.map(function(e){var n=new s.default;return n.mediaType=r.default.IMAGE,n.qualityIndex=t++,n.bitrate=e.bitrate,n.width=e.width,n.height=e.height,n})},reset:u},u(),i=(0,o.default)(n).create({adapter:e.adapter,baseURLController:e.baseURLController,stream:e.stream,timelineConverter:e.timelineConverter}),t}d.__dashjs_factory_name="ThumbnailController",t.default=i.default.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(2)),r=l(n(5)),a=l(n(1)),o=l(n(3)),s=l(n(8));function l(e){return e&&e.__esModule?e:{default:e}}function u(){var e=this.context,t=(0,i.default)(e).getInstance(),n=void 0,a=void 0,l=void 0,u=void 0,d=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0;function v(){l=NaN,c=!1,d=!0,y()}function y(){null!==u&&(clearTimeout(u),u=null)}function _(e){y(),isNaN(e)&&!isNaN(l)&&(e=1e3*l),isNaN(e)||(a.debug("Refresh manifest in "+e+" milliseconds."),u=setTimeout(T,e))}function E(){c=!0;var e=h.getValue(),t=e.url,n=p.getLocation(e);n&&(t=n),f.load(t)}function b(e){h.setValue(e);var n=new Date,i=(n.getTime()-e.loadedTime.getTime())/1e3;1e3*(l=p.getManifestUpdatePeriod(e,i))>2147483647&&(l=2147483.647),t.trigger(r.default.MANIFEST_UPDATED,{manifest:e}),a.info("Manifest has been refreshed at "+n+"["+n.getTime()/1e3+"] "),d||_()}function T(){d&&!g.get().streaming.scheduleWhilePaused||(c?_(g.get().streaming.manifestUpdateRetryInterval):E())}function w(e){e.error?e.error.code===s.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&m.error(e.error):b(e.manifest)}function A(){d=!1,_()}function S(){d=!0,y()}function x(){c=!1}return n={initialize:function(){v(),t.on(r.default.STREAMS_COMPOSED,x,this),t.on(r.default.PLAYBACK_STARTED,A,this),t.on(r.default.PLAYBACK_PAUSED,S,this),t.on(r.default.INTERNAL_MANIFEST_LOADED,w,this)},setManifest:function(e){b(e)},refreshManifest:E,setConfig:function(e){e&&(e.manifestModel&&(h=e.manifestModel),e.adapter&&(p=e.adapter),e.manifestLoader&&(f=e.manifestLoader),e.errHandler&&(m=e.errHandler),e.settings&&(g=e.settings))},reset:function(){t.off(r.default.PLAYBACK_STARTED,A,this),t.off(r.default.PLAYBACK_PAUSED,S,this),t.off(r.default.STREAMS_COMPOSED,x,this),t.off(r.default.INTERNAL_MANIFEST_LOADED,w,this),v()}},a=(0,o.default)(e).getInstance().getLogger(n),n}u.__dashjs_factory_name="ManifestUpdater",t.default=a.default.getClassFactory(u)},function(e,t,n){"use strict";
vendor: 4,307 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(7)),r=n(9),a=c(n(2)),o=c(n(5)),s=c(n(8)),l=c(n(1)),u=c(n(3)),d=c(n(15));function c(e){return e&&e.__esModule?e:{default:e}}function f(){var e=this.context,t=(0,a.default)(e).getInstance(),n=(0,d.default)(e).getInstance(),l=void 0,c=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;function y(e){h=e}function _(e){f=e}function E(e){var t=Date.parse(e);return isNaN(t)&&(t=function(e){var t=void 0,n=void 0,i=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(e);return t=Date.UTC(parseInt(i[1],10),parseInt(i[2],10)-1,parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10),i[6]&&(parseInt(i[6],10)||0),i[7]&&1e3*parseFloat(i[7])||0),i[9]&&i[10]&&(n=60*parseInt(i[9],10)+parseInt(i[10],10),t+=("+"===i[8]?-1:1)*n*60*1e3),new Date(t).getTime()}(e)),t}function b(e){return Date.parse(e)}function T(e){return Date.parse(e)}function w(e,t,n){n()}function A(e,t,n){var i=E(e);isNaN(i)?n():t(i)}function S(e,t,i,a,o){var s,l,u=!1,d=new XMLHttpRequest,c=o?r.HTTPRequest.HEAD:r.HTTPRequest.GET,f=t.match(/\S+/g);if(t=f.shift(),s=function(){u||(u=!0,f.length?S(e,f.join(" "),i,a,o):a())},l=function(){var t=void 0,n=void 0;200===d.status&&(t=o?d.getResponseHeader("Date"):d.response,n=e(t),isNaN(n)||(i(n),u=!0))},n.isRelative(t)){var h=v.resolve();h&&(t=n.resolve(t,h.url))}d.open(c,t),d.timeout=5e3,d.onload=l,d.onloadend=s,d.send()}function x(e,t,n){S(T,e,t,n,!0)}function M(e,n,r){y(!1),t.trigger(o.default.TIME_SYNCHRONIZATION_COMPLETED,{time:n,offset:r,error:e?new i.default(s.default.TIME_SYNC_FAILED_ERROR_CODE,s.default.TIME_SYNC_FAILED_ERROR_MESSAGE):null})}function R(e,t){var n=t||0,i=e[n],r=function(e,t){var n,i,r=!e||!t;r&&p?(n=g.getLatestMPDRequestHeaderValueByID("Date"),i=null!==n?new Date(n).getTime():Number.NaN,isNaN(i)?M(!0):(_(i-(new Date).getTime()),M(!1,i/1e3,f))):M(r,e,t)};y(!0),i?m.hasOwnProperty(i.schemeIdUri)?m[i.schemeIdUri](i.value,function(e){var t=(new Date).getTime(),n=function(e,t){return e-t}(e,t);_(n),c.info("Local time: "+new Date(t)),c.info("Server time: "+new Date(e)),c.info("Server Time - Local Time (ms): "+n),r(e,n)},function(){R(e,n+1)}):R(e,n+1):(_(0),r())}return l={initialize:function(e,t){p=t,f=0,h=!1,m={"urn:mpeg:dash:utc:http-head:2014":x,"urn:mpeg:dash:utc:http-xsdate:2014":S.bind(null,E),"urn:mpeg:dash:utc:http-iso:2014":S.bind(null,b),"urn:mpeg:dash:utc:direct:2014":A,"urn:mpeg:dash:utc:http-head:2012":x,"urn:mpeg:dash:utc:http-xsdate:2012":S.bind(null,E),"urn:mpeg:dash:utc:http-iso:2012":S.bind(null,b),"urn:mpeg:dash:utc:direct:2012":A,"urn:mpeg:dash:utc:http-ntp:2014":w,"urn:mpeg:dash:utc:ntp:2014":w,"urn:mpeg:dash:utc:sntp:2014":w},h||R(e)},getOffsetToDeviceTimeMs:function(){return f},setConfig:function(e){e&&(e.dashMetrics&&(g=e.dashMetrics),e.baseURLController&&(v=e.baseURLController))},reset:function(){y(!1)}},c=(0,u.default)(e).getInstance().getLogger(l),l}f.__dashjs_factory_name="TimeSyncController";var h=l.default.getSingletonFactory(f);h.HTTP_TIMEOUT_MS=5e3,l.default.updateSingletonFactory(f.__dashjs_factory_name,h),t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(85)),r=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var o=NaN,s=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={baseUrls:t||null,selectedIdx:n||o},this.children=[]};function l(){var e,t=void 0,n=void 0,r=this.context,a=(0,i.default)(r).getInstance();function l(e,t,i){var r=n.getBaseURLsFromElement(i);e[t]?a.areEqual(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=o):e[t]=new s(r)}function u(e){!function(){if(!n||!n.hasOwnProperty("getBaseURLsFromElement")||!n.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var i=n.getBaseURLsFromElement(e);a.areEqual(i,t.data.baseUrls)||(t.data.baseUrls=i,t.data.selectedIdx=o),e&&e.Period_asArray&&e.Period_asArray.forEach(function(e,i){l(t.children,i,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach(function(e,r){l(t.children[i].children,r,e),e.Representation_asArray&&e.Representation_asArray.sort(n.getRepresentationSortFunction()).forEac
vendor: 4,495 bytes, line 73
73h(function(e,n){l(t.children[i].children[r].children,n,e)})})})}function d(e,n){var i=n||t;e(i.data),i.children&&i.children.forEach(function(t){return d(e,t)})}function c(){t=new s}return e={reset:c,update:function(e){u(e)},getForPath:function(e){var n=t,i=[n.data];return e&&e.forEach(function(e){(n=n.children[e])&&i.push(n.data)}),i.filter(function(e){return e.baseUrls.length})},invalidateSelectedIndexes:function(e){d(function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=o)})},setConfig:function(e){e.adapter&&(n=e.adapter)}},c(),e}l.__dashjs_factory_name="BaseURLTreeModel",t.default=r.default.getClassFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=f(n(8)),r=f(n(2)),a=f(n(5)),o=f(n(184)),s=f(n(185)),l=f(n(186)),u=f(n(1)),d=f(n(7)),c=n(14);function f(e){return e&&e.__esModule?e:{default:e}}function h(){var e,t=this.context,n=(0,r.default)(t).getInstance(),u=void 0,f=void 0,h=void 0,p=void 0;function m(){u.reset()}return e={chooseSelector:function(e){(0,c.checkParameterType)(e,"boolean"),p=e?h:f},select:function(e){if(e){var t=e.baseUrls,r=e.selectedIdx;if(!isNaN(r))return t[r];var o=p.select(t);return o?(e.selectedIdx=t.indexOf(o),o):(n.trigger(a.default.URL_RESOLUTION_FAILED,{error:new d.default(i.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,i.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(p===f&&m()))}},reset:m,setConfig:function(e){e.selector&&(p=e.selector)}},u=(0,o.default)(t).create({updateEventName:a.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:a.default.SERVICE_LOCATION_BLACKLIST_ADD}),f=(0,l.default)(t).create({blacklistController:u}),h=(0,s.default)(t).create({blacklistController:u}),p=f,e}h.__dashjs_factory_name="BaseURLSelector",t.default=u.default.getClassFactory(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(2));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){e=e||{};var t=[],n=(0,r.default)(this.context).getInstance(),i=e.updateEventName,a=e.addBlacklistEventName;function o(e){-1===t.indexOf(e)&&(t.push(e),n.trigger(i,{entry:e}))}function s(e){o(e.entry)}return function(){a&&n.on(a,s,this)}(),{add:o,contains:function(e){return!!(t.length&&e&&e.length)&&-1!==t.indexOf(e)},reset:function(){t=[]}}}o.__dashjs_factory_name="BlackListController",t.default=i.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=(e=e||{}).blacklistController;return{select:function(e){return e&&function(e){var t=0,n=[],i=0,r=void 0,a=void 0;if((a=e.sort(function(e,t){var n=e.dvb_priority-t.dvb_priority;return isNaN(n)?0:n}).filter(function(e,t,n){return!t||n[0].dvb_priority&&e.dvb_priority&&n[0].dvb_priority===e.dvb_priority})).length)return a.length>1&&(a.forEach(function(e){t+=e.dvb_weight,n.push(t)}),r=Math.floor(Math.random()*(t-1)),n.every(function(e,t){return i=t,!(r<e)})),a[i]}((n=[],e.filter(function(e){return!t.contains(e.serviceLocation)||(e.dvb_priority&&n.push(e.dvb_priority),!1)}).filter(function(e){return!n.length||!e.dvb_priority||-1===n.indexOf(e.dvb_priority)})));var n}}}o.__dashjs_factory_name="DVBSelector",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=(e=e||{}).blacklistController;return{select:function(e){var n=0,i=void 0;return e&&e.some(function(e,i){return n=i,!t.contains(e.serviceLocation)})&&(i=e[n]),i}}}o.__dashjs_factory_name="BasicSelector",t.default=a.default.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(1)),r=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0,t=void 0,n=this.context;return e={createMediaSource:function(){var e="WebKitMediaSource"in window;return"MediaSource"in window?new MediaSource:e?new WebKitMediaSource:null},attachMediaSource:function(e,t){var n=window.URL.createObjectURL(e);return t.setSource(n),n},detachMediaSource:function(e){e.setSource(null)},setDuration:function(e,t){return e.duration!=t&&(e.duration=t),e.duration},setSeekable:function(e,t,n){e&&"function"==typeof e.setLiveSeekableRange&&"function"==typeof e.clearLiveSeekableRange&&"open"===e.readyState&&t>=0&&t<n&&(e.clearLiveSeekableRange(),e.setLiveSeekableRange(t,n))}
vendor: 5,963 bytes, line 73
73,signalEndOfStream:function(e){if(e&&"open"===e.readyState){for(var n=e.sourceBuffers,i=0;i<n.length;i++){if(n[i].updating)return;if(0===n[i].buffered.length)return}t.info("call to mediaSource endOfStream"),e.endOfStream()}}},t=(0,r.default)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="MediaSourceController",t.default=i.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=g(n(4)),r=g(n(189)),a=g(n(25)),o=g(n(15)),s=g(n(88)),l=g(n(7)),u=n(9),d=g(n(2)),c=g(n(5)),f=g(n(8)),h=g(n(1)),p=g(n(191)),m=g(n(3));function g(e){return e&&e.__esModule?e:{default:e}}function v(e){e=e||{};var t=this.context,n=(0,d.default)(t).getInstance(),h=(0,o.default)(t).getInstance(),g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=e.mssHandler,T=e.errHandler;function w(e){n.trigger(c.default.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}return g={load:function(e){var r=new s.default(e,u.HTTPRequest.MPD_TYPE);y.load({request:r,success:function(r,a,o){if(_){var s=void 0,u=void 0,d=void 0;if(o&&o!==e?(u=h.parseBaseUrl(o),s=o):(h.isRelative(e)&&(e=h.resolve(e,window.location.href)),u=h.parseBaseUrl(e)),null===E&&(E=function(e){var n=null;return e.indexOf("SmoothStreamingMedia")>-1?(b&&(n=b.createMssParser(),b.registerEvents()),n):e.indexOf("MPD")>-1?(0,p.default)(t).create():n}(r)),null!==E){_.setMatchers(E.getMatchers()),_.setIron(E.getIron());try{d=E.parse(r)}catch(t){return void n.trigger(c.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(f.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,f.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+e)})}d?(d.url=s||e,d.originalUrl||(d.originalUrl=d.url),d.hasOwnProperty(i.default.LOCATION)&&(u=h.parseBaseUrl(d.Location_asArray[0]),v.debug("BaseURI set by Location to: "+u)),d.baseUri=u,d.loadedTime=new Date,_.resolveManifestOnLoad(d)):n.trigger(c.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(f.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,f.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+e)})}else n.trigger(c.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(f.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,f.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+e)})}},error:function(t,i,r){n.trigger(c.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new l.default(f.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,f.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(e+", ")+r)})}})},reset:function(){n.off(c.default.XLINK_READY,w,g),_&&(_.reset(),_=null),y&&(y.abort(),y=null),b&&b.reset()}},v=(0,m.default)(t).getInstance().getLogger(g),n.on(c.default.XLINK_READY,w,g),y=(0,a.default)(t).create({errHandler:T,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier}),_=(0,r.default)(t).create({errHandler:T,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier}),E=null,g}v.__dashjs_factory_name="ManifestLoader";var y=h.default.getClassFactory(v);t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(190)),r=d(n(2)),a=d(n(5)),o=d(n(1)),s=d(n(89)),l=d(n(15)),u=d(n(11));function d(e){return e&&e.__esModule?e:{default:e}}var c="onLoad";function f(e){e=e||{};var t=this.context,n=(0,r.default)(t).getInstance(),o=(0,l.default)(t).getInstance(),d=void 0,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0;function v(e,t,n){var i={},r=void 0,a=void 0;i.elements=e,i.type=t,i.resolveType=n,0===i.elements.length&&_(i);for(var s=0;s<i.elements.length;s++)r=i.elements[s],a=o.isHTTPURL(r.url)?r.url:r.originalContent.BaseURL+r.url,g.load(a,r,i)}function y(e){var t,n=void 0,i="";if(n=e.element,t=e.resolveObject,n.resolvedContent){var r=0;0===n.resolvedContent.indexOf("<?xml")&&(r=n.resolvedContent.indexOf("?>")+2),i=n.resolvedContent.substr(0,r)+"<response>"+n.resolvedContent.substr(r)+"</response>",n.resolvedContent=m.xml_str2json(i)}(function(e){var t=void 0;for(t=0;t<e.elements.length;t++)if(!1===e.elements[t].resolved)return!1;return!0})(t)&&_(t)}function _(e){var t=[],i=void 0,r=void 0;if(function(e){var t=[],n=void 0,i=void 0,r=void 0,a=void 0,o=void 0,s=void 0;for(a=e.elements.length-1;a>=0;a--){if(i=(n=e.elements[a]).type+"_asArray",!n.resolvedContent||T())delete n.originalContent["xlink:actuate"],delete n.originalContent["xlink:href"],t.push(n.originalContent);else if(n.resolvedContent)for(o=0;o<n.resolvedContent[i].length;o++)r=n.resolvedContent[i][o],t.push(r);for(n.parentElement[i].splice(n.index,1),s=0;s<t.length;s++)n.parentElement[i].splice(n.index+s,0,t[s]);t=[]}e.elements.length>0&&h.run(p)}(e),"onActuate"===e.resolveType&&n.trigger(a.default.XLINK_READY,{manifest:p}),e.resolveType===c)switch(e.type){case u.default.PERIOD:for(i=0;i<p[u.default.PERIOD+"_asArray"].length;i++)(r=p[u.default.PERIOD+"_asArray"][i]).hasOwnProperty(u.default.ADAPTATION_SET+"_asArray")&&(t=t.concat(E(r[u.default.ADAPTATION_SET+"_asArray"],r,u.default.ADAPTATION_SET,c))),r.hasOwnProperty(u.default.EVENT_STREAM+"_asArray")&&(t=t.concat(E(r[u.default.EVENT_STREAM+"_asArray"],r,u.default.EVENT_STREAM,c)));v(t,u.default.ADAPTATION_SET,c);break;case u.default.ADAPTATION_SET:n.trigger(a.default.XLINK_READY,{manifest:p})}}function E(e,t,n,i){var r=[],a=void 0,o=void 0,s=void 0;for(o=e.length-1;o>=0;o--)(a=e[o]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===a["xlink:href"]&&e.splice(o,1);for(o=0;o<e.length;o++)(a=e[o]).hasOwnProperty("xlink:href")&&a.hasOwnProperty("xlink:actuate")&&a["xlink:actuate"]===i&&(s=b(a["xlink:href"],t,n,o,i,a),r.push(s));return r}function b(e,t,n,i,r,a){return{url:e,parentElement:t,type:n,index:i,resolveType:r,originalContent:a,resolvedContent:null,resolved:!1}}function T(){return!1}return d={resolveManifestOnLoad:function(e){m=new s.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespace
vendor: 4,113 bytes, line 73
73s:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:f}),v(E((p=e).Period_asArray,p,u.default.PERIOD,c),u.default.PERIOD,c)},setMatchers:function(e){e&&(f=e)},setIron:function(e){e&&(h=e)},reset:function(){n.off(a.default.XLINK_ELEMENT_LOADED,y,d),g&&(g.reset(),g=null)}},n.on(a.default.XLINK_ELEMENT_LOADED,y,d),g=(0,i.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier}),d}f.__dashjs_factory_name="XlinkController",t.default=o.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(7)),r=c(n(25)),a=n(9),o=c(n(88)),s=c(n(2)),l=c(n(5)),u=c(n(1)),d=c(n(8));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){e=e||{};var t=this.context,n=(0,s.default)(t).getInstance(),u=(0,r.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier});return{load:function(e,t,r){var s=function(a,o){t.resolved=!0,t.resolvedContent=a||null,n.trigger(l.default.XLINK_ELEMENT_LOADED,{element:t,resolveObject:r,error:a||o?null:new i.default(d.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,d.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+e)})};if("urn:mpeg:dash:resolve-to-zero:2013"===e)s(null,!0);else{var c=new o.default(e,a.HTTPRequest.XLINK_EXPANSION_TYPE);u.load({request:c,success:function(e){s(e)},error:function(){s(null)}})}},reset:function(){u&&(u.abort(),u=null)}}}f.__dashjs_factory_name="XlinkLoader",t.default=u.default.getClassFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=h(n(1)),r=h(n(3)),a=h(n(192)),o=h(n(89)),s=h(n(193)),l=h(n(194)),u=h(n(195)),d=h(n(196)),c=h(n(197)),f=h(n(199));function h(e){return e&&e.__esModule?e:{default:e}}function p(){var e=this.context,t=void 0,n=void 0,i=void 0,h=void 0,p=void 0;return t={parse:function(e){var t,i=window.performance.now();if(!(t=h.xml_str2json(e)))throw new Error("parsing the manifest failed");var r=window.performance.now();p.run(t);var a=window.performance.now();return n.info("Parsing complete: ( xml2json: "+(r-i).toPrecision(3)+"ms, objectiron: "+(a-r).toPrecision(3)+"ms, total: "+((a-i)/1e3).toPrecision(3)+"s)"),t},getMatchers:function(){return i},getIron:function(){return p}},n=(0,r.default)(e).getInstance().getLogger(t),i=[new l.default,new u.default,new d.default,new s.default],h=new o.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!0,matchers:i}),p=(0,a.default)(e).create({adaptationset:new c.default,period:new f.default}),t}p.__dashjs_factory_name="DashParser",t.default=i.default.getClassFactory(p)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=n(1),o=(i=a)&&i.__esModule?i:{default:i};function s(e){function t(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function n(e,n,i){for(var a=0,o=e.length;a<o;++a){var s=e[a];if(n[s.name])if(i[s.name]){if(s.merge){var l=n[s.name],u=i[s.name];"object"===(void 0===l?"undefined":r(l))&&"object"===(void 0===u?"undefined":r(u))?t(l,u):i[s.name]=l+u}}else i[s.name]=n[s.name]}}function i(e,t){for(var r=0,a=e.children.length;r<a;++r){var o=e.children[r],s=t[o.name+"_asArray"];if(s)for(var l=0,u=s.length;l<u;++l){var d=s[l];n(e.properties,t,d),i(o,d)}}}return{run:function(t){if(null===t||"object"!==(void 0===t?"undefined":r(t)))return t;if("period"in e)for(var n=e.period,a=t.Period_asArray,o=0,s=a.length;o<s;++o){var l=a[o];if(i(n,l),"adaptationset"in e){var u=l.AdaptationSet_asArray;if(u)for(var d=e.adaptationset,c=0,f=u.length;c<f;++c)i(d,u[c])}}return t}}}s.__dashjs_factory_name="ObjectIron";var l=o.default.getClassFactory(s);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(34)),r=a(n(11));
vendor: 4,442 bytes, line 73
73function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,function(e,t){var n,i=(o(n={},r.default.MPD,[r.default.ID,r.default.PROFILES]),o(n,r.default.PERIOD,[r.default.ID]),o(n,r.default.BASE_URL,[r.default.SERVICE_LOCATION,r.default.BYTE_RANGE]),o(n,r.default.SEGMENT_BASE,[r.default.INDEX_RANGE]),o(n,r.default.INITIALIZATION,[r.default.RANGE]),o(n,r.default.REPRESENTATION_INDEX,[r.default.RANGE]),o(n,r.default.SEGMENT_LIST,[r.default.INDEX_RANGE]),o(n,r.default.BITSTREAM_SWITCHING,[r.default.RANGE]),o(n,r.default.SEGMENT_URL,[r.default.MEDIA_RANGE,r.default.INDEX_RANGE]),o(n,r.default.SEGMENT_TEMPLATE,[r.default.INDEX_RANGE,r.default.MEDIA,r.default.INDEX,r.default.INITIALIZATION_MINUS,r.default.BITSTREAM_SWITCHING_MINUS]),o(n,r.default.ASSET_IDENTIFIER,[r.default.VALUE,r.default.ID]),o(n,r.default.EVENT_STREAM,[r.default.VALUE]),o(n,r.default.ADAPTATION_SET,[r.default.PROFILES,r.default.MIME_TYPE,r.default.SEGMENT_PROFILES,r.default.CODECS,r.default.CONTENT_TYPE]),o(n,r.default.FRAME_PACKING,[r.default.VALUE,r.default.ID]),o(n,r.default.AUDIO_CHANNEL_CONFIGURATION,[r.default.VALUE,r.default.ID]),o(n,r.default.CONTENT_PROTECTION,[r.default.VALUE,r.default.ID]),o(n,r.default.ESSENTIAL_PROPERTY,[r.default.VALUE,r.default.ID]),o(n,r.default.SUPPLEMENTAL_PROPERTY,[r.default.VALUE,r.default.ID]),o(n,r.default.INBAND_EVENT_STREAM,[r.default.VALUE,r.default.ID]),o(n,r.default.ACCESSIBILITY,[r.default.VALUE,r.default.ID]),o(n,r.default.ROLE,[r.default.VALUE,r.default.ID]),o(n,r.default.RATING,[r.default.VALUE,r.default.ID]),o(n,r.default.VIEWPOINT,[r.default.VALUE,r.default.ID]),o(n,r.default.CONTENT_COMPONENT,[r.default.CONTENT_TYPE]),o(n,r.default.REPRESENTATION,[r.default.ID,r.default.DEPENDENCY_ID,r.default.MEDIA_STREAM_STRUCTURE_ID]),o(n,r.default.SUBSET,[r.default.ID]),o(n,r.default.METRICS,[r.default.METRICS_MINUS]),o(n,r.default.REPORTING,[r.default.VALUE,r.default.ID]),n);if(i.hasOwnProperty(t)){var a=i[t];return void 0!==a&&a.indexOf(e.name)>=0}return!1},function(e){return String(e)}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(34)),r=o(n(4)),a=o(n(11));function o(e){return e&&e.__esModule?e:{default:e}}var s=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,function(e){for(var t=[a.default.MIN_BUFFER_TIME,a.default.MEDIA_PRESENTATION_DURATION,a.default.MINIMUM_UPDATE_PERIOD,a.default.TIMESHIFT_BUFFER_DEPTH,a.default.MAX_SEGMENT_DURATION,a.default.MAX_SUBSEGMENT_DURATION,r.default.SUGGESTED_PRESENTATION_DELAY,a.default.START,r.default.START_TIME,a.default.DURATION],n=t.length,i=0;i<n;i++)if(e.nodeName===t[i])return s.test(e.value);return!1},function(e){var t=s.exec(e),n=31536e3*parseFloat(t[3]||0)+2592e3*parseFloat(t[5]||0)+86400*parseFloat(t[7]||0)+3600*parseFloat(t[9]||0)+60*parseFloat(t[11]||0)+parseFloat(t[13]||0);return void 0!==t[1]&&(n=-n),n}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=l},function(e,t,n){"use strict";
vendor: 9,434 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(34),a=(i=r)&&i.__esModule?i:{default:i};var o=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,function(e){return o.test(e.value)},function(e){var t=o.exec(e),n=void 0;if(n=Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),t[6]&&parseInt(t[6],10)||0,t[7]&&1e3*parseFloat(t[7])||0),t[9]&&t[10]){var i=60*parseInt(t[9],10)+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*i*60*1e3}return new Date(n)}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(a.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(34),a=(i=r)&&i.__esModule?i:{default:i};var o=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,function(e){return o.test(e.value)},function(e){return parseFloat(e)}))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(a.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(90)),r=a(n(11));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=[r.default.PROFILES,r.default.WIDTH,r.default.HEIGHT,r.default.SAR,r.default.FRAMERATE,r.default.AUDIO_SAMPLING_RATE,r.default.MIME_TYPE,r.default.SEGMENT_PROFILES,r.default.CODECS,r.default.MAXIMUM_SAP_PERIOD,r.default.START_WITH_SAP,r.default.MAX_PLAYOUT_RATE,r.default.CODING_DEPENDENCY,r.default.SCAN_TYPE,r.default.FRAME_PACKING,r.default.AUDIO_CHANNEL_CONFIGURATION,r.default.CONTENT_PROTECTION,r.default.ESSENTIAL_PROPERTY,r.default.SUPPLEMENTAL_PROPERTY,r.default.INBAND_EVENT_STREAM];return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r.default.ADAPTATION_SET,e,[new i.default(r.default.REPRESENTATION,e,[new i.default(r.default.SUB_REPRESENTATION,e)])]))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n;this._name=t,this._merge=(n=t)&&n.length&&n.charAt(0)===n.charAt(0).toUpperCase()}return i(e,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(90)),r=a(n(11));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=[r.default.SEGMENT_BASE,r.default.SEGMENT_TEMPLATE,r.default.SEGMENT_LIST];return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r.default.PERIOD,e,[new i.default(r.default.ADAPTATION_SET,e,[new i.default(r.default.REPRESENTATION,e)])]))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2)),r=o(n(5)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=(0,i.default)(e).getInstance();return{error:function(e){t.trigger(r.default.ERROR,{error:e})}}}s.__dashjs_factory_name="ErrorHandler",t.default=a.default.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(1),a=(i=r)&&i.__esModule?i:{default:i};function o(){var e,t=void 0;return e={supportsMediaSource:function(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return e||t},supportsEncryptedMedia:function(){return t},supportsCodec:function(e){return!(!("MediaSource"in window)||!MediaSource.isTypeSupported(e))||!(!("WebKitMediaSource"in window)||!WebKitMediaSource.isTypeSupported(e))},setEncryptedMediaSupported:function(e){t=e}},t=!1,e}o.__dashjs_factory_name="Capabilities",t.default=a.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(203)),r=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}function o(){var e=void 0;return{initialize:function(t){if(e=new i.default,!t)return null;var n=t.indexOf("#");if(-1!==n)for(var r=t.substr(n+1).split("&"),a=0,o=r.length;a<o;++a){var s=r[a],l=s.indexOf("=");if(-1!==l){var u=s.substring(0,l);e.hasOwnProperty(u)&&(e[u]=s.substr(l+1))}}},getURIFragmentData:function(){return e}}}o.__dashjs_factory_name="URIFragmentModel",t.default=r.default.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2)),r=o(n(5)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=(0,i.default)(e).getInstance(),n=void 0;return{getValue:function(){return n},setValue:function(e){n=e,e&&t.trigger(r.default.MANIFEST_LOADED,{data:e})}}}s.__dashjs_factory_name="ManifestModel",t.default=a.default.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=u(n(82)),r=u(n(1)),a=u(n(4)),o=u(n(76)),s=u(n(52)),l=n(14);function u(e){return e&&e.__esModule?e:{default:e}}function d(){var e,t=void 0,n=void 0,r=void 0,u={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso&ms"},d=this.context,c=(0,s.default)(d).getInstance();function f(e){var t=void 0;for(t=0;t<r.length;t++)if(r[t].rulename===e)return t;return-1}function h(){return c.get().streaming.lowLatencyEnabled?c.get().streaming.liveDelay||3:c.get().streaming.liveDelay}function p(e,n){m(e,n);var r=new i.default;r.schemeIdUri=e,r.value=n,t.push(r)}function m(e,n){(0,l.checkParameterType)(e,"string"),(0,l.checkParameterType)(n,"string"),t.forEach(function(i,r){i.schemeIdUri===e&&i.value===n&&t.splice(r,1)})}return e={getABRCustomRules:function(){return r},addABRCustomRule:function(e,t,n){if("string"!=typeof e||e!==o.default.ABANDON_FRAGMENT_RULES&&e!==o.default.QUALITY_SWITCH_RULES||"string"!=typeof t)throw a.default.BAD_ARGUMENT_ERROR;var i=f(t);-1===i?r.push({type:e,rulename:t,rule:n}):(r[i].type=e,r[i].rule=n)},removeABRCustomRule:function(e){if(e){var t=f(e);-1!==t&&r.splice(t,1)}else r=[]},getStableBufferTime:function(){if(c.get().streaming.lowLatencyEnabled)return.6*h();var e=c.get().streaming.stableBufferTime;return e>-1?e:c.get().streaming.fastSwitchEnabled?20:12},getRetryAttemptsForType:function(e){return c.get().streaming.lowLatencyEnabled?5*c.get().streaming.retryAttempts[e]:c.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){return c.get().streaming.lowLatencyEnabled?c.get().streaming.retryIntervals[e]/10:c.get().streaming.retryIntervals[e]}
vendor: 15,552 bytes, line 73
73,getLiveDelay:h,addUTCTimingSource:p,removeUTCTimingSource:m,getUTCTimingSources:function(){return t},clearDefaultUTCTimingSources:function(){t=[]},restoreDefaultUTCTimingSources:function(){p(u.scheme,u.value)},setXHRWithCredentialsForType:function e(t,i){t?n[t]=!!i:Object.keys(n).forEach(function(t){e(t,i)})},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},getDefaultUtcTimingSource:function(){return u},reset:function(){}},t=[],n={default:!1},r=[],e}d.__dashjs_factory_name="MediaPlayerModel",t.default=r.default.getSingletonFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(1)),r=s(n(2)),a=s(n(5)),o=s(n(3));function s(e){return e&&e.__esModule?e:{default:e}}function l(){var e=void 0,t=void 0,n=void 0,i=void 0,s=void 0,l=this.context,u=(0,r.default)(l).getInstance(),d=[];function c(){n&&(n.playbackRate=s||1,n.removeEventListener("canplay",c))}function f(e){n&&(n.readyState<=2&&e>0?n.addEventListener("canplay",c):n.playbackRate=e)}function h(){return d.length>0}function p(e){var t=d.indexOf(e),i=void 0;null!==e&&(-1!==t&&d.splice(t,1),n&&!1===h()&&0===n.playbackRate&&(f(s||1),n.paused||((i=document.createEvent("Event")).initEvent("playing",!0,!1),n.dispatchEvent(i))))}function m(){if(n&&h()&&0===n.playbackRate){var e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}function g(){return n?n.buffered:null}return e={initialize:function(){u.on(a.default.PLAYBACK_PLAYING,m,this)},setCurrentTime:function(e,t){if(n){if(n.currentTime==e)return;try{e=t?function(e){var t=g(),n=e,i=9999999999;if(t)for(var r=0;r<t.length;r++){var a=t.start(r),o=t.end(r),s=Math.abs(a-e),l=Math.abs(o-e);if(e>=a&&e<=o)return e;s<i&&(i=s,n=a),l<i&&(i=l,n=o)}return n}(e):e,n.currentTime=e}catch(t){0===n.readyState&&t.code===t.INVALID_STATE_ERR&&setTimeout(function(){n.currentTime=e},400)}}},play:function(){if(n){n.autoplay=!0;var e=n.play();e&&e.catch&&"undefined"!=typeof Promise&&e.catch(function(e){"NotAllowedError"===e.name&&u.trigger(a.default.PLAYBACK_NOT_ALLOWED),t.warn("Caught pending play exception - continuing ("+e+")")})}},isPaused:function(){return n?n.paused:null},pause:function(){n&&(n.pause(),n.autoplay=!1)},isSeeking:function(){return n?n.seeking:null},getTime:function(){return n?n.currentTime:null},getPlaybackRate:function(){return n?n.playbackRate:null},setPlaybackRate:f,getPlayedRanges:function(){return n?n.played:null},getEnded:function(){return n?n.ended:null},setStallState:function(e,t){!function(e,t){t?function(e){var t=void 0;if(null===e||n.seeking||-1!==d.indexOf(e))return;d.push(e),n&&1===d.length&&((t=document.createEvent("Event")).initEvent("waiting",!0,!1),s=n.playbackRate,f(0),n.dispatchEvent(t))}(e):p(e)}(e,t)},getElement:function(){return n},setElement:function(e){if(!(null==e||e&&/^(VIDEO|AUDIO)$/i.test(e.nodeName)))throw"element is not video or audio DOM type!";(n=e)&&(n.preload="auto")},setSource:function(e){n&&(e?n.src=e:(n.removeAttribute("src"),n.load()))},getSource:function(){return n?n.src:null},getTTMLRenderingDiv:function(){return i},setTTMLRenderingDiv:function(e){(i=e).style.position="absolute",i.style.display="flex",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.top=0,i.style.left=0},getPlaybackQuality:function(){if(!n)return null;var e="webkitDroppedFrameCount"in n&&"webkitDecodedFrameCount"in n,t=null;return"getVideoPlaybackQuality"in n?t=n.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:n.webkitDroppedFrameCount,totalVideoFrames:n.webkitDroppedFrameCount+n.webkitDecodedFrameCount,creationTime:new Date}),t},addEventListener:function(e,t){n&&n.addEventListener(e,t)},removeEventListener:function(e,t){n&&n.removeEventListener(e,t)},getReadyState:function(){return n?n.readyState:NaN},getBufferRange:g,getClientWidth:function(){return n?n.clientWidth:NaN},getClientHeight:function(){return n?n.clientHeight:NaN},getTextTracks:function(){return n?n.textTracks:[]},getTextTrack:function(e,t,i,r,a){if(n)for(var o=0;o<n.textTracks.length;o++)if(n.textTracks[o].kind===e&&(!t||n.textTracks[o].label==t)&&n.textTracks[o].language===i&&n.textTracks[o].isTTML===r&&n.textTracks[o].isEmbedded===a)return n.textTracks[o];return null},addTextTrack:function(e,t,i){return n?n.addTextTrack(e,t,i):null},appendChild:function(e){n&&(n.appendChild(e),void 0!==e.isTTML&&(n.textTracks[n.textTracks.length-1].isTTML=e.isTTML,n.textTracks[n.textTracks.length-1].isEmbedded=e.isEmbedded))},removeChild:function(e){n&&n.removeChild(e)},getVideoWidth:function(){return n?n.videoWidth:NaN},getVideoHeight:function(){return n?n.videoHeight:NaN},getVideoRelativeOffsetTop:function(){return n&&n.parentNode?n.getBoundingClientRect().top-n.parentNode.getBoundingClientRect().top:NaN},getVideoRelativeOffsetLeft:function(){return n&&n.parentNode?n.getBoundingClientRect().left-n.parentNode.getBoundingClientRect().left:NaN},reset:function(){u.off(a.default.PLAYBACK_PLAYING,m,this)}},t=(0,o.default)(l).getInstance().getLogger(e),e}l.__dashjs_factory_name="VideoModel",t.default=i.default.getSingletonFactory(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(1)),r=o(n(3)),a=o(n(4));function o(e){return e&&e.__esModule?e:{default:e}}var s=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],l="dashjs_?_bitrate",u="dashjs_?_settings",d="localStorage",c="lastBitrate",f="lastMediaSettings";function h(e){e=e||{};var t=this.context,n=e.settings,i=void 0,o=void 0,h=void 0;function p(e){if(void 0!==h)return h;h=!1;var t=void 0;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return o.warn("DOMStorage access denied: "+e.message),h}if(!t||e!==d&&"sessionStorage"!==e)return h;try{t.setItem("1","1"),t.removeItem("1"),h=!0}catch(e){o.warn("DOMStorage is supported, but cannot be used: "+e.message)}return h}function m(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function g(e,t){return p(e)&&n.get().streaming[t+"CachingInfo"].enabled}function v(){if(!n)throw new Error(a.default.MISSING_CONFIG_ERROR)}return i={getSavedBitrateSettings:function(e){var t=NaN;if(v(),g(d,c)){var i=l.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(i))||{},a=(new Date).getTime()-parseInt(r.timestamp,10)>=n.get().streaming.lastBitrateCachingInfo.ttl||!1,s=parseFloat(r.bitrate);isNaN(s)||a?a&&localStorage.removeItem(i):(t=s,o.debug("Last saved bitrate for "+e+" was "+s))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(g(d,c)&&t){var n=l.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t.toFixed(3),timestamp:m()}))}catch(e){o.error(e.message)}}},getSavedMediaSettings:function(e){var t=null;if(v(),g(d,f)){var i=u.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(i))||{},a=(new Date).getTime()-parseInt(r.timestamp,10)>=n.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=r.settings,a&&(localStorage.removeItem(i),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(g(d,f)){var n=u.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:m()}))}catch(e){o.error(e.message)}}}},o=(0,r.default)(t).getInstance().getLogger(i),p(d)&&s.forEach(function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){o.error(e.message)}}}),i}h.__dashjs_factory_name="DOMStorage";var p=i.default.getSingletonFactory(h);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(n(11)),r=c(n(209)),a=c(n(210)),o=c(n(211)),s=c(n(212)),l=c(n(83)),u=c(n(1)),d=c(n(81));function c(e){return e&&e.__esModule?e:{default:e}}function f(){var e,t=void 0,n=void 0,u=void 0,c=void 0,f=void 0,h=void 0,p=this.context;function m(e){return t.getRolesForAdaptation(e).filter(function(e){return e.value===i.default.MAIN})[0]}function g(e,i,r){var a=t.getAdaptationsForType(n[0].mpd.manifest,e,i);if(!a||0===a.length)return null;if(a.length>1&&r){var o=v(r,i);if(c[r.id]&&c[r.id][i])for(var s=0,l=a.length;s<l;s++)if(c[r.id][i].isMediaInfoEqual(o[s]))return a[s];for(var u=0,d=a.length;u<d;u++)if(m(a[u]))return a[u]}return a[0]}function v(e,i,r){var a,o=n,s=r,l=[],d=void 0,c=void 0,h=void 0,p=void 0,m=void 0,g=void 0;if(s)R(),o=y(s);else{if(!(n.length>0))return l;s=n[0].mpd.manifest}var v=w(e,o);v&&(g=v.id);var _=t.getAdaptationsForType(s,e?e.index:null,i!==f.EMBEDDED_TEXT?i:f.VIDEO);if(!_||0===_.length)return l;for(u[g]=u[g]||t.getAdaptationsForPeriod(v),p=0,a=_.length;p<a;p++)if(d=_[p],h=t.getIndexForAdaptation(d,s,e.index),c=A(u[g][h]),i===f.EMBEDDED_TEXT){var E=c.accessibility.length;for(m=0;m<E;m++)if(c){var b=c.accessibility[m];if(0===b.indexOf("cea-608:")){var T=b.substring(8).split(";");if("CC"===T[0].substring(0,2))for(m=0;m<T.length;m++)c||(c=A.call(this,u[g][h])),S(c,T[m].substring(0,3),T[m].substring(4)),l.push(c),c=null;else for(m=0;m<T.length;m++)c||(c=A.call(this,u[g][h])),S(c,"CC"+(m+1),T[m]),l.push(c),c=null}else 0===b.indexOf("cea-608")&&(S(c,f.CC1,"eng"),l.push(c),c=null)}}else i===f.IMAGE?(x(c),l.push(c),c=null):c&&l.push(c);return l}function y(e){var n=_(e);return t.getRegularPeriods(n)}function _(e){var n=b(e);return t.getMpd(n)}function E(){n=[],u={},c={}}function b(e){return e||(n.length>0?n[0].mpd.manifest:null)}function T(e){return e&&e.streamInfo&&void 0!==e.streamInfo.id&&u[e.streamInfo.id]?u[e.streamInfo.id][e.index]:null}function w(e,t){for(var n=t.length,i=0;i<n;i++){var r=t[i];if(e&&e.id===r.id)return r}return null}function A(e){if(!e)return null;var n,i=new a.default,r=e.period.mpd.manifest.Period_asArray[e.period.index].AdaptationSet_asArray[e.index];return i.id=e.id,i.index=e.index,i.type=e.type,i.streamInfo=M(e.period),i.representationCount=t.getRepresentationCount(r),i.labels=t.getLabelsForAdaptation(r),i.lang=t.getLanguageForAdaptation(r),n=t.getViewpointForAdaptation(r),i.viewpoint=n?n.value:void 0,i.accessibility=t.getAccessibilityForAdaptation(r).map(function(e){var t=e.value,n=t;return e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&void 0!==h&&(n=t?"cea-608:"+t:"cea-608",i.embeddedCaptions=!0),n}),i.audioChannelConfiguration=t.getAudioChannelConfigurationForAdaptation(r).map(function(e){return e.value}),0===i.audioChannelConfiguration.length&&Array.isArray(r.Representation_asArray)&&r.Representation_asArray.length>0&&(i.audioChannelConfiguration=t.getAudioChannelConfigurationForRepresentation(r.Representation_asArray[0]).map(function(e){return e.value})),i.roles=t.getRolesForAdaptation(r).map(function(e){return e.value}),i.codec=t.getCodec(r),i.mimeType=t.getMimeType(r),i.contentProtection=t.getContentProtectionData(r),i.bitrateList=t.getBitrateListForAdaptation(r),i.contentProtection&&i.contentProtection.forEach(function(e){e.KID=t.getKID(e)}),i.isText=t.getIsTextTrack(i.mimeType),i.supplementalProperties=t.getSupplementalPropperties(r),i}function S(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type=f.EMBEDDED_TEXT,e.codec="cea-608-in-SEI",e.isText=!0,e.isEmbedded=!0,e.lang=n,e.roles=["caption"]}function x(e){e.type=f.IMAGE}function M(e){var n,i,r=new o.default;return r.id=e.id,r.index=e.index,r.start=e.start,r.duration=e.duration,r.manifestInfo=(n=e.mpd,(i=new s.default).DVRWindowSize=n.timeShiftBufferDepth,i.loadedTime=n.manifest.loadedTime,i.availableFrom=n.availabilityStartTime,i.minBufferTime=n.manifest.minBufferTime,i.maxFragmentDuration=n.maxSegmentDuration,i.duration=t.getDuration(n.manifest),i.isDynamic=t.getIsDynamic(n.manifest),i.serviceDescriptions=t.getServiceDescriptions(n.manifest),i),r.isLast=1===e.mpd.manifest.Period_asArray.length||Math.abs(r.start+r.duration-r.manifestInfo.duration)<1,r}function R(){if(!f)throw new Error("setConfig function has to be called previously")}function C(e){return n.length>0?n[0].mpd.manifest.Period_asArray[e]:null}function I(e,t,n){var i=void 0,r=void 0,a=void 0,o=void 0,s=void 0;if(e)for(i=e.AdaptationSet_asArray,o=0;o<i.length;o+=1)for(a=i[o].Representation_asArray,s=0;s<a.length;s+=1)if(t===(r=a[s]).id)return n?s:r;return null}return e={getBandwidthForRepresentation:function(e,t){var n;return(n=I(C(t),e))?n.bandwidth:null},getIndexForRepresentation:function(e,t){return function(e,t){var n=I(e,t,!0);return null!==n?n:-1}(C(t),e)},getMaxIndexForBufferType:function(e,n){return function(e,n){var i=void 0,r=void 0,a=void 0,o=void 0;if(!e||!n)return-1;for(r=e.AdaptationSet_asArray,o=0;o<r.length;o+=1)if(a=(i=r[o]).Representation_asArray,t.getIsTypeOf(i,n))return a.length;return-1}(C(n),e)},convertDataToRepresentationInfo:function(e){if(e){var n=new r.default,i=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],a=t.getRepresentationFor(e.index,i);return n.id=e.id,n.quality=e.index,n.bandwidth=t.getBandwidth(a),n.DVRWindow=e.segmentAvailabilityRange,n.fragmentDuration=e.segmentDuration||(e.segments&&e.segments.length>0?e.segments[0].duration:NaN),n.MSETimeOffset=e.MSETimeOffset,n.useCalculatedLiveEdgeTime=e.useCalculatedLiveEdgeTime,n.mediaInfo=A(e.adaptation),n}return null},getDataForMedia:T,getStreamsInfo:function(e,t){var i=[],r=n;if(e&&(R(),r=y(e)),r.length>0){(!t||t>r.length)&&(t=r.length);for(var a=0;a<t;a++)i.push(M(r[a]))}return i},getMediaInfoForType:function(e,i){if(0===n.length||!e)return null;var r=w(e,n);if(!r)return null;var a=r.id;u[a]=u[a]||t.getAdaptationsForPeriod(r);var o=g(e.index,i,e);if(!o)return null;var s=t.getIndexForAdaptation(o,n[0].mpd.manifest,e.index);return A(u[a][s])},getAllMediaInfoForType:v,getAdaptationForType:g,getRealAdaptation:function(e,i){var r,a=void 0,o=w(e,n);return r=i?i.id:null,n.length>0&&o&&(a=r?t.getAdaptationForId(r,n[0].mpd.manifest,o.index):t.getAdaptationForIndex(i.index,n[0].mpd.manifest,o.index)),a},getVoRepresentations:function(e){var n=T(e);return t.getRepresentationsForAdaptation(n)},getEventsFor:function(e,i){var s=[];if(n.length>0){var l=n[0].mpd.manifest;e instanceof o.default?s=t.getEventsForPeriod(w(e,n)):e instanceof a.default?s=t.getEventStreamForAdaptationSet(l,T(e)):e instanceof r.default&&(s=t.getEventStreamForRepresentation(l,i))}return s},getEvent:function(e,t,n){if(!e||!t)return null;var i=new l.default,r=e.scheme_id_uri,a=e.value,o=e.timescale,s=e.presentation_time_delta,u=e.event_duration,d=e.id,c=e.message_data,f=n*o+s;return t[r+"/"+a]?(i.eventStream=t[r+"/"+a],i.eventStream.value=a,i.eventStream.timescale=o,i.duration=u,i.id=d,i.presentationTime=f,i.messageData=c,i.presentationTimeDelta=s,i):null},setConfig:function(e){e&&(e.constants&&(f=e.constants),e.cea608parser&&(h=e.cea608parser),e.errHandler&&t.setConfig({errHandler:e.errHandler}),e.BASE64&&t.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;R(),n=y(e),u={}},setCurrentMediaInfo:function(e,t,n){c[e]=c[e]||{},c[e][t]=c[e][t]||{},c[e][t]=n},getUseCalculatedLiveEdgeTimeForMediaInfo:function(e){var n=T(e);return t.getUseCalculatedLiveEdgeTimeForAdaptation(n)},getIsTextTrack:function(e){return t.getIsTextTrack(e)},getUTCTimingSources:function(){var e=b();return t.getUTCTimingSources(e)},getSuggestedPresentationDelay:function(){var e=n.length>0?n[0].mpd:null;return t.getSuggestedPresentationDelay(e)},getAvailabilityStartTime:function(e){var n=_(e);return t.getAvailabilityStartTime(n)},getIsDynamic:function(e){var n=b(e);return t.getIsDynamic(n)},getDuration:function(e){var n=b(e);return t.getDuration(n)}
vendor: 17,340 bytes, line 73
73,getRegularPeriods:y,getLocation:function(e){return t.getLocation(e)},getManifestUpdatePeriod:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.getManifestUpdatePeriod(e,n)},getIsDVB:function(e){return t.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getBaseURLsFromElement:function(e){return t.getBaseURLsFromElement(e)},getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getCodec:function(e,n,i){return t.getCodec(e,n,i)},reset:E},t=(0,d.default)(p).getInstance(),E(),e}f.__dashjs_factory_name="DashAdapter",t.default=u.default.getSingletonFactory(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null}return i(e,[{key:"isMediaInfoEqual",value:function(e){if(!e)return!1;var t=this.id===e.id,n=this.viewpoint===e.viewpoint,i=this.lang===e.lang,r=this.roles.toString()===e.roles.toString(),a=this.accessibility.toString()===e.accessibility.toString(),o=this.audioChannelConfiguration.toString()===e.audioChannelConfiguration.toString();return t&&n&&i&&r&&a&&o}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(4)),r=n(9),a=d(n(1)),o=d(n(10)),s=d(n(214)),l=d(n(215)),u=n(48);function d(e){return e&&e.__esModule?e:{default:e}}function c(e){e=e||{};var t,n=this.context,a=void 0,d=void 0,c=void 0,f=e.metricsModel;function h(e,t,n){return g(f.getMetricsFor(e,t),n)}function p(e,t){var n=f.getMetricsFor(e,t);if(!n)return null;var i=n.HttpList,r=null,a=void 0;if(!i||i.length<=0)return null;for(a=i.length-1;a>=0;){if(i[a].responsecode){r=i[a];break}a--}return r}function m(e){var t=f.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function g(e,t){if(!e)return null;var n=e[t];return!n||n.length<=0?null:n[n.length-1]}function v(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),i=0,r=n.length;i<r;i++){var a=n[i],o=a.indexOf(": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}return t={getCurrentRepresentationSwitch:function(e,t){return g(f.getMetricsFor(e,t),o.default.TRACK_SWITCH)},getLatestBufferInfoVO:h,getCurrentBufferLevel:function(e,t){var n=h(e,t,o.default.BUFFER_LEVEL);return n?s.default.round10(n.level/1e3,-3):0},getCurrentHttpRequest:p,getHttpRequests:m,getCurrentDroppedFrames:function(){return g(f.getMetricsFor(i.default.VIDEO,!0),o.default.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(e){return g(f.getMetricsFor(e,!0),o.default.SCHEDULING_INFO)},getCurrentDVRInfo:function(e){return g(e?f.getMetricsFor(e,!0):f.getMetricsFor(i.default.VIDEO,!0)||f.getMetricsFor(i.default.AUDIO,!0),o.default.DVR_INFO)},getCurrentManifestUpdate:function(){return g(f.getMetricsFor(i.default.STREAM),o.default.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(e,t){var n={},i=p(e,!0);return i&&(n=v(i._responseHeaders)),void 0===n[t]?null:n[t]},getLatestMPDRequestHeaderValueByID:function(e){var t,n={},a=void 0,o=void 0;for(o=(t=m(i.default.STREAM)).length-1;o>=0;o--)if((a=t[o]).type===r.HTTPRequest.MPD_TYPE){n=v(a._responseHeaders);break}return void 0===n[e]?null:n[e]},addRepresentationSwitch:function(e,t,n,i,r){f.addRepresentationSwitch(e,t,n,i,r)},addDVRInfo:function(e,t,n,i){f.addDVRInfo(e,t,n,i)},updateManifestUpdateInfo:function(e){var t=this.getCurrentManifestUpdate();f.updateManifestUpdateInfo(t,e)},addManifestUpdateStreamInfo:function(e){if(e){var t=this.getCurrentManifestUpdate();f.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addManifestUpdateRepresentationInfo:function(e,t){if(e){var n=this.getCurrentManifestUpdate();f.addManifestUpdateRepresentationInfo(n,e.id,e.index,e.streamIndex,t,e.presentationTimeOffset,e.startNumber,e.fragmentInfoType)}},addManifestUpdate:function(e){f.addManifestUpdate(i.default.STREAM,e.type,e.requestStartDate,e.requestEndDate)},addHttpRequest:function(e,t,n,i,r){f.addHttpRequest(e.mediaType,null,e.type,e.url,e.quality,t,e.serviceLocation||null,e.range||null,e.requestStartDate,e.firstByteDate,e.requestEndDate,n,e.duration,i,r)},addSchedulingInfo:function(e,t){f.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t)},addRequestsQueue:function(e,t,n){f.addRequestsQueue(e,t,n)},addBufferLevel:function(e,t,n){f.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){f.addBufferState(e,t,n)},addDroppedFrames:function(e){f.addDroppedFrames(i.default.VIDEO,e)},addPlayList:function(){c&&(f.addPlayList(c),c=null)},addDVBErrors:function(e){f.addDVBErrors(e)},createPlaylistMetrics:function(e,t){(c=new u.PlayList).start=new Date,c.mstart=e,c.starttype=t},createPlaylistTraceMetrics:function(e,t,n){!0===a&&(a=!1,(d=new u.PlayListTrace).representationid=e,d.start=new Date,d.mstart=t,d.playbackspeed=n)},updatePlayListTraceMetrics:function(e){if(d)for(var t in d)d[t]=e[t]},pushPlayListTraceMetrics:function(e,t){if(!1===a&&c&&d&&d.start){var n=d.start,i=e.getTime()-n.getTime();d.duration=i,d.stopreason=t,c.trace.push(d),a=!0}},clearAllCurrentMetrics:function(){f.clearAllCurrentMetrics()}},f=f||(0,l.default)(n).getInstance({settings:e.settings}),a=!0,d=null,c=null,t}c.__dashjs_factory_name="DashMetrics",t.default=a.default.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"round10",value:function(e,t){return function(e,t,n){if(void 0===n||0===+n)return Math[e](t);if(t=+t,n=+n,null===t||isNaN(t)||!("number"==typeof n&&n%1==0))return NaN;return t=t.toString().split("e"),t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+n:n))}("round",e,t)}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=y(n(4)),r=y(n(10)),a=y(n(216)),o=n(9),s=y(n(217)),l=y(n(218)),u=y(n(219)),d=y(n(220)),c=y(n(221)),f=n(222),h=y(n(223)),p=y(n(2)),m=y(n(224)),g=y(n(5)),v=y(n(1));function y(e){return e&&e.__esModule?e:{default:e}}function _(e){var t,n=(e=e||{}).settings,v=this.context,y=(0,p.default)(v).getInstance(),_=void 0;function E(){y.trigger(g.default.METRICS_CHANGED)}function b(e){y.trigger(g.default.METRIC_CHANGED,{mediaType:e}),E()}function T(e,t,n){y.trigger(g.default.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),b(e)}function w(e,t,n){y.trigger(g.default.METRIC_ADDED,{mediaType:e,metric:t,value:n}),b(e)}function A(e,t){var n=null;return e?(_.hasOwnProperty(e)?n=_[e]:t||(n=new a.default,_[e]=n),n):n}function S(e,t,i){var r=A(e);null!==r&&(r[t].push(i),r[t].length>n.get().streaming.metricsMaxListDepth&&r[t].shift())}function x(e,t,n){S(e,t,n),w(e,t,n)}return t={clearCurrentMetricsForType:function(e){delete _[e],b(e)},clearAllCurrentMetrics:function(){_={},E()},getMetricsFor:A,addHttpRequest:function e(t,n,i,a,s,l,u,d,c,f,h,p,m,g,v){var y=new o.HTTPRequest;l&&l!==a&&(e(t,null,i,a,s,null,null,d,c,null,null,null,m,null,null),y.actualurl=l),y.tcpid=n,y.type=i,y.url=a,y.range=d,y.trequest=c,y.tresponse=f,y.responsecode=p,y._tfinish=h,y._stream=t,y._mediaduration=m,y._quality=s,y._responseHeaders=g,y._serviceLocation=u,v?v.forEach(function(e){!function(e,t,n,i){var r=new o.HTTPRequestTrace;r.s=t,r.d=n,r.b=i,e.trace.push(r),e.interval||(e.interval=0),e.interval+=n}(y,e.s,e.d,e.b)}):(delete y.interval,delete y.trace),x(t,r.default.HTTP_REQUEST,y)},addRepresentationSwitch:function(e,t,n,i,a){var o=new s.default;o.t=t,o.mt=n,o.to=i,a?o.lto=a:delete o.lto,x(e,r.default.TRACK_SWITCH,o)},addBufferLevel:function(e,t,n){var i=new l.default;i.t=t,i.level=n,x(e,r.default.BUFFER_LEVEL,i)},addBufferState:function(e,t,n){var i=new u.default;i.target=n,i.state=t,x(e,r.default.BUFFER_STATE,i)},addDVRInfo:function(e,t,n,i){var a=new d.default;a.time=t,a.range=i,a.manifestInfo=n,x(e,r.default.DVR_INFO,a)},addDroppedFrames:function(e,t){var n=new c.default,i=A(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,i.length>0&&i[i.length-1]==n||x(e,r.default.DROPPED_FRAMES,n))},addSchedulingInfo:function(e,t,n,i,a,o,s,l,u){var d=new h.default;d.mediaType=e,d.t=t,d.type=n,d.startTime=i,d.availabilityStartTime=a,d.duration=o,d.quality=s,d.range=l,d.state=u,x(e,r.default.SCHEDULING_INFO,d)},addRequestsQueue:function(e,t,n){var i=new m.default;i.loadingRequests=t,i.executedRequests=n,A(e).RequestsQueue=i,w(e,r.default.REQUESTS_QUEUE,i)},addManifestUpdate:function(e,t,n,a,o,s,l,u,d,c){var h=new f.ManifestUpdate;h.mediaType=e,h.type=t,h.requestTime=n,h.fetchTime=a,h.availabilityStartTime=o,h.presentationStartTime=s,h.clientTimeOffset=l,h.currentTime=u,h.buffered=d,h.latency=c,S(i.default.STREAM,r.default.MANIFEST_UPDATE,h),w(e,r.default.MANIFEST_UPDATE,h)},updateManifestUpdateInfo:function(e,t){if(e){for(var n in t)e[n]=t[n];T(e.mediaType,r.default.MANIFEST_UPDATE,e)}},addManifestUpdateStreamInfo:function(e,t,n,i,a){if(e){var o=new f.ManifestUpdateStreamInfo;o.id=t,o.index=n,o.start=i,o.duration=a,e.streamInfo.push(o),T(e.mediaType,r.default.MANIFEST_UPDATE_STREAM_INFO,e)}},addManifestUpdateRepresentationInfo:function(e,t,n,i,a,o,s,l){if(e&&e.representationInfo){var u=new f.ManifestUpdateRepresentationInfo;u.id=t,u.index=n,u.streamIndex=i,u.mediaType=a,u.startNumber=s,u.fragmentInfoType=l,u.presentationTimeOffset=o,e.representationInfo.push(u),T(e.mediaType,r.default.MANIFEST_UPDATE_TRACK_INFO,e)}},addPlayList:function(e){e.trace&&Array.isArray(e.trace)?e.trace.forEach(function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel}):delete e.trace,x(i.default.STREAM,r.default.PLAY_LIST,e)},addDVBErrors:function(e){x(i.default.STREAM,r.default.DVB_ERRORS,e)}},_={},t}_.__dashjs_factory_name="MetricsModel",t.default=v.default.getSingletonFactory(_)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.level=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(10),a=(i=r)&&i.__esModule?i:{default:i};t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=null,this.state=a.default.BUFFER_EMPTY}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.range=null,this.manifestInfo=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.droppedFrames=null}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});t.ManifestUpdate=function e(){i(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},t.ManifestUpdateStreamInfo=function e(){i(this,e),this.id=null,this.index=null,this.start=null,this.duration=null},t.ManifestUpdateRepresentationInfo=function e(){i(this,e),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadingRequests=[],this.executedRequests=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(2)),r=o(n(5)),a=o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.context,t=(0,i.default)(e).getInstance(),n=void 0,a=void 0,o=void 0;function s(e){n=e}function l(e,t,i,r){return r?i&&t.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(t.availabilityStartTime.getTime()+1e3*(e+t.timeShiftBufferDepth)):t.availabilityEndTime:i?new Date(t.availabilityStartTime.getTime()+1e3*(e-n)):t.availabilityStartTime}function u(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*n)/1e3}function d(e){a||void 0!==e.offset&&(s(e.offset/1e3),a=!0)}function c(){n=0,a=!1,o=NaN}return{initialize:function(){c(),t.on(r.default.TIME_SYNCHRONIZATION_COMPLETED,d,this)},isTimeSyncCompleted:function(){return a},setTimeSyncCompleted:function(e){a=e},getClientTimeOffset:function(){return n},setClientTimeOffset:s,getExpectedLiveEdge:function(){return o},setExpectedLiveEdge:function(e){o=e},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return l.call(this,e,t,n)},calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return l.call(this,e,t,n,!0)},calcPresentationTimeFromWallTime:u,calcPresentationTimeFromMediaTime:function(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)},calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcSegmentAvailabilityRange:function(e,t){var n=e.adaptation.period,i={start:n.start,end:n.start+n.duration};if(!t)return i;if(!a&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;var r=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0),o=u(new Date,n),s=n.start+n.duration;i.start=Math.max(o-n.mpd.timeShiftBufferDepth,n.start);var l=void 0!==e.availabilityTimeOffset&&e.availabilityTimeOffset<r?r-e.availabilityTimeOffset:r;return i.end=o>=s&&o-l<s?s:o-l,i},getPeriodEnd:function(e,t){var n=e.adaptation.period;if(!t)return n.start+n.duration;if(!a&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;var i=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0),r=u(new Date,n),o=n.start+n.duration,s=void 0!==e.availabilityTimeOffset&&e.availabilityTimeOffset<i?i-e.availabilityTimeOffset:i;return Math.min(r-s,o)}
vendor: 27,995 bytes, line 73
73,calcWallTimeForSegment:function(e,t){var n=void 0,i=void 0,r=void 0;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,i=e.presentationStartTime+n,r=new Date(e.availabilityStartTime.getTime()+1e3*i)),r},reset:function(){t.off(r.default.TIME_SYNCHRONIZATION_COMPLETED,d,this),c()}}}s.__dashjs_factory_name="TimelineConverter",t.default=a.default.getSingletonFactory(s)},function(e,t,n){"use strict";var i,r,o,l,u,d={encode:function(e){for(var t=[],n=0;n<e.length;++n){var i=e.charCodeAt(n);i<128?t.push(i):i<2048?(t.push(192|i>>6),t.push(128|63&i)):i<65536?(t.push(224|i>>12),t.push(128|63&i>>6),t.push(128|63&i)):(t.push(240|i>>18),t.push(128|63&i>>12),t.push(128|63&i>>6),t.push(128|63&i))}return t},decode:function(e){for(var t=[],n=0;n<e.length;){var i=e[n++];i<128||(i<224?(i=(31&i)<<6,i|=63&e[n++]):i<240?(i=(15&i)<<12,i|=(63&e[n++])<<6,i|=63&e[n++]):(i=(7&i)<<18,i|=(63&e[n++])<<12,i|=(63&e[n++])<<6,i|=63&e[n++])),t.push(String.fromCharCode(i))}return t.join("")}},c={};i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=function(e){for(var t=0,n=[],r=0|e.length/3;0<r--;){var a=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,n.push(i.charAt(63&a>>18)),n.push(i.charAt(63&a>>12)),n.push(i.charAt(63&a>>6)),n.push(i.charAt(63&a))}return 2==e.length-t?(a=(e[t]<<16)+(e[t+1]<<8),n.push(i.charAt(63&a>>18)),n.push(i.charAt(63&a>>12)),n.push(i.charAt(63&a>>6)),n.push("=")):1==e.length-t&&(a=e[t]<<16,n.push(i.charAt(63&a>>18)),n.push(i.charAt(63&a>>12)),n.push("==")),n.join("")},o=function(){for(var e=[],t=0;t<64;++t)e[i.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),l=function(e){for(var t=0,n=[],i=0|e.length/4;0<i--;){var r=(o[e.charCodeAt(t)]<<18)+(o[e.charCodeAt(t+1)]<<12)+(o[e.charCodeAt(t+2)]<<6)+o[e.charCodeAt(t+3)];n.push(255&r>>16),n.push(255&r>>8),n.push(255&r),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},u={encode:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},c.decodeArray=function(e){var t=l(e);return new Uint8Array(t)},c.encodeASCII=function(e){var t=u.encode(e);return r(t)},c.decodeASCII=function(e){var t=l(e);return u.decode(t)},c.encode=function(e){var t=d.encode(e);return r(t)},c.decode=function(e){var t=l(e);return d.decode(t)},t.decode=c.decode,t.decodeArray=c.decodeArray,t.encode=c.encode,t.encodeASCII=c.encodeASCII},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=l(n(228)),r=l(n(35)),a=l(n(230)),o=l(n(92)),s=l(n(91));function l(e){return e&&e.__esModule?e:{default:e}}function u(){var e=this.context;return{createMetricsReporting:function(t){return(0,i.default)(e).getInstance({eventBus:t.eventBus,dashMetrics:t.dashMetrics,metricsConstants:t.metricsConstants,events:t.events}),(0,a.default)(e).create(t)},getReportingFactory:function(){return(0,s.default)(e).getInstance()},getMetricsHandlerFactory:function(){return(0,o.default)(e).getInstance()}}}u.__dashjs_factory_name="MetricsReporting";var d=dashjs.FactoryMaker.getClassFactory(u);d.events=r.default,dashjs.FactoryMaker.updateClassFactory(u.__dashjs_factory_name,d),t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(229)),r=a(n(35));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=void 0,n=void 0,a=(e=e||{}).eventBus,o=e.dashMetrics,s=e.metricsConstants,l=e.events;function u(e){var t=new i.default;if(n){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.mpdurl||(t.mpdurl=n.originalUrl||n.url),t.terror||(t.terror=new Date),o.addDVBErrors(t)}}function d(e){e.error||(n=e.manifest)}function c(e){u({errorcode:i.default.BASE_URL_CHANGED,servicelocation:e.entry})}function f(){u({errorcode:i.default.BECAME_REPORTER})}function h(e){if(e.metric===s.HTTP_REQUEST)(0===(t=e.value).responsecode||t.responsecode>=400||t.responsecode<100||t.responsecode>=600)&&u({errorcode:t.responsecode||i.default.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation});var t}function p(e){var t=void 0;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=i.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=i.default.CORRUPT_MEDIA_OTHER;break;default:return}u({errorcode:t})}function m(){a.on(l.MANIFEST_UPDATED,d,t),a.on(l.SERVICE_LOCATION_BLACKLIST_CHANGED,c,t),a.on(l.METRIC_ADDED,h,t),a.on(l.METRIC_UPDATED,h,t),a.on(l.PLAYBACK_ERROR,p,t),a.on(r.default.BECAME_REPORTING_PLAYER,f,t)}return t={initialise:m,reset:function(){a.off(l.MANIFEST_UPDATED,d,t),a.off(l.SERVICE_LOCATION_BLACKLIST_CHANGED,c,t),a.off(l.METRIC_ADDED,h,t),a.off(l.METRIC_UPDATED,h,t),a.off(l.PLAYBACK_ERROR,p,t),a.off(r.default.BECAME_REPORTING_PLAYER,f,t)}},m(),t}o.__dashjs_factory_name="DVBErrorsTranslator",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};i.SSL_CONNECTION_FAILED_PREFIX="SSL",i.DNS_RESOLUTION_FAILED="C00",i.HOST_UNREACHABLE="C01",i.CONNECTION_REFUSED="C02",i.CONNECTION_ERROR="C03",i.CORRUPT_MEDIA_ISOBMFF="M00",i.CORRUPT_MEDIA_OTHER="M01",i.BASE_URL_CHANGED="F00",i.BECAME_REPORTER="S00",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(231)),r=o(n(242)),a=o(n(35));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t={},n=this.context,o=e.eventBus,s=e.events;function l(s){if(!s.error){var l=Object.keys(t);(0,r.default)(n).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(s.manifest).forEach(function(r){var a=JSON.stringify(r);if(t.hasOwnProperty(a))l.splice(a,1);else try{var o=(0,i.default)(n).create(e);o.initialize(r),t[a]=o}catch(e){}}),l.forEach(function(e){t[e].reset(),delete t[e]}),o.trigger(a.default.METRICS_INITIALISATION_COMPLETE)}}function u(){Object.keys(t).forEach(function(e){t[e].reset()}),t={}}return o.on(s.MANIFEST_UPDATED,l),o.on(s.STREAM_TEARDOWN_COMPLETE,u),{reset:function(){o.off(s.MANIFEST_UPDATED,l),o.off(s.STREAM_TEARDOWN_COMPLETE,u)}}}s.__dashjs_factory_name="MetricsCollectionController",t.default=dashjs.FactoryMaker.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(232)),r=o(n(233)),a=o(n(237));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){e=e||{};var t=void 0,n=void 0,o=void 0,s=this.context;function l(){t&&t.reset(),n&&n.reset(),o&&o.reset()}return{initialize:function(u){try{(o=(0,i.default)(s).create({mediaElement:e.mediaElement})).initialize(u.Range),(n=(0,r.default)(s).create({debug:e.debug,metricsConstants:e.metricsConstants})).initialize(u.Reporting,o),(t=(0,a.default)(s).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events})).initialize(u.metrics,n)}catch(e){throw l(),e}},reset:l}}s.__dashjs_factory_name="MetricsController",t.default=dashjs.FactoryMaker.getClassFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(67),a=(i=r)&&i.__esModule?i:{default:i};function o(e){e=e||{};var t,n=!1,i=this.context,r=void 0,o=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach(function(e){var t=e.starttime,n=t+e.duration;r.add(t,n)}),n=!!e[0]._useWallClockTime)},reset:function(){r.clear()},isEnabled:function(){var e,t=r.length;if(!t)return!0;e=n?(new Date).getTime()/1e3:o.currentTime;for(var i=0;i<t;i+=1){var a=r.start(i),s=r.end(i);if(a<=e&&e<s)return!0}return!1}},r=(0,a.default)(i).create(),t}o.__dashjs_factory_name="RangeController",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(91),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=[],n=(0,a.default)(this.context).getInstance(e);return{initialize:function(e,i){e.some(function(e){var r=n.create(e,i);if(r)return t.push(r),!0})},reset:function(){t.forEach(function(e){return e.reset()}),t=[]},report:function(e,n){t.forEach(function(t){return t.report(e,n)})}}}o.__dashjs_factory_name="ReportingController",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(235)),r=a(n(236));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){e=e||{};var t,n=this.context,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,c=[],f=e.metricsConstants;function h(){s=!1,l=!1,u=null,d=null}return t={report:function(e,t){Array.isArray(t)||(t=[t]),l&&d.isEnabled()&&t.forEach(function(t){var n=a.serialise(t);e!==f.DVB_ERRORS&&(n="metricname="+e+"&"+n),function(e,t,n){var i=new XMLHttpRequest,r=function(){var e=c.indexOf(i);-1!==e&&(c.splice(e,1),i.status>=200&&i.status<300?t&&t():n&&n())};c.push(i);try{i.open("GET",e),i.onloadend=r,i.onerror=r,i.send()}catch(e){i.onerror()}}(n=u+"?"+n,null,function(){l=!1})})},initialize:function(e,t){var n=void 0;if(d=t,!(u=e["dvb:reportingUrl"]))throw new Error("required parameter missing (dvb:reportingUrl)");s||((n=e["dvb:probability"]||e["dvb:priority"]||0)&&(1e3===n||n/1e3>=o.random())&&(l=!0),s=!0)},reset:function(){h()}},a=(0,i.default)(n).getInstance(),o=(0,r.default)(n).getInstance(),h(),t}o.__dashjs_factory_name="DVBReporting",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";function i(){return{serialise:function e(t){var n=[],i=[],r=void 0,a=void 0;for(r in t)if(t.hasOwnProperty(r)&&0!==r.indexOf("_")){if(null==(a=t[r])&&(a=""),Array.isArray(a)){if(!a.length)continue;i=[],a.forEach(function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);i.push(n?t:e(t))}),a=i.map(encodeURIComponent).join(",")}else"string"==typeof a?a=encodeURIComponent(a):a instanceof Date?a=a.toISOString():"number"==typeof a&&(a=Math.round(a));n.push(r+"="+a)}return n.join("&")}}}Object.defineProperty(t,"__esModule",{value:!0}),i.__dashjs_factory_name="MetricSerialiser",t.default=dashjs.FactoryMaker.getSingletonFactory(i)},function(e,t,n){"use strict";function i(){var e,t=window.crypto||window.msCrypto,n=Uint32Array,i=Math.pow(2,8*n.BYTES_PER_ELEMENT)-1,r=void 0,a=void 0;function o(){t&&(r||(r=new n(10)),t.getRandomValues(r),a=0)}return e={random:function(e,n){var s=void 0;return e||(e=0),n||(n=1),t?(a===r.length&&o(),s=r[a]/i,a+=1):s=Math.random(),s*(n-e)+e}},o(),e}Object.defineProperty(t,"__esModule",{value:!0}),i.__dashjs_factory_name="RNG",t.default=dashjs.FactoryMaker.getSingletonFactory(i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(92),a=(i=r)&&i.__esModule?i:{default:i};function o(e){e=e||{};var t=[],n=void 0,i=this.context,r=e.eventBus,o=e.events,s=(0,a.default)(i).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function l(e){t.forEach(function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)})}return n={initialize:function(e,i){e.split(",").forEach(function(e,n,r){var a;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){var o=r[n+1];o&&-1===o.indexOf("(")&&-1!==o.indexOf(")")&&(e+=","+o,delete r[n+1])}(a=s.create(e,i))&&t.push(a)}),r.on(o.METRIC_ADDED,l,n),r.on(o.METRIC_UPDATED,l,n)},reset:function(){r.off(o.METRIC_ADDED,l,n),r.off(o.METRIC_UPDATED,l,n),t.forEach(function(e){return e.reset()}),t=[]}}}o.__dashjs_factory_name="MetricsHandlersController",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(93),a=(i=r)&&i.__esModule?i:{default:i};function o(e){e=e||{};var t=void 0,n=void 0,i=void 0,r=void 0,o=void 0,s=this.context,l=(0,a.default)(s).getInstance(),u=[],d=e.metricsConstants;function c(){var e=function(){try{return Object.keys(u).map(function(e){return u[e]}).reduce(function(e,t){return e.level<t.level?e:t})}catch(e){return}}();e&&o!==e.t&&(o=e.t,t.report(i,e))}return{initialize:function(e,a,o){a&&(n=l.validateN(o),t=a,i=l.reconstructFullMetricName(e,o),r=setInterval(c,n))},reset:function(){clearInterval(r),r=null,n=0,t=null,o=null},handleNewMetric:function(e,t,n){e===d.BUFFER_LEVEL&&(u[n]=t)}}}o.__dashjs_factory_name="BufferLevelHandler",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(35),a=(i=r)&&i.__esModule?i:{default:i};t.default=dashjs.FactoryMaker.getClassFactory(function(e){var t=void 0,n=(e=e||{}).eventBus,i=e.metricsConstants;function r(){n.off(a.default.METRICS_INITIALISATION_COMPLETE,r,this),n.trigger(a.default.BECAME_REPORTING_PLAYER)}return{initialize:function(e,i){i&&(t=i,n.on(a.default.METRICS_INITIALISATION_COMPLETE,r,this))},reset:function(){t=null},handleNewMetric:function(e,n){e===i.DVB_ERRORS&&t&&t.report(e,n)}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(93),a=(i=r)&&i.__esModule?i:{default:i};function o(e){e=e||{};var t=void 0,n=void 0,i=void 0,r=void 0,o=void 0,s=[],l=(0,a.default)(this.context).getInstance(),u=e.metricsConstants;function d(){var e=s;e.length&&t&&t.report(r,e),s=[]}return{initialize:function(e,a,s,u){a&&(n=l.validateN(s),t=a,u&&u.length&&(i=u),r=l.reconstructFullMetricName(e,s,u),o=setInterval(d,n))},reset:function(){clearInterval(o),o=null,n=null,i=null,s=[],t=null},handleNewMetric:function(e,t){e===u.HTTP_REQUEST&&(i&&i!==t.type||s.push(t))}}}o.__dashjs_factory_name="HttpListHandler",t.default=dashjs.FactoryMaker.getClassFactory(o)},function(e,t,n){"use strict";function i(){var e=void 0,t=void 0;return{initialize:function(n,i){e=n,t=i},reset:function(){t=null,e=void 0},handleNewMetric:function(n,i){n===e&&t&&t.report(e,i)}}}Object.defineProperty(t,"__esModule",{value:!0}),i.__dashjs_factory_name="GenericMetricHandler",t.default=dashjs.FactoryMaker.getClassFactory(i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(243)),r=o(n(244)),a=o(n(245));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=(e=e||{}).adapter,n=e.constants;return{getMetrics:function(e){var o=[];return e&&e.Metrics_asArray&&e.Metrics_asArray.forEach(function(s){var l=new i.default,u=t.getIsDynamic(e);s.hasOwnProperty("metrics")&&(l.metrics=s.metrics,s.Range_asArray&&s.Range_asArray.forEach(function(i){var a=new r.default;a.starttime=function(e,i,r){var a=void 0,o=void 0,s=0;return i?s=t.getAvailabilityStartTime(e)/1e3:(a=t.getRegularPeriods(e)).length&&(s=a[0].start),o=s,r&&r.hasOwnProperty(n.START_TIME)&&(o+=r.starttime),o}(e,u,i),i.hasOwnProperty("duration")?a.duration=i.duration:a.duration=t.getDuration(e),a._useWallClockTime=u,l.Range.push(a)}),s.Reporting_asArray&&(s.Reporting_asArray.forEach(function(e){var t=new a.default;if(e.hasOwnProperty(n.SCHEME_ID_URI)){for(var i in t.schemeIdUri=e.schemeIdUri,e)e.hasOwnProperty(i)&&(t[i]=e[i]);l.Reporting.push(t)}}),o.push(l)))}),o}}}s.__dashjs_factory_name="ManifestParsing",t.default=dashjs.FactoryMaker.getSingletonFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(247)),r=d(n(36)),a=d(n(257)),o=d(n(26)),s=d(n(258)),l=d(n(259)),u=d(n(260));function d(e){return e&&e.__esModule?e:{default:e}}var c=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],f=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function h(){var e=void 0,t=this.context;function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];if("function"==typeof e[i[Object.keys(i)[0]]])return i}return null}return e={createProtectionSystem:function(a){var o=null,d=(0,r.default)(t).getInstance();d.setConfig({debug:a.debug,BASE64:a.BASE64}),d.initialize();var h=function(i){var r=i.debug,a=r.getLogger(e),o=i.eventBus,d=i.errHandler,h=i.videoModel?i.videoModel.getElement():null;return h&&void 0===h.onencrypted||h&&void 0===h.mediaKeys?n(h,f)?(a.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,l.default)(t).create({debug:r,eventBus:o,events:i.events,api:n(h,f)})):n(h,c)?(a.info("EME detected on this user agent! (ProtectionModel_01b)"),(0,u.default)(t).create({debug:r,eventBus:o,errHandler:d,events:i.events,api:n(h,c)})):(a.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(a.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,s.default)(t).create({debug:r,eventBus:o,events:i.events}))}(a);return!o&&h&&(o=(0,i.default)(t).create({protectionModel:h,protectionKeyController:d,eventBus:a.eventBus,debug:a.debug,events:a.events,BASE64:a.BASE64,constants:a.constants}),a.capabilities.setEncryptedMediaSupported(!0)),o}}}h.__dashjs_factory_name="Protection";var p=dashjs.FactoryMaker.getClassFactory(h);p.events=a.default,p.errors=o.default,dashjs.FactoryMaker.updateClassFactory(h.__dashjs_factory_name,p),t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=u(n(22)),a=u(n(248)),o=u(n(55)),s=u(n(26)),l=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}function d(e){var t=(e=e||{}).protectionKeyController,n=e.protectionModel,u=e.eventBus,d=e.events,c=e.debug,f=e.BASE64,h=e.constants,p=[],m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0;function w(){if(!(u&&u.hasOwnProperty("on")&&t&&t.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function A(e,i){var a=r.default.getPSSHForKeySystem(T,e),o=M(T);if(a){for(var c=n.getAllInitData(),f=0;f<c.length;f++)if(t.initDataEquals(a,c[f]))return void g.warn("DRM: Ignoring initData because we have already seen it!");try{n.createKeySession(a,o,C(T),i)}catch(e){u.trigger(d.KEY_SESSION_CREATED,{data:null,error:new l.default(s.default.KEY_SESSION_CREATED_ERROR_CODE,s.default.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e?n.createKeySession(e,o,C(T),i):u.trigger(d.KEY_SESSION_CREATED,{data:null,error:new l.default(s.default.KEY_SESSION_CREATED_ERROR_CODE,s.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(T?T.systemString:null)+".  needkey/encrypted event contains no initData corresponding to that key system!")})}function S(e,t){w(),n.loadKeySession(e,t,C(T))}function x(e){w(),e?(n.setMediaElement(e),u.on(d.NEED_KEY,N,this)):null===e&&(n.setMediaElement(e),u.off(d.NEED_KEY,N,this))}function M(e){var t=null;if(e){var n=e.systemString;_&&(t=n in _?_[n]:null)}return t}function R(e){var t=M(e),n=[],i=[],r=t&&t.audioRobustness&&t.audioRobustness.length>0?t.audioRobustness:b,s=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:b,l=C(e),u=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",d=t&&t.persistentState?t.persistentState:"temporary"===l?"optional":"required";return y.forEach(function(e){e.type===h.AUDIO?n.push(new a.default(e.codec,r)):e.type===h.VIDEO&&i.push(new a.default(e.codec,s))}),new o.default(n,i,u,d,[l])}function C(e){var t=M(e);return t&&t.sessionType?t.sessionType:E}function I(e,i){var r=this,a=[];e=e.sort(function(t,n){return(_&&_[t.ks.systemString]&&_[t.ks.systemString].priority>=0?_[t.ks.systemString].priority:e.length)-(_&&_[n.ks.systemString]&&_[n.ks.systemString].priority>=0?_[n.ks.systemString].priority:e.length)});var o=void 0;if(T){for(o=0;o<e.length;o++)if(T===e[o].ks){var c=function(){a.push({ks:e[o].ks,configs:[R(T)]});return u.on(d.KEY_SYSTEM_ACCESS_COMPLETE,function t(n){u.off(d.KEY_SYSTEM_ACCESS_COMPLETE,t,r),n.error?i||u.trigger(d.KEY_SYSTEM_SELECTED,{error:new l.default(s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+n.error)}):(g.info("DRM: KeySystem Access Granted"),u.trigger(d.KEY_SYSTEM_SELECTED,{data:n.data}),e[o].sessionId?S(e[o].sessionId,e[o].initData):e[o].initData&&A(e[o].initData,e[o].cdmData))},r),n.requestKeySystemAccess(a),"break"}();if("break"===c)break}}else if(void 0===T){T=null,v.push(e);for(var h=0;h<e.length;h++)a.push({ks:e[h].ks,configs:[R(e[h].ks)]});var p=void 0,m=function e(t){u.off(d.KEY_SYSTEM_ACCESS_COMPLETE,e,r),t.error?(T=void 0,u.off(d.INTERNAL_KEY_SYSTEM_SELECTED,y,r),i||u.trigger(d.KEY_SYSTEM_SELECTED,{data:null,error:new l.default(s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+t.error)})):(p=t.data,g.info("DRM: KeySystem Access Granted ("+p.keySystem.systemString+")!  Selecting key system..."),n.selectKeySystem(p))},y=function e(a){if(u.off(d.INTERNAL_KEY_SYSTEM_SELECTED,e,r),u.off(d.KEY_SYSTEM_ACCESS_COMPLETE,m,r),a.error)T=void 0,i||u.trigger(d.KEY_SYSTEM_SELECTED,{data:null,error:new l.default(s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,s.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+a.error)});else{if(!n)return;T=n.getKeySystem(),u.trigger(d.KEY_SYSTEM_SELECTED,{data:p});var c=M(T);c&&c.serverCertificate&&c.serverCertificate.length>0&&n.setServerCertificate(f.decodeArray(c.serverCertificate).buffer);for(var h=0;h<v.length;h++)for(o=0;o<v[h].length;o++)if(T===v[h][o].ks){if(t.isClearKey(T)&&c&&c.hasOwnProperty("clearkeys")){var g={kids:Object.keys(c.clearkeys)};v[h][o].initData=(new TextEncoder).encode(JSON.stringify(g))}v[h][o].sessionId?S(v[h][o].sessionId,v[h][o].initData):null!==v[h][o].initData&&A(v[h][o].initData,v[h][o].cdmData);break}}};u.on(d.INTERNAL_KEY_SYSTEM_SELECTED,y,r),u.on(d.KEY_SYSTEM_ACCESS_COMPLETE,m,r),n.requestKeySystemAccess(a)}else v.push(e)}function L(e,t){u.trigger(d.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function O(e){e.error?u.trigger(d.KEY_STATUSES_CHANGED,{data:null,error:e.error}):g.debug("DRM: key status = "+e.status)}function D(e){g.debug("DRM: onKeyMessage");var a=e.data;u.trigger(d.KEY_MESSAGE,{data:a});var o=a.messageType?a.messageType:"license-request",c=a.message,f=a.sessionToken,h=M(T),p=T?T.systemString:null,m=t.getLicenseServer(T,h,o),v={sessionToken:f,messageType:o};if(c&&0!==c.byteLength){if(!m)return g.debug("DRM: License server request not required for this message (type = "+e.data.messageType+").  Session ID = "+f.getSessionID()),void L(v);if(t.isClearKey(T)){var y=t.processClearKeyLicenseRequest(T,h,c);if(y)return g.debug("DRM: ClearKey license request handled by application!"),L(v),void n.updateKeySession(f,y)}var _=null;if(h&&h.serverURL){var E=h.serverURL;"string"==typeof E&&""!==E?_=E:"object"===(void 0===E?"undefined":i(E))&&E.hasOwnProperty(o)&&(_=E[o])}else h&&h.laURL&&""!==h.laURL?_=h.laURL:(_=T.getLicenseServerURLFromInitData(r.default.getPSSHData(f.initData)))||(_=e.data.laURL);if(_=m.getServerURLFromMessage(_,c,o)){var b={},w=!1,A=function(e){if(e)for(var t in e)"authorization"===t.toLowerCase()&&(w=!0),b[t]=e[t]};h&&A(h.httpRequestHeaders),A(T.getRequestHeadersFromMessage(c)),h&&"boolean"==typeof h.withCredentials&&(w=h.withCredentials);var S=function(e,t,n,i){var r=e.response?m.getErrorResponse(e.response,n,i):"NONE";L(t,new l.default(s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+".  Response is "+r))},x=T.getLicenseRequestFromMessage(c),R=m.getHTTPMethod(o),C=m.getResponseType(p,o),I=h&&!isNaN(h.httpTimeout)?h.httpTimeout:8e3;P(_,b,R,C,w,x,3,I,function(e){if(n)if(200===e.status){var t=m.getLicenseMessage(e.response,p,o);null!==t?(L(v),n.updateKeySession(f,t)):S(e,v,p,o)}else S(e,v,p,o)},function(e){L(v,new l.default(s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+p+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},function(e){L(v,new l.default(s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+p+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))})}else L(v,new l.default(s.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}else L(v,new l.default(s.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,s.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function P(e,t,n,i,r,a,o,s,l,u,d){var c=new XMLHttpRequest;for(var f in c.open(n,e,!0),c.responseType=i,c.withCredentials=r,s>0&&(c.timeout=s),t)c.setRequestHeader(f,t[f]);var h=function(){o--,setTimeout(function(){P(e,t,n,i,r,a,o,s,l,u,d)},1e3)};c.onload=function(){200===this.status||o<=0?l(this):(g.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+o),h())},c.ontimeout=c.onerror=function(){o<=0?d(this):(g.warn("License request network request failed . Retrying it... Pending retries: "+o),h())},c.onabort=function(){u(this)},c.send(a)}function N(e,i){if(g.debug("DRM: onNeedKey"),"cenc"===e.key.initDataType)if(0===y.length&&(g.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(i=void 0===i?1:i+1)<5))p.push(setTimeout(function(){N(e,i)},500));else{var a=e.key.initData;if(ArrayBuffer.isView(a)&&(a=a.buffer),T){var o=r.default.getPSSHForKeySystem(T,a);if(o)for(var s=n.getAllInitData(),l=0;l<s.length;l++)if(t.initDataEquals(o,s[l]))return void g.warn("DRM: Ignoring initData because we have already seen it!")}g.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(a)));var u=t.getSupportedKeySystems(a,_);0!==u.length?I(u,!1):g.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}else g.warn("DRM:  Only 'cenc' initData is supported!  Ignoring initData of type: "+e.key.initDataType)}return m={initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");w(),u.on(d.INTERNAL_KEY_MESSAGE,D,this),u.on(d.INTERNAL_KEY_STATUS_CHANGED,O,this),y.push(e);var n=t.getSupportedKeySystemsFromContentProtection(e.contentProtection);n&&n.length>0&&I(n,!0)},createKeySession:A,loadKeySession:S,removeKeySession:function(e){w(),n.removeKeySession(e)},closeKeySession:function(e){w(),n.closeKeySession(e)},setServerCertificate:function(e){w(),n.setServerCertificate(e)},setMediaElement:x,setSessionType:function(e){E=e},setRobustnessLevel:function(e){b=e},setProtectionData:function(e){_=e,t.setProtectionData(e)},getSupportedKeySystemsFromContentProtection:function(e){return w(),t.getSupp
vendor: 4,140 bytes, line 73
73ortedKeySystemsFromContentProtection(e)},getKeySystems:function(){return t?t.getKeySystems():[]},setKeySystems:function(e){t&&t.setKeySystems(e)},stop:function(){n&&n.stop()},reset:function(){w(),u.off(d.INTERNAL_KEY_MESSAGE,D,this),u.off(d.INTERNAL_KEY_STATUS_CHANGED,O,this),x(null),T=void 0,n&&(n.reset(),n=null),p.forEach(function(e){return clearTimeout(e)}),p=[],y=[]}},g=c.getLogger(m),v=[],y=[],E="temporary",b="",m}d.__dashjs_factory_name="ProtectionController",t.default=dashjs.FactoryMaker.getClassFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.contentType=t,this.robustness=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(56)),r=s(n(57)),a=s(n(22)),o=s(n(19));function s(e){return e&&e.__esModule?e:{default:e}}var l="e2719d58-a985-b3c9-781a-b030af78d30e",u=o.default.CLEARKEY_KEYSTEM_STRING,d="urn:uuid:"+l;function c(e){var t=(e=e||{}).BASE64;return{uuid:l,schemeIdURI:d,systemString:u,getInitData:function(e){return a.default.parseInitDataFromContentProtection(e,t)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var a=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),o=[],s=0;s<a.kids.length;s++){var l=a.kids[s],u=e.clearkeys&&e.clearkeys.hasOwnProperty(l)?e.clearkeys[l]:null;if(!u)throw new Error("DRM: ClearKey keyID ("+l+") is not known!");o.push(new i.default(l,u))}n=new r.default(o)}return n}}}c.__dashjs_factory_name="KeySystemClearKey",t.default=dashjs.FactoryMaker.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(56)),r=s(n(57)),a=s(n(22)),o=s(n(19));function s(e){return e&&e.__esModule?e:{default:e}}var l="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",u=o.default.CLEARKEY_KEYSTEM_STRING,d="urn:uuid:"+l;function c(e){var t=void 0,n=e.BASE64,o=e.debug.getLogger(t);return t={uuid:l,schemeIdURI:d,systemString:u,getInitData:function(e){return a.default.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var a=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),s=[],l=0;l<a.kids.length;l++){var u=a.kids[l],d=e.clearkeys&&e.clearkeys.hasOwnProperty(u)?e.clearkeys[u]:null;if(!d)throw new Error("DRM: ClearKey keyID ("+u+") is not known!");s.push(new i.default(u,d))}n=new r.default(s),o.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return n}}}c.__dashjs_factory_name="KeySystemW3CClearKey",t.default=dashjs.FactoryMaker.getSingletonFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(22)),r=a(n(19));function a(e){return e&&e.__esModule?e:{default:e}}var o="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",s=r.default.WIDEVINE_KEYSTEM_STRING,l="urn:uuid:"+o;function u(e){var t=null,n=(e=e||{}).BASE64;return{uuid:o,schemeIdURI:l,systemString:s,init:function(e){e&&(t=e)},getInitData:function(e){return i.default.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(e){return t&&t.sessionId?t.sessionId:e&&e.sessionId?e.sessionId:null}}}u.__dashjs_factory_name="KeySystemWidevine",t.default=dashjs.FactoryMaker.getSingletonFactory(u)},function(e,t,n){"use strict";
vendor: 18,262 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(22)),r=a(n(19));function a(e){return e&&e.__esModule?e:{default:e}}var o="9a04f079-9840-4286-ab92-e65be0885f95",s=r.default.PLAYREADY_KEYSTEM_STRING,l="urn:uuid:"+o,u=void 0;function d(e){var t="utf-16",n=(e=e||{}).BASE64;function r(){if(!n||!n.hasOwnProperty("decodeArray")||!n.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:o,schemeIdURI:l,systemString:s,getInitData:function(e){var t,a,o,s=new Uint8Array([112,115,115,104,0,0,0,0]),l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),u=0,d=null,c=void 0,f=void 0;if(r(),!e)return null;if("pssh"in e)return i.default.parseInitDataFromContentProtection(e,n);if("pro"in e)d=n.decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;d=n.decodeArray(e.prheader.__text)}return t=d.length,a=4+s.length+l.length+4+t,o=new ArrayBuffer(a),c=new Uint8Array(o),(f=new DataView(o)).setUint32(u,a),u+=4,c.set(s,u),u+=s.length,c.set(l,u),u+=l.length,f.setUint32(u,t),u+=4,c.set(d,u),u+=t,c.buffer},getRequestHeadersFromMessage:function(e){var n,i=void 0,r={},a=new DOMParser,o="utf-16"===t?new Uint16Array(e):new Uint8Array(e);n=String.fromCharCode.apply(null,o);for(var s=(i=a.parseFromString(n,"application/xml")).getElementsByTagName("name"),l=i.getElementsByTagName("value"),u=0;u<s.length;u++)r[s[u].childNodes[0].nodeValue]=l[u].childNodes[0].nodeValue;return r.hasOwnProperty("Content")&&(r["Content-Type"]=r.Content,delete r.Content),r.hasOwnProperty("Content-Type")||(r["Content-Type"]="text/xml; charset=utf-8"),r},getLicenseRequestFromMessage:function(e){var i=null,a=new DOMParser,o="utf-16"===t?new Uint16Array(e):new Uint8Array(e);r();var s=String.fromCharCode.apply(null,o),l=a.parseFromString(s,"application/xml");if(!l.getElementsByTagName("PlayReadyKeyMessage")[0])return e;var u=l.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return u&&(i=n.decode(u)),i},getLicenseServerURLFromInitData:function(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),i=6,r=new DOMParser,a=0;a<n;a++){var o=t.getUint16(i,!0);i+=2;var s=t.getUint16(i,!0);if(i+=2,1===o){var l=e.slice(i,i+s),u=String.fromCharCode.apply(null,new Uint16Array(l)),d=r.parseFromString(u,"application/xml");if(d.getElementsByTagName("LA_URL")[0]){var c=d.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(c)return c}if(d.getElementsByTagName("LUI_URL")[0]){var f=d.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(f)return f}}else i+=s}return null},getCDMData:function(){var e=void 0,t=void 0,i=void 0,a=void 0;if(r(),u&&u.cdmData){for(e=[],a=0;a<u.cdmData.length;++a)e.push(u.cdmData.charCodeAt(a)),e.push(0);for(e=String.fromCharCode.apply(null,e),e=n.encode(e),t='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",e),i=[],a=0;a<t.length;++a)i.push(t.charCodeAt(a)),i.push(0);return new Uint8Array(i).buffer}return null},getSessionId:function(e){return u&&u.sessionId?u.sessionId:e&&e.sessionId?e.sessionId:null},setPlayReadyMessageFormat:function(e){if("utf-8"!==e&&"utf-16"!==e)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');t=e},init:function(e){e&&(u=e)}}}d.__dashjs_factory_name="KeySystemPlayReady",t.default=dashjs.FactoryMaker.getSingletonFactory(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(19),a=(i=r)&&i.__esModule?i:{default:i};function o(e){var t=(e=e||{}).BASE64,n={};n[a.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(e){return t.decodeArray(e.license)},getErrorResponse:function(e){return e}},n[a.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}};return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(e){return n[e].responseType},getLicenseMessage:function(e,i){return function(){if(!t||!t.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),n[i].getLicenseMessage(e)},getErrorResponse:function(e,t){return n[t].getErrorResponse(e)}}}o.__dashjs_factory_name="DRMToday",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";function i(){var e="http://schemas.xmlsoap.org/soap/envelope/";function t(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}function n(n){if(window.DOMParser){var i=t(n),r=(new window.DOMParser).parseFromString(i,"text/xml"),a=r?r.getElementsByTagNameNS(e,"Envelope")[0]:null,o=a?a.getElementsByTagNameNS(e,"Body")[0]:null;if(o?o.getElementsByTagNameNS(e,"Fault")[0]:null)return null}return n}function i(n){var i="",r="",a="",o=-1,s=-1;if(window.DOMParser){var l=t(n),u=(new window.DOMParser).parseFromString(l,"text/xml"),d=u?u.getElementsByTagNameNS(e,"Envelope")[0]:null,c=d?d.getElementsByTagNameNS(e,"Body")[0]:null,f=c?c.getElementsByTagNameNS(e,"Fault")[0]:null,h=f?f.getElementsByTagName("detail")[0]:null,p=h?h.getElementsByTagName("Exception")[0]:null,m=null;if(null===f)return l;i=(m=f.getElementsByTagName("faultstring")[0].firstChild)?m.nodeValue:null,null!==p&&(r=(m=p.getElementsByTagName("StatusCode")[0])?m.firstChild.nodeValue:null,o=(a=(m=p.getElementsByTagName("Message")[0])?m.firstChild.nodeValue:null)?a.lastIndexOf("[")+1:-1,s=a?a.indexOf("]"):-1,a=a?a.substring(o,s):"")}var g="code: "+r+", name: "+i;return a&&(g+=", message: "+a),g}return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return n.call(this,e)},getErrorResponse:function(e){return i.call(this,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),i.__dashjs_factory_name="PlayReady",t.default=dashjs.FactoryMaker.getSingletonFactory(i)},function(e,t,n){"use strict";function i(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}Object.defineProperty(t,"__esModule",{value:!0}),i.__dashjs_factory_name="Widevine",t.default=dashjs.FactoryMaker.getSingletonFactory(i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(n(56)),r=a(n(57));function a(e){return e&&e.__esModule?e:{default:e}}function o(){return{getServerURLFromMessage:function(e,t){var n=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t)));e+="/?";for(var i=0;i<n.kids.length;i++)e+=n.kids[i]+"&";return e=e.substring(0,e.length-1)},getHTTPMethod:function(){return"GET"},getResponseType:function(){return"json"},getLicenseMessage:function(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<e.keys.length;n++){var a=e.keys[n],o=a.kid.replace(/=/g,""),s=a.k.replace(/=/g,"");t.push(new i.default(o,s))}return new r.default(t)},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}o.__dashjs_factory_name="ClearKey",t.default=dashjs.FactoryMaker.getSingletonFactory(o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(27);var a=new(function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.INTERNAL_KEY_MESSAGE="internalKeyMessage",e.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",e.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",e.KEY_ADDED="public_keyAdded",e.KEY_ERROR="public_keyError",e.KEY_MESSAGE="public_keyMessage",e.KEY_SESSION_CLOSED="public_keySessionClosed",e.KEY_SESSION_CREATED="public_keySessionCreated",e.KEY_SESSION_REMOVED="public_keySessionRemoved",e.KEY_STATUSES_CHANGED="public_keyStatusesChanged",e.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",e.KEY_SYSTEM_SELECTED="public_keySystemSelected",e.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",e.NEED_KEY="needkey",e.PROTECTION_CREATED="public_protectioncreated",e.PROTECTION_DESTROYED="public_protectiondestroyed",e.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",e.TEARDOWN_COMPLETE="protectionTeardownComplete",e.VIDEO_ELEMENT_SELECTED="videoElementSelected",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((i=r)&&i.__esModule?i:{default:i}).default));t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(36)),r=d(n(58)),a=d(n(26)),o=d(n(7)),s=d(n(59)),l=d(n(60)),u=d(n(19));function d(e){return e&&e.__esModule?e:{default:e}}function c(e){e=e||{};var t=this.context,n=e.eventBus,d=e.events,c=e.debug,f=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0;function E(e,t){void 0!==navigator.requestMediaKeySystemAccess&&"function"==typeof navigator.requestMediaKeySystemAccess?function(t){var i=e[t].ks,r=e[t].configs,a=i.systemString;a===u.default.PLAYREADY_KEYSTEM_STRING&&"required"===r[0].persistentState&&(a+=".recommendation"),navigator.requestMediaKeySystemAccess(a,r).then(function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,r=new l.default(i,t);r.mksa=e,n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{data:r})}).catch(function(i){++t<e.length?E(e,t):n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! "+i.message})})}(t):n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Insecure origins are not allowed"})}function b(e){var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function T(e){for(var t=0;t<v.length;t++)if(v[t]===e){v.splice(t,1);break}}function w(e){var t=void 0,n=void 0;return e&&e.length>0&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}function A(e,t,i,r){var l={session:e,initData:t,sessionId:r,handleEvent:function(e){switch(e.type){case"keystatuseschange":n.trigger(d.KEY_STATUSES_CHANGED,{data:this}),e.target.keyStatuses.forEach(function(){var e=w(arguments);if("expired"===e.status)n.trigger(d.INTERNAL_KEY_STATUS_CHANGED,{error:new o.default(a.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,a.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)});else n.trigger(d.INTERNAL_KEY_STATUS_CHANGED,e)});break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;n.trigger(d.INTERNAL_KEY_MESSAGE,{data:new s.default(this,t,void 0,e.messageType)})}},getSessionID:function(){return e.sessionId},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getUsable:function(){var t=!1;return e.keyStatuses.forEach(function(){"usable"===w(arguments).status&&(t=!0)}),t},getSessionType:function(){return i}};return e.addEventListener("keystatuseschange",l),e.addEventListener("message",l),e.closed.then(function(){T(l),h.debug("DRM: Session closed.  SessionID = "+l.getSessionID()),n.trigger(d.KEY_SESSION_CLOSED,{data:l.getSessionID()})}),v.push(l),l}return f={getAllInitData:function(){for(var e=[],t=0;t<v.length;t++)v[t].initData&&e.push(v[t].initData);return e},requestKeySystemAccess:function(e){E(e,0)},getKeySystem:function(){return p},selectKeySystem:function(e){e.mksa.createMediaKeys().then(function(t){p=e.keySystem,g=t,m?m.setMediaKeys(g).then(function(){n.trigger(d.INTERNAL_KEY_SYSTEM_SELECTED)}):n.trigger(d.INTERNAL_KEY_SYSTEM_SELECTED)}).catch(function(){n.trigger(d.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})},setMediaElement:function(e){m!==e&&(m&&(m.removeEventListener("encrypted",y),m.setMediaKeys&&m.setMediaKeys(null)),(m=e)&&(m.addEventListener("encrypted",y),m.setMediaKeys&&g&&m.setMediaKeys(g)))},setServerCertificate:function(e){if(!p||!g)throw new Error("Can not set server certificate until you have selected a key system");g.setServerCertificate(e).then(function(){h.info("DRM: License server certificate successfully updated."),n.trigger(d.SERVER_CERTIFICATE_UPDATED)}).catch(function(e){n.trigger(d.SERVER_CERTIFICATE_UPDATED,{error:new o.default(a.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,a.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+e.name)})})},createKeySession:function(e,t,i){if(!p||!g)throw new Error("Can not create sessions until you have selected a key system");var r=g.createSession(i),s=A(r,e,i),l=this.getKeySystem().systemString===u.default.CLEARKEY_KEYSTEM_STRING&&t&&t.clearkeys?"keyids":"cenc";r.generateRequest(l,e).then(function(){h.debug("DRM: Session created.  SessionID = "+s.getSessionID()),n.trigger(d.KEY_SESSION_CREATED,{data:s})}).catch(function(e){T(s),n.trigger(d.KEY_SESSION_CREATED,{data:null,error:new o.default(a.default.KEY_SESSION_CREATED_ERROR_CODE,a.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+e.name)})})},updateKeySession:function(e,t){var i=e.session;_.isClearKey(p)&&(t=t.toJWK()),i.update(t).catch(function(t){n.trigger(d.KEY_ERROR,{data:new o.default(a.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+t.name,e)})})},loadKeySession:function(e,t,i){if(!p||!g)throw new Error("Can not load sessions until you have selected a key system");for(var r=0;r<v.length;r++)if(e===v[r].sessionId)return void h.warn("DRM: Ignoring session ID because we have already seen it!");var s=g.createSession(i),l=A(s,t,i,e);s.load(e).then(function(t){t?(h.debug("DRM: Session loaded.  SessionID = "+l.getSessionID()),n.trigger(d.KEY_SESSION_CREATED,{data:l})):(T(l),n.trigger(d.KEY_SESSION_CREATED,{data:null,error:new o.default(a.default.KEY_SESSION_CREATED_ERROR_CODE,a.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+e+")")}))}).catch(function(t){T(l),n.trigger(d.KEY_SESSION_CREATED,{data:null,error:new o.default(a.default.KEY_SESSION_CREATED_ERROR_CODE,a.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+e+")! "+t.name)})})},removeKeySession:function(e){e.session.remove().then(function(){h.debug("DRM: Session removed.  SessionID = "+e.getSessionID()),n.trigger(d.KEY_SESSION_REMOVED,{data:e.getSessionID()})},function(t){n.trigger(d.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionID()+"). "+t.name})})},closeKeySession:function(e){b(e).catch(function(t){T(e),n.trigger(d.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionID()+") "+t.name})})},stop:function(){for(var e=void 0,t=0;t<v.length;t++)(e=v[t]).getUsable()||b(e).catch(function(){T(e)})},reset:function(){var e=v.length,t=void 0;0!==e?function(){for(var i=function(e){T(e),0===v.length&&(m?(m.removeEventListener("encrypted",y),m.setMediaKeys(null).then(function(){n.trigger(d.TEARDOWN_COMPLETE)})):n.trigger(d.TEARDOWN_COMPLETE))},r=0;r<e;r++)(function(e){t.session.closed.then(function(){i(e)}),b(t).catch(function(){i(e)})})(t=v[r])}():n.trigger(d.TEARDOWN_COMPLETE)}},h=c.getLogger(f),p=null,m=null,g=null,v=[],_=(0,i.default)(t).getInstance(),y={handleEvent:function(e){if("encrypted"===e.type&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(d.NEED_KEY,{key:new r.default(t,e.initDataType)})}}},f}c.__dashjs_factory_name="ProtectionModel_21Jan2015",t.default=dashjs.FactoryMaker.getClassFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(36)),r=d(n(58)),a=d(n(7)),o=d(n(26)),s=d(n(59)),l=d(n(55)),u=d(n(60));function d(e){return e&&e.__esModule?e:{default:e}}function c(e){e=e||{};var t=this.context,n=e.eventBus,d=e.events,c=e.debug,f=e.api,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0;function T(){try{for(var e=0;e<_.length;e++)w(_[e]);m&&m.removeEventListener(f.needkey,E),n.trigger(d.TEARDOWN_COMPLETE)}catch(e){n.trigger(d.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+e.message})}}function w(e){var t=e.session;t.removeEventListener(f.error,e),t.removeEventListener(f.message,e),t.removeEventListener(f.ready,e),t.removeEventListener(f.close,e);for(var n=0;n<_.length;n++)if(_[n]===e){_.splice(n,1);break}t[f.release]()}function A(){var e=null,t=function(){m.removeEventListener("loadedmetadata",e),m[f.setMediaKeys](v),n.trigger(d.VIDEO_ELEMENT_SELECTED)};m.readyState>=1?t():(e=t.bind(this),m.addEventListener("loadedmetadata",e))}return h={getAllInitData:function(){for(var e=[],t=0;t<_.length;t++)e.push(_[t].initData);return e},requestKeySystemAccess:function(e){for(var t=!1,i=0;i<e.length;i++)for(var r=e[i].ks.systemString,a=e[i].configs,o=null,s=null,c=0;c<a.length;c++){var h=a[c].audioCapabilities,p=a[c].videoCapabilities;if(h&&0!==h.length){o=[];for(var m=0;m<h.length;m++)window[f.MediaKeys].isTypeSupported(r,h[m].contentType)&&o.push(h[m])}if(p&&0!==p.length){s=[];for(var g=0;g<p.length;g++)window[f.MediaKeys].isTypeSupported(r,p[g].contentType)&&s.push(p[g])}if(!(!o&&!s||o&&0===o.length||s&&0===s.length)){t=!0;var v=new l.default(o,s),y=b.getKeySystemBySystemString(r);n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{data:new u.default(y,v)});break}}t||n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})},getKeySystem:function(){return g},selectKeySystem:function(e){try{v=e.mediaKeys=new window[f.MediaKeys](e.keySystem.systemString),g=e.keySystem,y=e,m&&A(),n.trigger(d.INTERNAL_KEY_SYSTEM_SELECTED)}catch(e){n.trigger(d.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+g.systemString+")! Could not create MediaKeys -- TODO"})}}
vendor: 7,294 bytes, line 73
73,setMediaElement:function(e){m!==e&&(m&&m.removeEventListener(f.needkey,E),(m=e)&&(m.addEventListener(f.needkey,E),v&&A()))},createKeySession:function(e,t,i,r){if(!g||!v||!y)throw new Error("Can not create sessions until you have selected a key system");var l=null;if(y.ksConfiguration.videoCapabilities&&y.ksConfiguration.videoCapabilities.length>0&&(l=y.ksConfiguration.videoCapabilities[0]),null===l&&y.ksConfiguration.audioCapabilities&&y.ksConfiguration.audioCapabilities.length>0&&(l=y.ksConfiguration.audioCapabilities[0]),null===l)throw new Error("Can not create sessions for unknown content types.");var u=l.contentType,c=v.createSession(u,new Uint8Array(e),r?new Uint8Array(r):null),h=function(e,t){return{session:e,initData:t,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case f.error:var t="KeyError";n.trigger(d.KEY_ERROR,{data:new a.default(o.default.MEDIA_KEYERR_CODE,t,this)});break;case f.message:var i=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;n.trigger(d.INTERNAL_KEY_MESSAGE,{data:new s.default(this,i,e.destinationURL)});break;case f.ready:p.debug("DRM: Key added."),n.trigger(d.KEY_ADDED);break;case f.close:p.debug("DRM: Session closed.  SessionID = "+this.getSessionID()),n.trigger(d.KEY_SESSION_CLOSED,{data:this.getSessionID()})}}}}(c,e);c.addEventListener(f.error,h),c.addEventListener(f.message,h),c.addEventListener(f.ready,h),c.addEventListener(f.close,h),_.push(h),p.debug("DRM: Session created.  SessionID = "+h.getSessionID()),n.trigger(d.KEY_SESSION_CREATED,{data:h})},updateKeySession:function(e,t){var n=e.session;b.isClearKey(g)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t))},closeKeySession:w,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:T,reset:T},p=c.getLogger(h),m=null,g=null,v=null,y=null,_=[],b=(0,i.default)(t).getInstance(),E={handleEvent:function(e){if(e.type===f.needkey&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(d.NEED_KEY,{key:new r.default(t,"cenc")})}}},h}c.__dashjs_factory_name="ProtectionModel_3Feb2014",t.default=dashjs.FactoryMaker.getClassFactory(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(36)),r=d(n(58)),a=d(n(7)),o=d(n(59)),s=d(n(55)),l=d(n(60)),u=d(n(26));function d(e){return e&&e.__esModule?e:{default:e}}function c(e){e=e||{};var t=this.context,n=e.eventBus,d=e.events,c=e.debug,f=e.api,h=e.errHandler,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0,_=void 0,E=void 0,b=void 0,T=void 0;function w(){g&&x();for(var e=0;e<E.length;e++)A(E[e]);n.trigger(d.TEARDOWN_COMPLETE)}function A(e){try{g[f.cancelKeyRequest](v.systemString,e.sessionID)}catch(t){n.trigger(d.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.sessionID+") "+t.message})}}function S(e,t){if(t&&e){for(var n=e.length,i=0;i<n;i++)if(e[i].sessionID==t)return e[i];return null}return null}function x(){g.removeEventListener(f.keyerror,T),g.removeEventListener(f.needkey,T),g.removeEventListener(f.keymessage,T),g.removeEventListener(f.keyadded,T)}return p={getAllInitData:function(){for(var e=[],t=0;t<_.length;t++)e.push(_[t].initData);for(var n=0;n<E.length;n++)e.push(E[n].initData);return e},requestKeySystemAccess:function(e){var t=g;t||(t=document.createElement("video"));for(var i=!1,r=0;r<e.length;r++)for(var a=e[r].ks.systemString,o=e[r].configs,u=null,c=null,f=0;f<o.length;f++){var h=o[f].videoCapabilities;if(h&&0!==h.length){c=[];for(var p=0;p<h.length;p++)""!==t.canPlayType(h[p].contentType,a)&&c.push(h[p])}if(c&&(!c||0!==c.length)){i=!0;var m=new s.default(u,c),v=y.getKeySystemBySystemString(a);n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{data:new l.default(v,m)});break}}i||n.trigger(d.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})},getKeySystem:function(){return v},selectKeySystem:function(e){v=e.keySystem,n.trigger(d.INTERNAL_KEY_SYSTEM_SELECTED)},setMediaElement:function(e){if(g!==e){if(g){x();for(var t=0;t<E.length;t++)A(E[t]);E=[]}(g=e)&&(g.addEventListener(f.keyerror,T),g.addEventListener(f.needkey,T),g.addEventListener(f.keymessage,T),g.addEventListener(f.keyadded,T),n.trigger(d.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(e){if(!v)throw new Error("Can not create sessions until you have selected a key system");if(b||0===E.length){var t={sessionID:null,initData:e,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return _.push(t),g[f.generateKeyRequest](v.systemString,new Uint8Array(e)),t}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(e,t){var n=e.sessionID;if(y.isClearKey(v))for(var i=0;i<t.keyPairs.length;i++)g[f.addKey](v.systemString,t.keyPairs[i].key,t.keyPairs[i].keyID,n);else g[f.addKey](v.systemString,new Uint8Array(t),new Uint8Array(e.initData),n)},closeKeySession:A,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:w,reset:w},m=c.getLogger(p),g=null,v=null,_=[],E=[],y=(0,i.default)(t).getInstance(),T={handleEvent:function(e){var t=null;switch(e.type){case f.needkey:var i=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(d.NEED_KEY,{key:new r.default(i,"cenc")});break;case f.keyerror:if((t=S(E,e.sessionId))||(t=S(_,e.sessionId)),t){var s=u.default.MEDIA_KEYERR_CODE,l="";switch(e.errorCode.code){case 1:s=u.default.MEDIA_KEYERR_UNKNOWN_CODE,l+="MEDIA_KEYERR_UNKNOWN - "+u.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:s=u.default.MEDIA_KEYERR_CLIENT_CODE,l+="MEDIA_KEYERR_CLIENT - "+u.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:s=u.default.MEDIA_KEYERR_SERVICE_CODE,l+="MEDIA_KEYERR_SERVICE - "+u.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:s=u.default.MEDIA_KEYERR_OUTPUT_CODE,l+="MEDIA_KEYERR_OUTPUT - "+u.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:s=u.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,l+="MEDIA_KEYERR_HARDWARECHANGE - "+u.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:s=u.default.MEDIA_KEYERR_DOMAIN_CODE,l+="MEDIA_KEYERR_DOMAIN - "+u.default.MEDIA_KEYERR_DOMAIN_MESSAGE}l+="  System Code = "+e.systemCode,n.trigger(d.KEY_ERROR,{data:new a.default(s,l,t)})}else m.error("No session token found for key error");break;case f.keyadded:(t=S(E,e.sessionId))||(t=S(_,e.sessionId)),t?(m.debug("DRM: Key added."),n.trigger(d.KEY_ADDED,{data:t})):m.debug("No session token found for key added");break;case f.keymessage:if((b=null!==e.sessionId&&void 0!==e.sessionId)?!(t=S(E,e.sessionId))&&_.length>0&&(t=_.shift(),E.push(t),t.sessionID=e.sessionId,n.trigger(d.KEY_SESSION_CREATED,{data:t})):_.length>0&&(t=_.shift(),E.push(t),0!==_.length&&h.error(new a.default(u.default.MEDIA_KEY_MESSAGE_ERROR_CODE,u.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){var c=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=c,n.trigger(d.INTERNAL_KEY_MESSAGE,{data:new o.default(t,c,e.defaultURL)})}else m.warn("No session token found for key message")}}},p}c.__dashjs_factory_name="ProtectionModel_01b",t.default=dashjs.FactoryMaker.getClassFactory(c)},function(e,t,n){"use strict";
vendor: 4,195 bytes, line 73
73Object.defineProperty(t,"__esModule",{value:!0});var i,r=n(63),a=(i=r)&&i.__esModule?i:{default:i};var o=function(){var e="application/dash+xml",t=void 0;function n(n,i,r){if(!n||!/^VIDEO$/i.test(n.nodeName))return null;if(n._dashjs_player)return n._dashjs_player;var o=void 0,s=n.id||n.name||"video element";if(!(i=i||[].slice.call(n.querySelectorAll("source")).filter(function(t){return t.type==e})[0])&&n.src)(i=document.createElement("source")).src=n.src;else if(!i&&!n.src)return null;return r=r||{},(o=(0,a.default)(r).create()).initialize(n,i.src,n.autoplay),t||(t=o.getDebug().getLogger()),t.debug("Converted "+s+" to dash.js player and added content: "+i.src),n._dashjs_player=o,o}function i(e){return/^VIDEO$/i.test(e.nodeName)?e:i(e.parentNode)}return{create:n,createAll:function(t,r){var a=[];t=t||"[data-dashjs-player]";for(var o=(r=r||document).querySelectorAll(t),s=0;s<o.length;s++){var l=n(o[s],null);a.push(l)}for(var u=r.querySelectorAll('source[type="'+e+'"]'),d=0;d<u.length;d++){var c=n(i(u[d]),null);a.push(c)}return a}}}(),s=void 0;!("undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&"undefined"!=typeof window&&window&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?o.createAll():s=window.setInterval(function(){window.dashjs&&(window.clearInterval(s),o.createAll())},500):window.addEventListener("load",function e(){window.removeEventListener("load",e),o.createAll()})),t.default=o},,,function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"BasicPanorama",function(){return S}),n.d(t,"CONTROLS",function(){return d}),n.d(t,"CameraPanorama",function(){return O}),n.d(t,"CubePanorama",function(){return A}),n.d(t,"CubeTextureLoader",function(){return m}),n.d(t,"DataImage",function(){return f}),n.d(t,"EmptyPanorama",function(){return w}),n.d(t,"GoogleStreetviewPanorama",function(){return R}),n.d(t,"ImageLittlePlanet",function(){return L}),n.d(t,"ImageLoader",function(){return h}),n.d(t,"ImagePanorama",function(){return T}),n.d(t,"Infospot",function(){return _}),n.d(t,"LittlePlanet",function(){return I}),n.d(t,"MODES",function(){return c}),n.d(t,"Media",function(){return g}),n.d(t,"Panorama",function(){return b}),n.d(t,"REVISION",function(){return o}),n.d(t,"Reticle",function(){return v}),n.d(t,"THREE_REVISION",function(){return l}),n.d(t,"THREE_VERSION",function(){return u}),n.d(t,"TextureLoader",function(){return p}),n.d(t,"VERSION",function(){return s}),n.d(t,"VideoPanorama",function(){return x}),n.d(t,"Viewer",function(){return F}),n.d(t,"Widget",function(){return E});var i=n(0);const r="0.11.0",a={three:"^0.105.2"},o=r.split(".")[1],s=r,l=a.three.split(".")[1],u=a.three.replace(/[^0-9.]/g,""),d={ORBIT:0,DEVICEORIENTATION:1},c={UNKNOWN:0,NORMAL:1,CARDBOARD:2,STEREO:3},f={Info:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAABAAAAAQADq8/hgAAADBklEQVR42u2bP08UQRiHnzFaSYCI/xoksdBIqGwIiYWRUBISExpCQ0ej38FWOmlIKKhoMPEbaCxsrrHiYrQgOSlQEaICrT+LHSPZzNzt3s3c3Hn7lHvLzvv82L2dm30XKioqKgYY062BJF0HpoA7wARwBbhsPz4DjoEG8AnYNcZ8Sx1Op8IXJM1KWpdUV3nq9m9nJV1I7VNGfEzSM0mNNqR9NOwxx1L7NRMflbQm6SSgeJ4TO8Zoat+8/LKkg4jieQ4kLaf2RtKwpJ0uiufZkTScSn5S0l5C+b/sSZrstvyMpKPU5uc4kjTTjkvpeYCkaeA1/+7hvcIZMGuMqUULQNIU8Aa4ltrWwyHwyBizGzwASSPAe+B2assW7AH3jTE/i+xcZoa12Qfy2Bo3i+5cKABl99zF1GYlWFTBeULLS0DZrOsDcDNggTXgc27bLWA64BhfgHvGmB8dHUXZ1DM0S45xliKMs9bKr+klIOkqsBrwv9JtVq1DewEAT4Ch1BYdMGQdygeg7Df4SmqDAKyoyXpCszPgITCeuvoAjFuX0gE8jljUdv7bCtiOOJ7XpdUZ8L/gdXHOA5QtYH5NXXVgbrgWWn1nwFTqaiPgdPIFcDd1tRFwOl307DwRuZgXwLvctgfA04hjOp18AcReZ6sZY16e3yDpUuQxnU6+S2AkcjEpcDr1zxOXSPgCKLSa0mc4nXwB/EpdbQScTr4AGqmrjYDTyRfAx9TVRsDp5Aug8LJyH+F0cgZg58z11BUHpO5ruGh2G3ybuuqAeF2aBfAqddUB8bq0OgP2U1cegH3aOQOMMb+BrdTVB2DLupQLwLIOnKY26IBT6+ClaQDGmO/ARmqLDtiwDn7HVkcY+EdjNoTlCI+tYhO2iUppm6HKslPUq2qQKHpUe8AFsjaUXuUQWCgqXyoAG8IuME/WkNRrnAHzZfqDSgdgQ6gBc2Td3b3CMTBXtkOsIzTIjZLnQhjcVtlcEIPZLJ0LoVvt8s/Va+3yuSAG84UJRxB98cpM9dJURUVFxSDzBxKde4Lk3/h2AAAAAElFTkSuQmCC",Arrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAABAAAAAQADq8/hgAAADPklEQVR42u2bMUscQRiG30/SRaJEI1ZKUiRErN
73IELRUbQYSAnX8hpVUgkDYp0wgWVjYW+QcJaQzYpLojJIXhtDDEKBpj65ti58ixmdmb2ZvZ7+T2AUHudmfmeXf2bnb3O6CmpqZmgJGqOiI5AWAWwEMA0wDuArht3r4CcAagBeAbgIaI/NQOp1fhIZKLJN+SbDKcptl3keSQtk+I+BjJVyRbJaRdtEybY9p+ReKjJN+QvIwonufS9DGq7ZuXXyd5nFA8zzHJdW1vkLxDcrdC8Ty7JO9oyc+QPFCUb3NAcqZq+TmSp9rmHZySnCvjErwOIPkUwHv8+w7vF64ALIrIfrIASM4C+ADgnratgxMACyLSiB4AyREAnwE80LbswgGAJyJy4bNxyApr6wbIw4xxy3djrwCYfeeuaZsFsEbPdULXU4DZqusLgMkEA21P05EEbf8A8FhEzos28pkBLxLKL5s/r/M1kEkz9vKQHGeatf05yfmOfubNa7G5JDle5NhtBjwHMBz5yFwAWBaRT+0XzP8pZsKwcQiH2fX8Ycojb+kzxUw4ZJn7CSQXqpRPHMKCq7+iZJ71Mvdy/DftXSQ6HcJdSDaqPPKW/mPOBO+lcbvzCU35RCFM2PpwnQKzZQfdgfe0dxH5dLA6uQJ4pC2fIASrkyuA6X6QjxyC1ckVQNn7bNHlI4ZgdXIFUObiJJl8pBCsTjGfuIwA2Cv4FN7xbYjkjqsRAHuIePXoCiDF1Zk2VidXAL+1R5sAq5MrgJb2aBNgdXIF8FV7tAmwOrkCCFs73wysTtYATHFCU3vEEWm6Ci6KvgY/ao86Ik6XogDeaY86Ik6XbjPgSHvkEThCwQy45XpDRK5JbgN4GWkgUyR9H65MRQxgW0SunZ5FezK7pfwd8e8MV8UfAPdF5Jdrg8JrAbPjprZFD2wWyQP6j8ZSEufRmGlgQ9umBBvd5IOgbjFUKLu+XnWBhG+rpsFVZGUo/coJgFVf+aAATAgNACvICpL6jSsAKyH1QcEBmBD2ASwhq+7uF84ALIVWiPUEB7lQsiOEwS2VzQUxmMXSuRCqKpd/zX4rl88FMZg/mLAEcSN+MlP/aKqmpqZmkPkL0hSjwOpNKxwAAAAASUVORK5CYII=",FullscreenEnter:"data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KICAgIDxwYXRoIGQ9Ik03IDE0SDV2NWg1di0ySDd2LTN6bS0yLTRoMlY3aDNWNUg1djV6bTEyIDdoLTN2Mmg1di01aC0ydjN6TTE0IDV2MmgzdjNoMlY1aC01eiIvPgo8L3N2Zz4=",FullscreenLeave:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggc3R5bGU9ImZpbGw6I2ZmZiIgZD0iTTE0LDE0SDE5VjE2SDE2VjE5SDE0VjE0TTUsMTRIMTBWMTlIOFYxNkg1VjE0TTgsNUgxMFYxMEg1VjhIOFY1TTE5LDhWMTBIMTRWNUgxNlY4SDE5WiIgLz48L3N2Zz4=",VideoPlay:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggc3R5bGU9ImZpbGw6I2ZmZiIgZD0iTTgsNS4xNFYxOS4xNEwxOSwxMi4xNEw4LDUuMTRaIiAvPjwvc3ZnPg==",VideoPause:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggc3R5bGU9ImZpbGw6I2ZmZiIgZD0iTTE0LDE5LjE0SDE4VjUuMTRIMTRNNiwxOS4xNEgxMFY1LjE0SDZWMTkuMTRaIiAvPjwvc3ZnPg==",WhiteTile:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIABAMAAAAGVsnJAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjE8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlBob3RvbWV0cmljSW50ZXJwcmV0YXRpb24+MjwvdGlmZjpQaG90b21ldHJpY0ludGVycHJldGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KAtiABQAAACRQTFRFAAAAAAAABgYGBwcHHh4eKysrx8fHy8vLzMzM7OzsAAAABgYG+q7SZgAAAAp0Uk5TAP7+/v7+/v7+/iJx/a8AAAOwSURBVHja7d0hbsNAEAVQo6SFI6XEcALDcgNLvUBvEBQVhpkWVYWlhSsVFS7t5QIshRt695lEASZP+8c7a1kzDL1fz+/zyuvzp6FbvoddrL6uDd1yGZ5eXldeb18N3fIx7A+58prmhm65DfvDcd0952lu6JabFbD/zVprZj1lzcys+fj9z8xTZtbT8rv8yWlu6BYAIgAAAAAAAAAAAABAM6QXEAEAAAAAAAAAgJ2gnaAIiIA3Q2qAGgAAAAAAAAAAAAAAAAAAAAAAAAAAQJsADkVFAAAAAAA8Bj0GRUAEREAEREAE
73REAEREAEAAAAAAAAAAB2gnaCIiACPplRA9QANUAERAAAAEVQERQBERCBVlfAcZ3aeZobusUKMGBhV6KUElHGKBERJR6/fxExRkQZl9/lT8S1oVsuhqyYMmPKjCkzvfcCpsxohrwY0Q06EAEAAAAAAAAAAACgGdILiAAAAAAAAAAAwE7QTlAERMCbITVADQAAAAAAAAAAAAAAAAAAAAAAAAAAwKmwQ1ERAAAAAACPQY9BERABERABERABERABERABAAAAAAAAAICdoJ2gCIiAT2bUADVADRABEQAAQBFUBEVABERgEyvAlJm+V4ApM6bMmDJjyowpM6bMdN0LmDKjGfJiRDfoQAQAAAAAAAAAAACAZkgvIAIAAAAAAAAAADtBO0EREAFvhtQANQAAAAAAAAAAAAAAAAAAAAAAAAAAAKfCDkVFAAAAAAA8Bj0GRUAEREAEREAEREAEREAEAAAAAAAAAAB2gnaCIiACPplRA9QANUAERAAAAEVQERQBERCBTawAU2b6XgGmzJgyY8qMKTOmzJgy03UvYMqMZsiLEd2gAxEAAAAAAAAAAAAAmiG9gAgAAAAAAAAAAOwE7QRFQAS8GVID1AAAAAAAAAAAAAAAAAAAAAAAAAAAAJwKOxQVAQAAAADwGPQYFAEREAEREAEREAEREAERAAAAAAAAAADYCdoJioAI+GRGDVAD1AAREAEAABRBRVAEREAENrECTJnpewWYMmPKjCkzpsyYMmPKTNe9gCkzmiEvRnSDDkQAAAAAAAAAAAAAaIb0AiIAAAAAAAAAALATtBMUARHwZkgNUAMAAAAAAAAAAAAAAAAAAAAAAAAAAHAq7FBUBAAAAADAY9BjUAREQAREQAREQAREQAREAAAAAAAAAABgJ2gnKAIi4JMZNUANUANEQAQAAFAEFUEREAER2MQKMGWm7xVgyowpM50PWen9ugNGXz1XaocAFgAAAABJRU5ErkJggg==",Setting:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAABAAAAAQADq8/hgAAADn0lEQVR42u2bzUsVURjGnyO6CPzAMnTjppAo3LTwH1CqTfaxbeOiRS37A0wXtROFVi1aRBs3LWohSIGbQAQXViBGRhG0UIRKUCpK7q/FnOB2uc6cOXNmRnGe3eW+H8/7zLln3vNxpQoVKlQ4wjBFJAFOSRqX1O7osivpvjHmU1nChBZglvSYLYJbS0EanCvIJzWK+gnsyH34/8OuMaYjb265jwCgz6N4SWq3vodbAEmnS/KtBDgoAgyU5BteAOAkMAPcBroc7PskDWfgN+wyDwBdltMMcDI3tYBnde/pHeARMNTErgd4APzweP834oeN1dMkz5DlsFNn/yyv4kdiSK4At4AO4CqwGaDwRmza2B0210qM7YhrXU59ANAq6bWkwQTTn5KO5fIE0uVYlXTeGLOXFMx1DrjlULwKKN41x6DlnIjEEQCckPRe0okCiguJr5LOGGO+xhm5jICJQ1i8LOeJJKPYEQAMKvrtt5ZdjSf2FM0Fq/sZJI2A6UNcvCz36TiDfUcAcE1SPu/U6Mm8k/TFfu6XdFb5iX3dGPM8lQfwNod3+TowBnQ3yddtv1vPIe+b1JIBiwEJ1IAJ208k5W21trWA+V/5CHAcmAtU/A2P/DcCiTAHHE8tgCVhgLvAXgYCk17Jo/yTGfLuWe7Zd72AC8CWB4n3OAz7mLytNkZabAEXMhfeQKYfWEpJZCxA3rGUOZeA/qDF15FpAz47EvlNk9neI2e3jeWCz0BbmvipNkSMMX8kuSZYM8Z8zyqAjbHmaN5mOeYjgIXrU93MWrxHrNQjrqiDkQMLHwG+OdqF3NN3jeXKzU8AoF1SzdH8XKhJUO7HZDXLMbwAwICkJUULFxe0SbqSVQAbw3Xi7Ze0ZLmGAzAKbHs0JGU1QtvAaIjCW4B7ZOvJy2qFa5a730RPtBiaz0CgnkiZi6F5fBZDVMvho7EhcuS3xJJ2hV9IupgTqaLw0hhzab8vq23xOG/r+LDsKjLgYVzxUnU0ltwK2wDezUyJmEwqXgp/PL4rvxthaeCSI+zxuA10J8ZkWdJNSb2SLkvayKHwDRu71+ZajrG941J8agALDQ3GU/a/IvMkYCPzmCbtLNEVmacNtgs5iP9fYVNEV1Q6Hez7yNZSL+J2SarTcpqiyV2iUkG0IvPFvbz5FbEn+KEk3wMjwMeSfCsBXFBdly9CAPk9ydyffpECuB5tZfVJjaKWueOSfinln6YK4lahQoUKRxd/AcRPGTcQCAUQAAAAAElFTkSuQmCC",ChevronRight:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTguNTksMTYuNThMMTMuMTcsMTJMOC41OSw3LjQxTDEwLDZMMTYsMTJMMTAsMThMOC41OSwxNi41OFoiIC8+PC9zdmc+",Check:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIxLDdMOSwxOUwzLjUsMTMuNUw0LjkxLDEyLjA5TDksMTYuMTdMMTkuNTksNS41OUwyMSw3WiIgLz48L3N2Zz4=",ViewIndicator:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0idmlldy1pbmRpY2F0b3IiIGhlaWdodD0iMzAiIHdpZHRoPSIzMCIgdmlld0JveD0iLTIuNSAtMSAzMCAzMCI+Cgk8c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLW1pdGVybGltaXQ6MTA7ZmlsbDpub25lO30uc3Qxe3N0cm9rZS13aWR0aDo2O3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCTwvc3R5bGU+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNIDEyLjUgMCBBIDEyLjUgMTIuNSAwIDAgMCAtMTIuNSAwIEEgMTIuNSAxMi41IDAgMCAwIDEyLjUgMCIgdHJhbnNmb3JtPSJtYXRyaXgoMSwwLDAsMSwxMywxNS41KSI+PC9wYXRoPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0gMTMgMCBMIDEwIDIgTCAxNiAyIFoiPjwvcGF0aD4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNIDIgMCBBIDIgMiAwIDAgMCAtMiAwIEEgMiAyIDAgMCAwIDIgMCIgdHJhbnNmb3JtPSJtYXRyaXgoMSwwLDAsMSwxMywxNS41KSI+PC9wYXRoPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGlkPSJpbmRpY2F0b3IiIHRyYW5zZm9ybT0ibWF0cml4KDEsMCwwLDEsMTMsMTUuNSkiPjwvcGF0aD4KCTwvZz4KPC9zdmc+"},h={load:function(e,t=()=>{},n=()=>{},r=()=>{}){let a,o,s,l,u,d,c;i.e.enabled=!0;for(let t in f)f.hasOwnProperty(t)&&e===f[t]&&(c=t);if(a=i.e.get(c||e),void 0!==a)return t&&setTimeout(function(){n({loaded:1,total:1}),t(a)},0),a;u=window.URL||window.webkitURL,d=document.createElementNS("http://www.w3.org/1999/xhtml","img"),i.e.add(c||e,d);const h=()=>{u.revokeObjectURL(d.src),t(d)};if(0===e.indexOf("data:"))return d.addEventListener("load",h,!1),d.src=e,d;d.crossOrigin=void 0!==this.crossOrigin?this.crossOrigin:"",o=new window.XMLHttpRequest,o.open("GET",e,!0),o.responseType="arraybuffer",o.addEventListener("error",r),o.addEventListener("progress",e=>{if(!e)return;const{loaded:t,total:i,lengthComputable:r}=e;r&&n({loaded:t,total:i})}),o.addEventListener("loadend",e=>{if(!e)return;const{currentTarget:{response:t}}=e;s=new Uint8Array(t),l=new window.Blob([s]),d.addEventListener("load",h,!1),d.src=u.createObjectURL(l)}),o.send(null)}},p={load:function(e,t=()=>{},n,r){var a=new i.J;return h.load(e,function(n){a.image=n;const r=e.search(/\.(jpg|jpeg)$/)>0||0===e.search(/^data\:image\/jpeg/);a.format=r?i.A:i.z,a.needsUpdate=!0,t(a)},n,r),a}},m={load:function(e,t=()=>{},n=()=>{},r){var a,o,s,l,u;return a=new i.h([]),o=0,s={},l={},e.map(function(e,i){h.load(e,function(e){a.images[i]=e,6===++o&&(a.needsUpdate=!0,t(a))},function(e){for(var t in s[i]={loaded:e.loaded,total:e.total},l.loaded=0,l.total=0,u=0,s)u++,l.loaded+=s[t].loaded,l.total+=s[t].total;u<6&&(l.total=l.total/u*6),n(l)},r)}),a}};function g(e){this.constraints=Object.assign({video:{width:{ideal:1920},height:{ideal:1080},facingMode:{exact:"environment"}},audio:!1},e),this.container=null,this.scene=null,this.element=null,this.devices=[],this.stream=null,this.ratioScalar=1,this.videoDeviceIndex=0}function v(e=16777215,t=!0,n=1500){this.dpr=window.devicePixelRatio;const{canvas:r,context:a}=this.createCanvas(),o=new i.H({color:e,map:this.createCanvasTexture(r)});i.G.call(this,o),this.canvasWidth=r.width,this.canvasHeight=r.height,this.context=a,this.color=e instanceof i.g?e:new i.g(e),this.autoSelect=t,this.dwellTime=n,this.rippleDuration=500,this.position.z=-10,this.center.set(.5,.5),this.scale.set(.5,.5,1),this.startTimestamp=null,this.timerId=null,this.callback=null,this.frustumCulled=!1,this.updateCanvasArcByProgress(0)}g.prototype=Object.assign(Object.create(i.k.prototype),{setContainer:function(e){this.container=e},setScene:function(e){this.scene=e},enumerateDevices:function(){const e=this.devices,t=new Promise(t=>{t(e)});return e.length>0?t:window.navigator.mediaDevices.enumerateDevices()},switchNextVideoDevice:function(){const e=this.stop.bind(this),t=this.start.bind(this),n=this.setVideDeviceIndex.bind(this);let i=this.videoDeviceIndex;this.getDevices("video").then(r=>{e(),i++,i>=r.length?(n(0),i--):n(i),t(r[i])})},getDevices:function(e="video"){const t=this.devices;return this.enumerateDevices().then(e=>e.map(e=>(t.includes(e)||t.push(e),e))).then(t=>{const n=new RegExp(e,"i");return t.filter(e=>n.test(e.kind))})},getUserMedia:function(e){const t=this.setMediaStream.bind(this),n=this.playVideo.bind(this);return window.navigator.mediaDevices.getUserMedia(e).then(t).then(n).catch(e=>{console.warn(`PANOLENS.Media: ${e}`)})},setVideDeviceIndex:function(e){this.videoDeviceIndex=e},start:function(e){const t=this.constraints,n=this.getUserMedia.bind(this);return this.element=this.createVideoElement(),this.getDevices().then(i=>{if(!i||0===i.length)throw Error("no video device found");const r=e||i[0];return t.video.deviceId=r.deviceId,n(t)})},stop:function(){const e=this.stream;if(e&&e.active){e.getTracks()[0].stop(),window.removeEventListener("resize",this.onWindowResize.bind(this)),this.element=null,this.stream=null}},setMediaStream:function(e){this.stream=e,this.element.srcObject=e,this.scene&&(this.scene.background=this.createVideoTexture()),window.addEventListener("resize",this.onWindowResize.bind(this))},playVideo:function(){const{element:e}=this;e&&(e.play(),this.dispatchEvent({type:"play"}))},pauseVideo:function(){const{element:e}=this;e&&(e.pause(),this.dispatchEvent({type:"pause"}))},createVideoTexture:function(){const e=this.element,t=new i.M(e);return t.generateMipmaps=!1,t.minFilter=i.m,t.magFilter=i.m,t.format=i.A,t.center.set(.5,.5),e.addEventListener("canplay",this.onWindowResize.bind(this)),t},createVideoElement:function(){const e=this.dispatchEvent.bind(this),t=document.createElement("video");return t.setAttribute("autoplay",""),t.setAttribute("muted",""),t.setAttribute("playsinline",""),t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.objectPosition="center",t.style.objectFit="cover",t.style.display=this.scene?"none":"",t.addEventListener("canplay",()=>e({type:"canplay"})),t},onWindowResize:function(){if(this.element&&this.element.videoWidth&&this.element.videoHeight&&this.scene){const{clientWidth:e,clientHeight:t}=this.container,n=this.scene.background,{videoWidth:i,videoHeight:r}=this.element,a=r/i*(this.container?e/t:1)*this.ratioScalar;e>t?n.repeat.set(a,1):n.repeat.set(1,1/a)}}}),v.prototype=Object.assign(Object.create(i.G.prototype),{constructor:v,setColor:function(e){this.material.color.copy(e instanceof i.g?e:new i.g(e))},createCanvasTexture:function(e){const t=new i.f(e);return t.minFilter=i.m,t.magFilter=i.m,t.generateMipmaps=!1,t},createCanvas:function(){const e=document.createElement("canvas"),t=e.getContext("2d"),n=this.dpr;return e.width=32*n,e.height=32*n,t.scale(n,n),t.shadowBlur=5,t.shadowColor="rgba(200,200,200,0.9)",{canvas:e,context:t}},updateCanvasArcByProgress:function(e){const t=this.context,{canvasWidth:n,canvasHeight:i,material:r}=this,a=this.dpr,o=e*Math.PI*2,s=this.color.getStyle(),l=.5*n/a,u=.5*i/a;t.clearRect(0,0,n,i),t.beginPath(),0===e?(t.arc(l,u,n/16,0,2*Math.PI),t.fillStyle=s,t.fill()):(t.arc(l,u,n/4-3,-Math.PI/2,-Math.PI/2+o),t.strokeStyle=s,t.lineWidth=3,t.stroke()),t.closePath(),r.map.needsUpdate=!0},ripple:function(){const e=this.context,{canvasWidth:t,canvasHeight:n,material:i}
vendor: 10,167 bytes, line 73
73=this,r=this.rippleDuration,a=performance.now(),o=this.color,s=this.dpr,l=.5*t/s,u=.5*n/s,d=()=>{const c=window.requestAnimationFrame(d),f=(performance.now()-a)/r,h=1-f>0?1-f:0,p=f*t*.5/s;e.clearRect(0,0,t,n),e.beginPath(),e.arc(l,u,p,0,2*Math.PI),e.fillStyle=`rgba(${255*o.r}, ${255*o.g}, ${255*o.b}, ${h})`,e.fill(),e.closePath(),f>=1&&(window.cancelAnimationFrame(c),this.updateCanvasArcByProgress(0),this.dispatchEvent({type:"reticle-ripple-end"})),i.map.needsUpdate=!0};this.dispatchEvent({type:"reticle-ripple-start"}),d()},show:function(){this.visible=!0},hide:function(){this.visible=!1},start:function(e){this.autoSelect&&(this.dispatchEvent({type:"reticle-start"}),this.startTimestamp=performance.now(),this.callback=e,this.update())},end:function(){this.startTimestamp&&(window.cancelAnimationFrame(this.timerId),this.updateCanvasArcByProgress(0),this.callback=null,this.timerId=null,this.startTimestamp=null,this.dispatchEvent({type:"reticle-end"}))},update:function(){this.timerId=window.requestAnimationFrame(this.update.bind(this));const e=(performance.now()-this.startTimestamp)/this.dwellTime;this.updateCanvasArcByProgress(e),this.dispatchEvent({type:"reticle-update",progress:e}),e>=1&&(window.cancelAnimationFrame(this.timerId),this.callback&&this.callback(),this.end(),this.ripple())}});var y=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(t,n){var i=function(){this._tweens={},this._tweensAddedDuringUpdate={}};i.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(e=void 0!==e?e:r.now();n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var a=this._tweens[n[i]];a&&!1===a.update(e)&&(a._isPlaying=!1,t||delete this._tweens[n[i]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var r=new i;r.Group=i,r._nextId=0,r.nextId=function(){return r._nextId++},"undefined"==typeof self&&void 0!==e&&e.hrtime?r.now=function(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?r.now=self.performance.now.bind(self.performance):void 0!==Date.now?r.now=Date.now:r.now=function(){return(new Date).getTime()},r.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=r.Easing.Linear.None,this._interpolationFunction=r.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||r,this._id=r.nextId()},r.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},duration:function(e){return this._duration=e,this},start:function(e){for(var t in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==e?"string"==typeof e?r.now()+parseFloat(e):e:r.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(0===this._valuesEnd[t].length)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}void 0!==this._object[t]&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array==!1&&(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onRepeat:function(e){return this._onRepeatCallback=e,this},onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,n,i;if(e<this._startTime)return!0;for(t in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(e-this._startTime)/this._duration,n=0===this._duration||n>1?1:n,i=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[t]){var r=this._valuesStart[t]||0,a=this._valuesEnd[t];a instanceof Array?this._object[t]=this._interpolationFunction(a,i):("string"==typeof a&&(a="+"===a.charAt(0)||"-"===a.charAt(0)?r+parseFloat(a):parseFloat(a)),"number"==typeof a&&(this._object[t]=r+(a-r)*i))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(t in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[t]&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var o=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=o}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s<l;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}return!0}},r.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-r.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*r.Easing.Bounce.In(2*e):.5*r.Easing.Bounce.Out(2*e-1)+.5}}},r.Interpolation={Linear:function(e,t){var n=e.length-1,i=n*t,a=Math.floor(i),o=r.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],i):t>1?o(e[n],e[n-1],n-i):o(e[a],e[a+1>n?n:a+1],i-a)},Bezier:function(e,t){for(var n=0,i=e.length-1,a=Math.pow,o=r.Interpolation.Utils.Bernstein,s=0;s<=i;s++)n+=a(1-t,i-s)*a(t,s)*e[s]*o(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,a=Math.floor(i),o=r.Interpolation.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(a=Math.floor(i=n*(1+t))),o(e[(a-1+n)%n],e[a],e[(a+1)%n],e[(a+2)%n],i-a)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(o(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):o(e[a?a-1:0],e[a],e[n<a+1?n:a+1],e[n<a+2?n:a+2],i-a)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=r.Interpolation.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}}(),CatmullRom:function(e,t,n,i,r){var a=.5*(n-e),o=.5*(i-t),s=r*r;return(2*t-2*n+a+o)*(r*s)+(-3*t+3*n-2*a-o)*s+a*r+t}}},t.exports=r});function _(e=300,t,n){const r=500;t=t||f.Info,i.G.call(this),this.type="infospot",this.animated=void 0===n||n,this.isHovering=!1,this.frustumCulled=!1,this.element=null,this.toPanorama=null,this.cursorStyle=null,this.mode=c.NORMAL,this.scale.set(e,e,1),this.rotation.y=Math.PI,this.container=null,this.originalRaycast=this.raycast,this.HANDLER_FOCUS=null,this.material.side=i.i,this.material.depthTest=!1,this.material.transparent=!0,this.material.opacity=0,this.scaleUpAnimation=new y.Tween,this.scaleDownAnimation=new y.Tween;const a=function(t){if(!this.material)return;const n=t.image.width/t.image.height,a=new i.L;
vendor: 25,221 bytes, line 73
73t.image.width=t.image.naturalWidth||64,t.image.height=t.image.naturalHeight||64,this.scale.set(n*e,e,1),a.copy(this.scale),this.scaleUpAnimation=new y.Tween(this.scale).to({x:1.3*a.x,y:1.3*a.y},r).easing(y.Easing.Elastic.Out),this.scaleDownAnimation=new y.Tween(this.scale).to({x:a.x,y:a.y},r).easing(y.Easing.Elastic.Out),this.material.map=t,this.material.needsUpdate=!0}.bind(this);this.showAnimation=new y.Tween(this.material).to({opacity:1},r).onStart(this.enableRaycast.bind(this,!0)).easing(y.Easing.Quartic.Out),this.hideAnimation=new y.Tween(this.material).to({opacity:0},r).onStart(this.enableRaycast.bind(this,!1)).easing(y.Easing.Quartic.Out),this.addEventListener("click",this.onClick),this.addEventListener("hover",this.onHover),this.addEventListener("hoverenter",this.onHoverStart),this.addEventListener("hoverleave",this.onHoverEnd),this.addEventListener("panolens-dual-eye-effect",this.onDualEyeEffect),this.addEventListener("panolens-container",this.setContainer.bind(this)),this.addEventListener("dismiss",this.onDismiss),this.addEventListener("panolens-infospot-focus",this.setFocusMethod),p.load(t,a)}function E(e){e||console.warn("PANOLENS.Widget: No container specified"),i.k.call(this),this.DEFAULT_TRANSITION="all 0.27s ease",this.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch),this.PREVENT_EVENT_HANDLER=function(e){e.preventDefault(),e.stopPropagation()},this.container=e,this.barElement=null,this.fullscreenElement=null,this.videoElement=null,this.settingElement=null,this.mainMenu=null,this.activeMainItem=null,this.activeSubMenu=null,this.mask=null}function b(e,t){i.q.call(this,e,t),this.type="panorama",this.ImageQualityLow=1,this.ImageQualityFair=2,this.ImageQualityMedium=3,this.ImageQualityHigh=4,this.ImageQualitySuperHigh=5,this.animationDuration=1e3,this.defaultInfospotSize=350,this.container=void 0,this.loaded=!1,this.linkedSpots=[],this.isInfospotVisible=!1,this.linkingImageURL=void 0,this.linkingImageScale=void 0,this.material.side=i.a,this.material.opacity=0,this.scale.x*=-1,this.renderOrder=-1,this.active=!1,this.infospotAnimation=new y.Tween(this).to({},this.animationDuration/2),this.addEventListener("load",this.fadeIn.bind(this)),this.addEventListener("panolens-container",this.setContainer.bind(this)),this.addEventListener("click",this.onClick.bind(this)),this.setupTransitions()}function T(e,t,n){const r=t||new i.F(5e3,60,40),a=n||new i.r({opacity:0,transparent:!0});b.call(this,r,a),this.src=e,this.radius=5e3}function w(){const e=new i.d,t=new i.r({color:0,opacity:0,transparent:!0});e.addAttribute("position",new i.c(new Float32Array,1)),b.call(this,e,t)}function A(e=[]){const t=1e4,n=Object.assign({},i.D.cube),r=new i.b(t,t,t),a=new i.E({fragmentShader:n.fragmentShader,vertexShader:n.vertexShader,uniforms:n.uniforms,side:i.a,transparent:!0});b.call(this,r,a),this.images=e,this.edgeLength=t,this.material.uniforms.opacity.value=0}function S(){const e=[];for(let t=0;t<6;t++)e.push(f.WhiteTile);A.call(this,e)}function x(e,t={}){const n=new i.F(5e3,60,40),r=new i.r({opacity:0,transparent:!0});b.call(this,n,r),this.src=e,this.options={videoElement:document.createElement("video"),loop:!0,muted:!0,autoplay:!1,playsinline:!0,crossOrigin:"anonymous"},Object.assign(this.options,t),this.videoElement=this.options.videoElement,this.videoProgress=0,this.radius=5e3,this.addEventListener("leave",this.pauseVideo.bind(this)),this.addEventListener("enter-fade-start",this.resumeVideoProgress.bind(this)),this.addEventListener("video-toggle",this.toggleVideo.bind(this)),this.addEventListener("video-time",this.setVideoCurrentTime.bind(this))}function M(e={}){let t;this._parameters=e,this._zoom=null,this._panoId=null,this._panoClient=new google.maps.StreetViewService,this._count=0,this._total=0,this._canvas=[],this._ctx=[],this._wc=0,this._hc=0,this.result=null,this.rotation=0,this.copyright="",this.onSizeChange=null,this.onPanoramaLoad=null,this.levelsW=[1,2,4,7,13,26],this.levelsH=[1,1,2,4,7,13],this.widths=[416,832,1664,3328,6656,13312],this.heights=[416,416,832,1664,3328,6656],this.maxW=6656,this.maxH=6656;try{const e=document.createElement("canvas");t=e.getContext("experimental-webgl"),t||(t=e.getContext("webgl"))}catch(e){}this.maxW=Math.max(t.getParameter(t.MAX_TEXTURE_SIZE),this.maxW),this.maxH=Math.max(t.getParameter(t.MAX_TEXTURE_SIZE),this.maxH)}function R(e,t){T.call(this),this.panoId=e,this.gsvLoader=null,this.loadRequested=!1,this.setupGoogleMapAPI(t)}_.prototype=Object.assign(Object.create(i.G.prototype),{constructor:_,setContainer:function(e){let t;e instanceof HTMLElement?t=e:e&&e.container&&(t=e.container),t&&this.element&&t.appendChild(this.element),this.container=t},getContainer:function(){return this.container},onClick:function(e){this.element&&this.getContainer()&&(this.onHoverStart(e),this.lockHoverElement())},onDismiss:function(){this.element&&(this.unlockHoverElement(),this.onHoverEnd())},onHover:function(){},onHoverStart:function(e){if(!this.getContainer())return;const t=this.cursorStyle||(this.mode===c.NORMAL?"pointer":"default"),{scaleDownAnimation:n,scaleUpAnimation:i,element:r}=this;if(this.isHovering=!0,this.container.style.cursor=t,this.animated&&(n.stop(),i.start()),r&&e.mouseEvent.clientX>=0&&e.mouseEvent.clientY>=0){const{left:e,right:t,style:n}=r;this.mode===c.CARDBOARD||this.mode===c.STEREO?(n.display="none",e.style.display="block",t.style.display="block",r._width=e.clientWidth,r._height=e.clientHeight):(n.display="block",e&&(e.style.display="none"),t&&(t.style.display="none"),r._width=r.clientWidth,r._height=r.clientHeight)}},onHoverEnd:function(){if(!this.getContainer())return;const{scaleDownAnimation:e,scaleUpAnimation:t,element:n}=this;if(this.isHovering=!1,this.container.style.cursor="default",this.animated&&(t.stop(),e.start()),n&&!this.element.locked){const{left:e,right:t,style:i}=n;i.display="none",e&&(e.style.display="none"),t&&(t.style.display="none"),this.unlockHoverElement()}},onDualEyeEffect:function(e){if(!this.getContainer())return;let t,n,i;this.mode=e.mode,t=this.element,n=this.container.clientWidth/2,i=this.container.clientHeight/2,t&&(t.left||t.right||(t.left=t.cloneNode(!0),t.right=t.cloneNode(!0)),this.mode===c.CARDBOARD||this.mode===c.STEREO?(t.left.style.display=t.style.display,t.right.style.display=t.style.display,t.style.display="none"):(t.style.display=t.left.style.display,t.left.style.display="none",t.right.style.display="none"),this.translateElement(n,i),this.container.appendChild(t.left),this.container.appendChild(t.right))},translateElement:function(e,t){if(!this.element._width||!this.element._height||!this.getContainer())return;let n,i,r,a,o,s,l;l=this.container,r=this.element,a=r._width/2,o=r._height/2,s=void 0!==r.verticalDelta?r.verticalDelta:40,n=e-a,i=t-o-s,this.mode!==c.CARDBOARD&&this.mode!==c.STEREO||!r.left||!r.right||e===l.clientWidth/2&&t===l.clientHeight/2?this.setElementStyle("transform",r,"translate("+n+"px, "+i+"px)"):(n=l.clientWidth/4-a+(e-l.clientWidth/2),i=l.clientHeight/2-o-s+(t-l.clientHeight/2),this.setElementStyle("transform",r.left,"translate("+n+"px, "+i+"px)"),n+=l.clientWidth/2,this.setElementStyle("transform",r.right,"translate("+n+"px, "+i+"px)"))},setElementStyle:function(e,t,n){const i=t.style;"transform"===e&&(i.webkitTransform=i.msTransform=i.transform=n)},setText:function(e){this.element&&(this.element.textContent=e)},setCursorHoverStyle:function(e){this.cursorStyle=e},addHoverText:function(e,t=40){this.element||(this.element=document.createElement("div"),this.element.style.display="none",this.element.style.color="#fff",this.element.style.top=0,this.element.style.maxWidth="50%",this.element.style.maxHeight="50%",this.element.style.textShadow="0 0 3px #000000",this.element.style.fontFamily='"Trebuchet MS", Helvetica, sans-serif',this.element.style.position="absolute",this.element.classList.add("panolens-infospot"),this.element.verticalDelta=t),this.setText(e)},addHoverElement:function(e,t=40){this.element||(this.element=e.cloneNode(!0),this.element.style.display="none",this.element.style.top=0,this.element.style.position="absolute",this.element.classList.add("panolens-infospot"),this.element.verticalDelta=t)},removeHoverElement:function(){this.element&&(this.element.left&&(this.container.removeChild(this.element.left),this.element.left=null),this.element.right&&(this.container.removeChild(this.element.right),this.element.right=null),this.container.removeChild(this.element),this.element=null)},lockHoverElement:function(){this.element&&(this.element.locked=!0)},unlockHoverElement:function(){this.element&&(this.element.locked=!1)},enableRaycast:function(e=!0){this.raycast=e?this.originalRaycast:()=>{}},show:function(e=0){const{animated:t,hideAnimation:n,showAnimation:i,material:r}=this;t?(n.stop(),i.delay(e).start()):(this.enableRaycast(!0),r.opacity=1)},hide:function(e=0){const{animated:t,hideAnimation:n,showAnimation:i,material:r}=this;t?(i.stop(),n.delay(e).start()):(this.enableRaycast(!1),r.opacity=0)},setFocusMethod:function(e){e&&(this.HANDLER_FOCUS=e.method)},focus:function(e,t){this.HANDLER_FOCUS&&(this.HANDLER_FOCUS(this.position,e,t),this.onDismiss())},dispose:function(){const{geometry:e,material:t}=this,{map:n}=t;this.removeHoverElement(),this.parent&&this.parent.remove(this),n&&(n.dispose(),t.map=null),e&&(e.dispose(),this.geometry=null),t&&(t.dispose(),this.material=null)}}),E.prototype=Object.assign(Object.create(i.k.prototype),{constructor:E,addControlBar:function(){if(this.container){var e,t,n,i,r=this;i="linear-gradient(bottom, rgba(0,0,0,0.2), rgba(0,0,0,0))",(e=document.createElement("div")).style.width="100%",e.style.height="44px",e.style.float="left",e.style.transform=e.style.webkitTransform=e.style.msTransform="translateY(-100%)",e.style.background="-webkit-"+i,e.style.background="-moz-"+i,e.style.background="-o-"+i,e.style.background="-ms-"+i,e.style.background=i,e.style.transition=this.DEFAULT_TRANSITION,e.style.pointerEvents="none",e.isHidden=!1,e.toggle=function(){e.isHidden=!e.isHidden,t=e.isHidden?"translateY(0)":"translateY(-100%)",n=e.isHidden?0:1,e.style.transform=e.style.webkitTransform=e.style.msTransform=t,e.style.opacity=n};var a=this.createDefaultMenu();this.mainMenu=this.createMainMenu(a),e.appendChild(this.mainMenu);var o=this.createMask();this.mask=o,this.container.appendChild(o),e.dispose=function(){r.fullscreenElement&&(e.removeChild(r.fullscreenElement),r.fullscreenElement.dispose(),r.fullscreenElement=null),r.settingElement&&(e.removeChild(r.settingElement),r.settingElement.dispose(),r.settingElement=null),r.videoElement&&(e.removeChild(r.videoElement),r.videoElement.dispose(),r.videoElement=null)},this.container.appendChild(e),this.mask.addEventListener("mousemove",this.PREVENT_EVENT_HANDLER,!0),this.mask.addEventListener("mouseup",this.PREVENT_EVENT_HANDLER,!0),this.mask.addEventListener("mousedown",this.PREVENT_EVENT_HANDLER,!0),this.mask.addEventListener(r.TOUCH_ENABLED?"touchend":"click",function(e){e.preventDefault(),e.stopPropagation(),r.mask.hide(),r.settingElement.deactivate()},!1),this.addEventListener("control-bar-toggle",e.toggle),this.barElement=e}else console.warn("Widget container not set")},createDefaultMenu:function(){var e,t=this;return e=function(e,n){return function(){t.dispatchEvent({type:"panolens-viewer-handler",method:e,data:n})}},[{title:"Control",subMenu:[{title:this.TOUCH_ENABLED?"Touch":"Mouse",handler:e("enableControl",d.ORBIT)},{title:"Sensor",handler:e("enableControl",d.DEVICEORIENTATION)}]},{title:"Mode",subMenu:[{title:"Normal",handler:e("disableEffect")},{title:"Cardboard",handler:e("enableEffect",c.CARDBOARD)},{title:"Stereoscopic",handler:e("enableEffect",c.STEREO)}]}]},addControlButton:function(e){let t;switch(e){case"fullscreen":t=this.createFullscreenButton(),this.fullscreenElement=t;break;case"setting":t=this.createSettingButton(),this.settingElement=t;break;case"video":t=this.createVideoControl(),this.videoElement=t;break;default:return}t&&this.barElement.appendChild(t)},createMask:function(){const e=document.createElement("div");return e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width="100%",e.style.height="100%",e.style.background="transparent",e.style.display="none",e.show=function(){this.style.display="block"},e.hide=function(){this.style.display="none"},e},createSettingButton:function(){let e,t=this;return e=this.createCustomItem({style:{backgroundImage:'url("'+f.Setting+'")',webkitTransition:this.DEFAULT_TRANSITION,transition:this.DEFAULT_TRANSITION},onTap:function(e){e.preventDefault(),e.stopPropagation(),t.mainMenu.toggle(),this.activated?this.deactivate():this.activate()}}),e.activate=function(){this.style.transform="rotate3d(0,0,1,90deg)",this.activated=!0,t.mask.show()},e.deactivate=function(){this.style.transform="rotate3d(0,0,0,0)",this.activated=!1,t.mask.hide(),t.mainMenu&&t.mainMenu.visible&&t.mainMenu.hide(),t.activeSubMenu&&t.activeSubMenu.visible&&t.activeSubMenu.hide(),t.mainMenu&&t.mainMenu._width&&(t.mainMenu.changeSize(t.mainMenu._width),t.mainMenu.unslideAll())},e.activated=!1,e},createFullscreenButton:function(){let e,t,n=this,i=!1,r=!0;const{container:a}=this;if(t="panolens-style-addon",document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled){if(document.addEventListener("fullscreenchange",o,!1),document.addEventListener("webkitfullscreenchange",o,!1),document.addEventListener("mozfullscreenchange",o,!1),document.addEventListener("MSFullscreenChange",o,!1),e=this.createCustomItem({style:{backgroundImage:'url("'+f.FullscreenEnter+'")'},onTap:function(e){e.preventDefault(),e.stopPropagation(),r=!1,i?(document.exitFullscreen&&document.exitFullscreen(),document.msExitFullscreen&&document.msExitFullscreen(),document.mozCancelFullScreen&&document.mozCancelFullScreen(),document.webkitExitFullscreen&&document.webkitExitFullscreen(),i=!1):(a.requestFullscreen&&a.requestFullscreen(),a.msRequestFullscreen&&a.msRequestFullscreen(),a.mozRequestFullScreen&&a.mozRequestFullScreen(),a.webkitRequestFullscreen&&a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),i=!0),this.style.backgroundImage=i?'url("'+f.FullscreenLeave+'")':'url("'+f.FullscreenEnter+'")'}}),!document.querySelector(t)){const e=document.createElement("style");e.id=t,e.innerHTML=":-webkit-full-screen { width: 100% !important; height: 100% !important }",document.body.appendChild(e)}return e}function o(){r&&(i=!i,e.style.backgroundImage=i?'url("'+f.FullscreenLeave+'")':'url("'+f.FullscreenEnter+'")'),n.dispatchEvent({type:"panolens-viewer-handler",method:"onWindowResize"}),r=!0}},createVideoControl:function(){const e=document.createElement("span");return e.style.display="none",e.show=function(){e.style.display=""},e.hide=function(){e.style.display="none",e.controlButton.paused=!0,e.controlButton.update()},e.controlButton=this.createVideoControlButton(),e.seekBar=this.createVideoControlSeekbar(),e.appendChild(e.controlButton),e.appendChild(e.seekBar),e.dispose=function(){e.removeChild(e.controlButton),e.removeChild(e.seekBar),e.controlButton.dispose(),e.controlButton=null,e.seekBar.dispose(),e.seekBar=null},this.addEventListener("video-control-show",e.show),this.addEventListener("video-control-hide",e.hide),e},createVideoControlButton:function(){const e=this;const t=this.createCustomItem({style:{float:"left",backgroundImage:'url("'+f.VideoPlay+'")'},onTap:function(n){n.preventDefault(),n.stopPropagation(),e.dispatchEvent({type:"panolens-viewer-handler",method:"toggleVideoPlay",data:!this.paused}),this.paused=!this.paused,t.update()}});return t.paused=!0,t.update=function(e){this.paused=void 0!==e?e:this.paused,this.style.backgroundImage='url("'+(this.paused?f.VideoPlay:f.VideoPause)+'")'},t},createVideoControlSeekbar:function(){let e,t,n,i,r,a,o=this,s=!1;function l(e){e.stopPropagation(),s=!0,i=e.clientX||e.changedTouches&&e.changedTouches[0].clientX,r=parseInt(t.style.width)/100,o.container.addEventListener("mousemove",u,{passive:!0}),o.container.addEventListener("mouseup",d,{passive:!0}),o.container.addEventListener("touchmove",u,{passive:!0}),o.container.addEventListener("touchend",d,{passive:!0})}function u(t){if(s){const n=t.clientX||t.changedTouches&&t.changedTouches[0].clientX;a=(n-i)/e.clientWidth,a=r+a,a=a>1?1:a<0?0:a,e.setProgress(a),o.dispatchEvent({type:"panolens-viewer-handler",method:"setVideoCurrentTime",data:a})}}function d(e){e.stopPropagation(),s=!1,c()}function c(){o.container.removeEventListener("mousemove",u,!1),o.container.removeEventListener("mouseup",d,!1),o.container.removeEventListener("touchmove",u,!1),o.container.removeEventListener("touchend",d,!1)}return t=document.createElement("div"),t.style.width="0%",t.style.height="100%",t.style.backgroundColor="#fff",n=document.createElement("div"),n.style.float="right",n.style.width="14px",n.style.height="14px",n.style.transform="translate(7px, -5px)",n.style.borderRadius="50%",n.style.backgroundColor="#ddd",n.addEventListener("mousedown",l,{passive:!0}),n.addEventListener("touchstart",l,{passive:!0}),t.appendChild(n),e=this.createCustomItem({style:{float:"left",width:"30%",height:"4px",marginTop:"20px",backgroundColor:"rgba(188,188,188,0.8)"},onTap:function(t){if(t.preventDefault(),t.stopPropagation(),t.target===n)return;const i=t.changedTouches&&t.changedTouches.length>0?(t.changedTouches[0].pageX-t.target.getBoundingClientRect().left)/this.clientWidth:t.offsetX/this.clientWidth;o.dispatchEvent({type:"panolens-viewer-handler",method:"setVideoCurrentTime",data:i}),e.setProgress(t.offsetX/this.clientWidth)},onDispose:function(){c(),t=null,n=null}}),e.appendChild(t),e.setProgress=function(e){t.style.width=100*e+"%"},this.addEventListener("video-update",function(t){e.setProgress(t.percentage)}),e.progressElement=t,e.progressElementControl=n,e},createMenuItem:function(e){const t=this,n=document.createElement("a");return n.textContent=e,n.style.display="block",n.style.padding="10px",n.style.textDecoration="none",n.style.cursor="pointer",n.style.pointerEvents="auto",n.style.transition=this.DEFAULT_TRANSITION,n.slide=function(e){this.style.transform="translateX("+(e?"":"-")+"100%)"},n.unslide=function(){this.style.transform="translateX(0)"},n.setIcon=function(e){this.icon&&(this.icon.style.backgroundImage="url("+e+")")},n.setSelectionTitle=function(e){this.selection&&(this.selection.textContent=e)},n.addSelection=function(e){const t=document.createElement("span");return t.style.fontSize="13px",t.style.fontWeight="300",t.style.float="right",this.selection=t,this.setSelectionTitle(e),this.appendChild(t),this},n.addIcon=function(e=f.ChevronRight,t=!1,n=!1){const i=document.createElement("span");return i.style.float=t?"left":"right",i.style.width="17px",i.style.height="17px",i.style["margin"+(t?"Right":"Left")]="12px",i.style.backgroundSize="cover",n&&(i.style.transform="rotateZ(180deg)"),this.icon=i,this.setIcon(e),this.appendChild(i),this},n.addSubMenu=function(e,n){return this.subMenu=t.createSubMenu(e,n),this},n.addEventListener("mouseenter",function(){this.style.backgroundColor="#e0e0e0"},!1),n.addEventListener("mouseleave",function(){this.style.backgroundColor="#fafafa"},!1),n},createMenuItemHeader:function(e){const t=this.createMenuItem(e);return t.style.borderBottom="1px solid #333",t.style.paddingBottom="15px",t},createMainMenu:function(e){let t=this,n=this.createMenu();function i(e){e.preventDefault(),e.stopPropagation();let n=t.mainMenu,i=this.subMenu;n.hide(),n.slideAll(),n.parentElement.appendChild(i),t.activeMainItem=this,t.activeSubMenu=i,window.requestAnimationFrame(function(){n.changeSize(i.clientWidth),i.show(),i.unslideAll()})}n._width=200,n.changeSize(n._width);for(var r=0;r<e.length;r++){var a=n.addItem(e[r].title);if(a.style.paddingLeft="20px",a.addIcon().addEventListener(t.TOUCH_ENABLED?"touchend":"click",i,!1),e[r].subMenu&&e[r].subMenu.length>0){var o=e[r].subMenu[0].title;a.addSelection(o).addSubMenu(e[r].title,e[r].subMenu)}}return n},createSubMenu:function(e,t){let n,i=this,r=this.createMenu();function a(e){e.preventDefault(),e.stopPropagation(),n=i.mainMenu,n.changeSize(n._width),n.unslideAll(),n.show(),r.slideAll(!0),r.hide(),"header"!==this.type&&(r.setActiveItem(this),i.activeMainItem.setSelectionTitle(this.textContent),this.handler&&this.handler())}r.items=t,r.activeItem=null,r.addHeader(e).addIcon(void 0,!0,!0).addEventListener(i.TOUCH_ENABLED?"touchend":"click",a,!1);for(let e=0;e<t.length;e++){const n=r.addItem(t[e].title);n.style.fontWeight=300,n.handler=t[e].handler,n.addIcon(" ",!0),n.addEventListener(i.TOUCH_ENABLED?"touchend":"click",a,!1),r.activeItem||r.setActiveItem(n)}return r.slideAll(!0),r},createMenu:function(){const e=this,t=document.createElement("span"),n=t.style;return n.padding="5px 0",n.position="fixed",n.bottom="100%",n.right="14px",n.backgroundColor="#fafafa",n.fontFamily="Helvetica Neue",n.fontSize="14px",n.visibility="hidden",n.opacity=0,n.boxShadow="0 0 12pt rgba(0,0,0,0.25)",n.borderRadius="2px",n.overflow="hidden",n.willChange="width, height, opacity",n.pointerEvents="auto",n.transition=this.DEFAULT_TRANSITION,t.visible=!1,t.changeSize=function(e,t){e&&(this.style.width=e+"px"),t&&(this.style.height=t+"px")},t.show=function(){this.style.opacity=1,this.style.visibility="visible",this.visible=!0},t.hide=function(){this.style.opacity=0,this.style.visibility="hidden",this.visible=!1},t.toggle=function(){this.visible?this.hide():this.show()},t.slideAll=function(e){for(let n=0;n<t.children.length;n++)t.children[n].slide&&t.children[n].slide(e)},t.unslideAll=function(){for(let e=0;e<t.children.length;e++)t.children[e].unslide&&t.children[e].unslide()},t.addHeader=function(t){const n=e.createMenuItemHeader(t);return n.type="header",this.appendChild(n),n},t.addItem=function(t){const n=e.createMenuItem(t);return n.type="item",this.appendChild(n),n},t.setActiveItem=function(e){this.activeItem&&this.activeItem.setIcon(" "),e.setIcon(f.Check),this.activeItem=e},t.addEventListener("mousemove",this.PREVENT_EVENT_HANDLER,!0),t.addEventListener("mouseup",this.PREVENT_EVENT_HANDLER,!0),t.addEventListener("mousedown",this.PREVENT_EVENT_HANDLER,!0),t},createCustomItem:function(e={}){const t=this,n=e.element||document.createElement("span"),{onDispose:i}=e;return n.style.cursor="pointer",n.style.float="right",n.style.width="44px",n.style.height="100%",n.style.backgroundSize="60%",n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="center",n.style.webkitUserSelect=n.style.MozUserSelect=n.style.userSelect="none",n.style.position="relative",n.style.pointerEvents="auto",n.addEventListener(t.TOUCH_ENABLED?"touchstart":"mouseenter",function(){n.style.filter=n.style.webkitFilter="drop-shadow(0 0 5px rgba(255,255,255,1))"},{passive:!0}),n.addEventListener(t.TOUCH_ENABLED?"touchend":"mouseleave",function(){n.style.filter=n.style.webkitFilter=""},{passive:!0}),this.mergeStyleOptions(n,e.style),e.onTap&&n.addEventListener(t.TOUCH_ENABLED?"touchend":"click",e.onTap,!1),n.dispose=function(){n.removeEventListener(t.TOUCH_ENABLED?"touchend":"click",e.onTap,!1),i&&e.onDispose()},n},mergeStyleOptions:function(e,t={}){for(let n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n]);return e},dispose:function(){this.barElement&&(this.container.removeChild(this.barElement),this.barElement.dispose(),this.barElement=null)}}),b.prototype=Object.assign(Object.create(i.q.prototype),{constructor:b,add:function(e){let t;if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}if(e instanceof _){if(t=e,e.dispatchEvent){const{container:t}=this;t&&e.dispatchEvent({type:"panolens-container",container:t}),e.dispatchEvent({type:"panolens-infospot-focus",method:function(e,t,n){this.dispatchEvent({type:"panolens-viewer-handler",method:"tweenControlCenter",data:[e,t,n]})}.bind(this)})}}else t=new i.t,t.scale.x=-1,t.scalePlaceHolder=!0,t.add(e);i.t.prototype.add.call(this,t)},load:function(){this.onLoad()},onClick:function(e){e.intersects&&0===e.intersects.length&&this.traverse(function(e){e.dispatchEvent({type:"dismiss"})})},setContainer:function(e){let t;e instanceof HTMLElement?t=e:e&&e.container&&(t=e.container),t&&(this.children.forEach(function(e){e instanceof _&&e.dispatchEvent&&e.dispatchEvent({type:"panolens-container",container:t})}),this.container=t)},onLoad:function(){this.loaded=!0,this.dispatchEvent({type:"load"})},onProgress:function(e){this.dispatchEvent({type:"progress",progress:e})},onError:function(){this.dispatchEvent({type:"error"})},getZoomLevel:function(){let e;return e=window.innerWidth<=800?this.ImageQualityFair:window.innerWidth>800&&window.innerWidth<=1280?this.ImageQualityMedium:window.innerWidth>1280&&window.innerWidth<=1920?this.ImageQualityHigh:window.innerWidth>1920?this.ImageQualitySuperHigh:this.ImageQualityLow,e},updateTexture:function(e){this.material.map=e,this.material.needsUpdate=!0},toggleInfospotVisibility:function(e,t){t=void 0!==t?t:0;const n=void 0!==e?e:!this.isInfospotVisible;this.traverse(function(e){e instanceof _&&(n?e.show(t):e.hide(t))}),this.isInfospotVisible=n,this.infospotAnimation.onComplete(function(){this.dispatchEvent({type:"infospot-animation-complete",visible:n})}.bind(this)).delay(t).start()}
73,setLinkingImage:function(e,t){this.linkingImageURL=e,this.linkingImageScale=t},link:function(e,t,n,i){let r,a;if(this.visible=!0,!t)return void console.warn("Please specify infospot position for linking");r=void 0!==n?n:void 0!==e.linkingImageScale?e.linkingImageScale:300,a=i||(e.linkingImageURL?e.linkingImageURL:f.Arrow);const o=new _(r,a);o.position.copy(t),o.toPanorama=e,o.addEventListener("click",function(){this.dispatchEvent({type:"panolens-viewer-handler",method:"setPanorama",data:e})}.bind(this)),this.linkedSpots.push(o),this.add(o),this.visible=!1},reset:function(){this.children.length=0},setupTransitions:function(){this.fadeInAnimation=new y.Tween(this.material).easing(y.Easing.Quartic.Out).onStart(function(){this.visible=!0,this.dispatchEvent({type:"enter-fade-start"})}.bind(this)),this.fadeOutAnimation=new y.Tween(this.material).easing(y.Easing.Quartic.Out).onComplete(function(){this.visible=!1,this.dispatchEvent({type:"leave-complete"})}.bind(this)),this.enterTransition=new y.Tween(this).easing(y.Easing.Quartic.Out).onComplete(function(){this.dispatchEvent({type:"enter-complete"})}.bind(this)).start(),this.leaveTransition=new y.Tween(this).easing(y.Easing.Quartic.Out)},onFadeAnimationUpdate:function(){const e=this.material.opacity,{uniforms:t}=this.material;t&&t.opacity&&(t.opacity.value=e)},fadeIn:function(e){e=e>=0?e:this.animationDuration,this.fadeOutAnimation.stop(),this.fadeInAnimation.to({opacity:1},e).onUpdate(this.onFadeAnimationUpdate.bind(this)).onComplete(function(){this.toggleInfospotVisibility(!0,e/2),this.dispatchEvent({type:"enter-fade-complete"})}.bind(this)).start()},fadeOut:function(e){e=e>=0?e:this.animationDuration,this.fadeInAnimation.stop(),this.fadeOutAnimation.to({opacity:0},e).onUpdate(this.onFadeAnimationUpdate.bind(this)).start()},onEnter:function(){const e=this.animationDuration;this.leaveTransition.stop(),this.enterTransition.to({},e).onStart(function(){this.dispatchEvent({type:"enter-start"}),this.loaded?this.fadeIn(e):this.load()}.bind(this)).start(),this.dispatchEvent({type:"enter"}),this.children.forEach(e=>{e.dispatchEvent({type:"panorama-enter"})}),this.active=!0},onLeave:function(){const e=this.animationDuration;this.enterTransition.stop(),this.leaveTransition.to({},e).onStart(function(){this.dispatchEvent({type:"leave-start"}),this.fadeOut(e),this.toggleInfospotVisibility(!1)}.bind(this)).start(),this.dispatchEvent({type:"leave"}),this.children.forEach(e=>{e.dispatchEvent({type:"panorama-leave"})}),this.active=!1},dispose:function(){this.infospotAnimation.stop(),this.fadeInAnimation.stop(),this.fadeOutAnimation.stop(),this.enterTransition.stop(),this.leaveTransition.stop(),this.dispatchEvent({type:"panolens-viewer-handler",method:"onPanoramaDispose",data:this}),function e(t){const{geometry:n,material:i}=t;for(var r=t.children.length-1;r>=0;r--)e(t.children[r]),t.remove(t.children[r]);t instanceof _&&t.dispose(),n&&(n.dispose(),t.geometry=null),i&&(i.dispose(),t.material=null)}(this),this.parent&&this.parent.remove(this)}}),T.prototype=Object.assign(Object.create(b.prototype),{constructor:T,load:function(e){(e=e||this.src)?"string"==typeof e?p.load(e,this.onLoad.bind(this),this.onProgress.bind(this),this.onError.bind(this)):e instanceof HTMLImageElement&&this.onLoad(new i.J(e)):console.warn("Image source undefined")},onLoad:function(e){e.minFilter=e.magFilter=i.m,e.needsUpdate=!0,this.updateTexture(e),window.requestAnimationFrame(b.prototype.onLoad.bind(this))},reset:function(){b.prototype.reset.call(this)},dispose:function(){const{material:{map:e}}=this;i.e.remove(this.src),e&&e.dispose(),b.prototype.dispose.call(this)}}),w.prototype=Object.assign(Object.create(b.prototype),{constructor:w}),A.prototype=Object.assign(Object.create(b.prototype),{constructor:A,load:function(){m.load(this.images,this.onLoad.bind(this),this.onProgress.bind(this),this.onError.bind(this))},onLoad:function(e){this.material.uniforms.tCube.value=e,b.prototype.onLoad.call(this)},dispose:function(){const{value:e}=this.material.uniforms.tCube;this.images.forEach(e=>{i.e.remove(e)}),e instanceof i.h&&e.dispose(),b.prototype.dispose.call(this)}}),S.prototype=Object.assign(Object.create(A.prototype),{constructor:S}),x.prototype=Object.assign(Object.create(b.prototype),{constructor:x,isMobile:function(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
73sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(window.navigator.userAgent||window.navigator.vendor||window.opera),e},load:function(){const{muted:e,loop:t,autoplay:n,playsinline:i,crossOrigin:r}=this.options,a=this.videoElement,o=this.material,s=this.onProgress.bind(this),l=this.onLoad.bind(this);a.loop=t,a.autoplay=n,a.playsinline=i,a.crossOrigin=r,a.muted=e,i&&(a.setAttribute("playsinline",""),a.setAttribute("webkit-playsinline",""));const u=function(){this.setVideoTexture(a),n&&this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!1}),this.isMobile()&&(a.pause(),n&&e?this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!1}):this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!0}));window.requestAnimationFrame(()=>{o.map.needsUpdate=!0,s({loaded:1,total:1}),l()})};if(a.readyState>2)u.call(this);else{if(0===a.querySelectorAll("source").length){const e=document.createElement("source");e.src=this.src,a.appendChild(e)}a.load()}a.addEventListener("loadeddata",u.bind(this)),a.addEventListener("timeupdate",function(){this.videoProgress=a.duration>=0?a.currentTime/a.duration:0,this.dispatchEvent({type:"panolens-viewer-handler",method:"onVideoUpdate",data:this.videoProgress})}.bind(this)),a.addEventListener("ended",function(){t||(this.resetVideo(),this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!0}))}.bind(this),!1)},setVideoTexture:function(e){if(!e)return;const t=new i.M(e);t.minFilter=i.m,t.magFilter=i.m,t.format=i.A,this.updateTexture(t)},reset:function(){this.videoElement=void 0,b.prototype.reset.call(this)},isVideoPaused:function(){return this.videoElement.paused},toggleVideo:function(){const e=this.videoElement;e&&e[e.paused?"play":"pause"]()},setVideoCurrentTime:function({percentage:e}){const t=this.videoElement;t&&!Number.isNaN(e)&&1!==e&&(t.currentTime=t.duration*e,this.dispatchEvent({type:"panolens-viewer-handler",method:"onVideoUpdate",data:e}))},playVideo:function(){const e=this.videoElement,t=this.playVideo.bind(this),n=this.dispatchEvent.bind(this),i=()=>{n({type:"play"})},r=e=>{window.requestAnimationFrame(t),n({type:"play-error",error:e})};e&&e.paused&&e.play().then(i).catch(r)},pauseVideo:function(){const e=this.videoElement;e&&!e.paused&&e.pause(),this.dispatchEvent({type:"pause"})},resumeVideoProgress:function(){const e=this.videoElement;e.readyState>=4&&e.autoplay&&!this.isMobile()?(this.playVideo(),this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!1})):(this.pauseVideo(),this.dispatchEvent({type:"panolens-viewer-handler",method:"updateVideoPlayButton",data:!0})),this.setVideoCurrentTime({percentage:this.videoProgress})},resetVideo:function(){this.videoElement&&this.setVideoCurrentTime({percentage:0})},isVideoMuted:function(){return this.videoElement.muted},muteVideo:function(){const e=this.videoElement;e&&!e.muted&&(e.muted=!0),this.dispatchEvent({type:"volumechange"})},unmuteVideo:function(){const e=this.videoElement;e&&this.isVideoMuted()&&(e.muted=!1),this.dispatchEvent({type:"volumechange"})},getVideoElement:function(){return this.videoElement},dispose:function(){const{material:{map:e}}=this;this.pauseVideo(),this.removeEventListener("leave",this.pauseVideo.bind(this)),this.removeEventListener("enter-fade-start",this.resumeVideoProgress.bind(this)),this.removeEventListener("video-toggle",this.toggleVideo.bind(this)),this.removeEventListener("video-time",this.setVideoCurrentTime.bind(this)),e&&e.dispose(),b.prototype.dispose.call(this)}}),Object.assign(M.prototype,{constructor:M,setProgress:function(e,t){this.onProgress&&this.onProgress({loaded:e,total:t})},adaptTextureToZoom:function(){const e=this.widths[this._zoom],t=this.heights[this._zoom],n=this.maxW,i=this.maxH;this._wc=Math.ceil(e/n),this._hc=Math.ceil(t/i);for(let r=0;r<this._hc;r++)for(let a=0;a<this._wc;a++){const o=document.createElement("canvas");a<this._wc-1?o.width=n:o.width=e-n*a,r<this._hc-1?o.height=i:o.height=t-i*r,this._canvas.push(o),this._ctx.push(o.getContext("2d"))}},composeFromTile:function(e,t,n){const i=this.maxW,r=this.maxH;e*=512,t*=512;const a=Math.floor(e/i),o=Math.floor(t/r);
73e-=a*i,t-=o*r,this._ctx[o*this._wc+a].drawImage(n,0,0,n.width,n.height,e,t,512,512),this.progress()},progress:function(){this._count++,this.setProgress(this._count,this._total),this._count===this._total&&(this.canvas=this._canvas,this.panoId=this._panoId,this.zoom=this._zoom,this.onPanoramaLoad&&this.onPanoramaLoad(this._canvas[0]))},composePanorama:function(){this.setProgress(0,1);const e=this.levelsW[this._zoom],t=this.levelsH[this._zoom],n=this;this._count=0,this._total=e*t;const{useWebGL:i}=this._parameters;for(let r=0;r<t;r++)for(let t=0;t<e;t++){const e="https://geo0.ggpht.com/cbk?cb_client=maps_sv.tactile&authuser=0&hl=en&output=tile&zoom="+this._zoom+"&x="+t+"&y="+r+"&panoid="+this._panoId+"&nbt&fover=2";(function(t,r){if(i){const i=p.load(e,null,function(){n.composeFromTile(t,r,i)})}else{const i=new Image;i.addEventListener("load",function(){n.composeFromTile(t,r,this)}),i.crossOrigin="",i.src=e}})(t,r)}},load:function(e){this.loadPano(e)},loadPano:function(e){const t=this;this._panoClient.getPanoramaById(e,function(e,n){
vendor: 49,488 bytes, line 73
73n===google.maps.StreetViewStatus.OK&&(t.result=e,t.copyright=e.copyright,t._panoId=e.location.pano,t.composePanorama())})},setZoom:function(e){this._zoom=e,this.adaptTextureToZoom()}}),R.prototype=Object.assign(Object.create(T.prototype),{constructor:R,load:function(e){this.loadRequested=!0,(e=e||this.panoId||{})&&this.gsvLoader&&this.loadGSVLoader(e)},setupGoogleMapAPI:function(e){const t=document.createElement("script");t.src="https://maps.googleapis.com/maps/api/js?",t.src+=e?"key="+e:"",t.onreadystatechange=this.setGSVLoader.bind(this),t.onload=this.setGSVLoader.bind(this),document.querySelector("head").appendChild(t)},setGSVLoader:function(){this.gsvLoader=new M,this.loadRequested&&this.load()},getGSVLoader:function(){return this.gsvLoader},loadGSVLoader:function(e){this.loadRequested=!1,this.gsvLoader.onProgress=this.onProgress.bind(this),this.gsvLoader.onPanoramaLoad=this.onLoad.bind(this),this.gsvLoader.setZoom(this.getZoomLevel()),this.gsvLoader.load(e),this.gsvLoader.loaded=!0},onLoad:function(e){T.prototype.onLoad.call(this,new i.J(e))},reset:function(){this.gsvLoader=void 0,T.prototype.reset.call(this)}});const C={uniforms:{tDiffuse:{value:new i.J},resolution:{value:1},transform:{value:new i.p},zoom:{value:1},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float resolution;","uniform mat4 transform;","uniform float zoom;","uniform float opacity;","varying vec2 vUv;","const float PI = 3.141592653589793;","void main(){","vec2 position = -1.0 +  2.0 * vUv;","position *= vec2( zoom * resolution, zoom * 0.5 );","float x2y2 = position.x * position.x + position.y * position.y;","vec3 sphere_pnt = vec3( 2. * position, x2y2 - 1. ) / ( x2y2 + 1. );","sphere_pnt = vec3( transform * vec4( sphere_pnt, 1.0 ) );","vec2 sampleUV = vec2(","(atan(sphere_pnt.y, sphere_pnt.x) / PI + 1.0) * 0.5,","(asin(sphere_pnt.z) / PI + 0.5)",");","gl_FragColor = texture2D( tDiffuse, sampleUV );","gl_FragColor.a *= opacity;","}"].join("\n")};function I(e="image",t,n=1e4,r=.5){"image"===e&&T.call(this,t,this.createGeometry(n,r),this.createMaterial(n)),this.size=n,this.ratio=r,this.EPS=1e-6,this.frameId=null,this.dragging=!1,this.userMouse=new i.K,this.quatA=new i.x,this.quatB=new i.x,this.quatCur=new i.x,this.quatSlerp=new i.x,this.vectorX=new i.L(1,0,0),this.vectorY=new i.L(0,1,0),this.addEventListener("window-resize",this.onWindowResize)}function L(e,t,n){I.call(this,"image",e,t,n)}function O(e){const t=new i.F(5e3,60,40),n=new i.r({visible:!1});b.call(this,t,n),this.media=new g(e),this.radius=5e3,this.addEventListener("enter",this.start.bind(this)),this.addEventListener("leave",this.stop.bind(this)),this.addEventListener("panolens-container",this.onPanolensContainer.bind(this)),this.addEventListener("panolens-scene",this.onPanolensScene.bind(this))}function D(e,t){this.object=e,this.domElement=void 0!==t?t:document,this.frameId=null,this.enabled=!0,this.target=new i.L,this.center=this.target,this.noZoom=!1,this.zoomSpeed=1,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.noRotate=!1,this.rotateSpeed=-.15,this.noPan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.momentumDampingFactor=.9,this.momentumScalingFactor=-.005,this.momentumKeydownFactor=20,this.minFov=30,this.maxFov=120,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.noKeys=!1,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:i.n.LEFT,ZOOM:i.n.MIDDLE,PAN:i.n.RIGHT};var n,r,a,o,s,l=this,u=1e-7,d=1e-4,c=new i.K,f=new i.K,h=new i.K,p=new i.K,m=new i.K,g=new i.K,v=new i.L,y=new i.L,_=new i.K,E=new i.K,b=new i.K,T=0,w=0,A=0,S=0,x=1,M=new i.L,R=new i.L,C=new i.x,I=0,L=0,O=!1,D=-1,P=0,N=1,k=2,F=3,B=4,U=5,j=D;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom;var G=(new i.x).setFromUnitVectors(e.up,new i.L(0,1,0)),V=G.clone().inverse(),H={type:"change"},z={type:"start"},W={type:"end"};function q(){return 2*Math.PI/60/60*l.autoRotateSpeed}function Y(){return Math.pow(.95,l.zoomSpeed)}function K(e){if(O=!1,I=L=0,!1!==l.enabled){if(e.preventDefault(),e.button===l.mouseButtons.ORBIT){if(!0===l.noRotate)return;j=P,c.set(e.clientX,e.clientY)}else if(e.button===l.mouseButtons.ZOOM){if(!0===l.noZoom)return;j=N,_.set(e.clientX,e.clientY)}else if(e.button===l.mouseButtons.PAN){if(!0===l.noPan)return;j=k,p.set(e.clientX,e.clientY)}j!==D&&(document.addEventListener("mousemove",X,!1),document.addEventListener("mouseup",Q,!1),l.dispatchEvent(z)),l.update()}}function X(e){if(!1!==l.enabled){e.preventDefault();var t=l.domElement===document?l.domElement.body:l.domElement;if(j===P){if(!0===l.noRotate)return;f.set(e.clientX,e.clientY),h.subVectors(f,c),l.rotateLeft(2*Math.PI*h.x/t.clientWidth*l.rotateSpeed),l.rotateUp(2*Math.PI*h.y/t.clientHeight*l.rotateSpeed),c.copy(f),n&&(I=e.clientX-n.clientX,L=e.clientY-n.clientY),n=e}else if(j===N){if(!0===l.noZoom)return;E.set(e.clientX,e.clientY),b.subVectors(E,_),b.y>0?l.dollyIn():b.y<0&&l.dollyOut(),_.copy(E)}else if(j===k){if(!0===l.noPan)return;m.set(e.clientX,e.clientY),g.subVectors(m,p),l.pan(g.x,g.y),p.copy(m)}j!==D&&l.update()}}function Q(){O=!0,n=void 0,!1!==l.enabled&&(document.removeEventListener("mousemove",X,!1),document.removeEventListener("mouseup",Q,!1),l.dispatchEvent(W),j=D)}function Z(e){if(!1!==l.enabled&&!0!==l.noZoom&&j===D){e.preventDefault(),e.stopPropagation();var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?(l.object.fov=l.object.fov<l.maxFov?l.object.fov+1:l.maxFov,l.object.updateProjectionMatrix()):t<0&&(l.object.fov=l.object.fov>l.minFov?l.object.fov-1:l.minFov,l.object.updateProjectionMatrix()),l.update(),l.dispatchEvent(H),l.dispatchEvent(z),l.dispatchEvent(W)}}function J(e){switch(e.keyCode){case l.keys.UP:r=!1;break;case l.keys.BOTTOM:a=!1;break;case l.keys.LEFT:o=!1;break;case l.keys.RIGHT:s=!1}}function $(e){if(!1!==l.enabled&&!0!==l.noKeys&&!0!==l.noRotate){switch(e.keyCode){case l.keys.UP:r=!0;break;case l.keys.BOTTOM:a=!0;break;case l.keys.LEFT:o=!0;break;case l.keys.RIGHT:s=!0}(r||a||o||s)&&(O=!0,r&&(L=-l.rotateSpeed*l.momentumKeydownFactor),a&&(L=l.rotateSpeed*l.momentumKeydownFactor),o&&(I=-l.rotateSpeed*l.momentumKeydownFactor),s&&(I=l.rotateSpeed*l.momentumKeydownFactor))}}function ee(e){if(O=!1,I=L=0,!1!==l.enabled){switch(e.touches.length){case 1:if(!0===l.noRotate)return;j=F,c.set(e.touches[0].pageX,e.touches[0].pageY);break;case 2:if(!0===l.noZoom)return;j=B;var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,i=Math.sqrt(t*t+n*n);_.set(0,i);break;case 3:if(!0===l.noPan)return;j=U,p.set(e.touches[0].pageX,e.touches[0].pageY);break;default:j=D}j!==D&&l.dispatchEvent(z)}}function te(e){if(!1!==l.enabled){e.preventDefault(),e.stopPropagation();var t=l.domElement===document?l.domElement.body:l.domElement;switch(e.touches.length){case 1:if(!0===l.noRotate)return;if(j!==F)return;f.set(e.touches[0].pageX,e.touches[0].pageY),h.subVectors(f,c),l.rotateLeft(2*Math.PI*h.x/t.clientWidth*l.rotateSpeed),l.rotateUp(2*Math.PI*h.y/t.clientHeight*l.rotateSpeed),c.copy(f),n&&(I=e.touches[0].pageX-n.pageX,L=e.touches[0].pageY-n.pageY),n={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},l.update();break;case 2:if(!0===l.noZoom)return;if(j!==B)return;var i=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(i*i+r*r);E.set(0,a),b.subVectors(E,_),b.y<0?(l.object.fov=l.object.fov<l.maxFov?l.object.fov+1:l.maxFov,l.object.updateProjectionMatrix()):b.y>0&&(l.object.fov=l.object.fov>l.minFov?l.object.fov-1:l.minFov,l.object.updateProjectionMatrix()),_.copy(E),l.update(),l.dispatchEvent(H);break;case 3:if(!0===l.noPan)return;if(j!==U)return;m.set(e.touches[0].pageX,e.touches[0].pageY),g.subVectors(m,p),l.pan(g.x,g.y),p.copy(m),l.update();break;default:j=D}}}function ne(){O=!0,n=void 0,!1!==l.enabled&&(l.dispatchEvent(W),j=D)}this.setLastQuaternion=function(e){C.copy(e),l.object.quaternion.copy(e)},this.getLastPosition=function(){return R},this.rotateLeft=function(e){void 0===e&&(e=q()),S-=e},this.rotateUp=function(e){void 0===e&&(e=q()),A-=e},this.panLeft=function(e){var t=this.object.matrix.elements;v.set(t[0],t[1],t[2]),v.multiplyScalar(-e),M.add(v)},this.panUp=function(e){var t=this.object.matrix.elements;v.set(t[4],t[5],t[6]),v.multiplyScalar(e),M.add(v)},this.pan=function(e,t){var n=l.domElement===document?l.domElement.body:l.domElement;if(l.object instanceof i.v){var r=l.object.position.clone().sub(l.target).length();r*=Math.tan(l.object.fov/2*Math.PI/180),l.panLeft(2*e*r/n.clientHeight),l.panUp(2*t*r/n.clientHeight)}else l.object instanceof i.u?(l.panLeft(e*(l.object.right-l.object.left)/n.clientWidth),l.panUp(t*(l.object.top-l.object.bottom)/n.clientHeight)):console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.")},this.momentum=function(){O&&(Math.abs(I)<d&&Math.abs(L)<d?O=!1:(L*=this.momentumDampingFactor,I*=this.momentumDampingFactor,S-=this.momentumScalingFactor*I,A-=this.momentumScalingFactor*L))},this.dollyIn=function(e){void 0===e&&(e=Y()),l.object instanceof i.v?x/=e:l.object instanceof i.u?(l.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom*e)),l.object.updateProjectionMatrix(),l.dispatchEvent(H)):console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.")},this.dollyOut=function(e){void 0===e&&(e=Y()),l.object instanceof i.v?x*=e:l.object instanceof i.u?(l.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/e)),l.object.updateProjectionMatrix(),l.dispatchEvent(H)):console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.")},this.update=function(e){var t=this.object.position;y.copy(t).sub(this.target),y.applyQuaternion(G),T=Math.atan2(y.x,y.z),w=Math.atan2(Math.sqrt(y.x*y.x+y.z*y.z),y.y),this.autoRotate&&j===D&&this.rotateLeft(q()),this.momentum(),T+=S,w+=A,T=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,T)),w=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,w)),w=Math.max(u,Math.min(Math.PI-u,w));var n=y.length()*x;n=Math.max(this.minDistance,Math.min(this.maxDistance,n)),this.target.add(M),y.x=n*Math.sin(w)*Math.sin(T),y.y=n*Math.cos(w),y.z=n*Math.sin(w)*Math.cos(T),y.applyQuaternion(V),t.copy(this.target).add(y),this.object.lookAt(this.target),S=0,A=0,x=1,M.set(0,0,0),(R.distanceToSquared(this.object.position)>u||8*(1-C.dot(this.object.quaternion))>u)&&(!0!==e&&this.dispatchEvent(H),R.copy(this.object.position),C.copy(this.object.quaternion))},this.reset=function(){j=D,this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(H),this.update()},this.getPolarAngle=function(){return w},this.getAzimuthalAngle=function(){return T},this.dispose=function(){this.domElement.removeEventListener("mousedown",K),this.domElement.removeEventListener("mousewheel",Z),this.domElement.removeEventListener("DOMMouseScroll",Z),this.domElement.removeEventListener("touchstart",ee),this.domElement.removeEventListener("touchend",ne),this.domElement.removeEventListener("touchmove",te),window.removeEventListener("keyup",J),window.removeEventListener("keydown",$)},this.domElement.addEventListener("mousedown",K,{passive:!1}),this.domElement.addEventListener("mousewheel",Z,{passive:!1}),this.domElement.addEventListener("DOMMouseScroll",Z,{passive:!1}),this.domElement.addEventListener("touchstart",ee,{passive:!1}),this.domElement.addEventListener("touchend",ne,{passive:!1}),this.domElement.addEventListener("touchmove",te,{passive:!1}),window.addEventListener("keyup",J,{passive:!1}),window.addEventListener("keydown",$,{passive:!1}),this.update()}function P(e,t){var n=this,r={type:"change"},a=0,o=0,s=0,l=0;this.camera=e,this.camera.rotation.reorder("YXZ"),this.domElement=void 0!==t?t:document,this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alpha=0,this.alphaOffsetAngle=0;var u=function(e){n.deviceOrientation=e},d=function(){n.screenOrientation=window.orientation||0},c=function(e){e.preventDefault(),e.stopPropagation(),s=e.touches[0].pageX,l=e.touches[0].pageY},f=function(e){e.preventDefault(),e.stopPropagation(),a+=i.o.degToRad((e.touches[0].pageX-s)/4),o+=i.o.degToRad((l-e.touches[0].pageY)/4),n.updateAlphaOffsetAngle(a),s=e.touches[0].pageX,l=e.touches[0].pageY};this.connect=function(){d(),window.addEventListener("orientationchange",d,{passive:!0}),window.addEventListener("deviceorientation",u,{passive:!0}),window.addEventListener("deviceorientation",this.update.bind(this),{passive:!0}),n.domElement.addEventListener("touchstart",c,{passive:!1}),n.domElement.addEventListener("touchmove",f,{passive:!1}),n.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",d,!1),window.removeEventListener("deviceorientation",u,!1),window.removeEventListener("deviceorientation",this.update.bind(this),!1),n.domElement.removeEventListener("touchstart",c,!1),n.domElement.removeEventListener("touchmove",f,!1),n.enabled=!1},this.update=function(e){if(!1!==n.enabled){var t=n.deviceOrientation.alpha?i.o.degToRad(n.deviceOrientation.alpha)+n.alphaOffsetAngle:0,a=n.deviceOrientation.beta?i.o.degToRad(n.deviceOrientation.beta):0,s=n.deviceOrientation.gamma?i.o.degToRad(n.deviceOrientation.gamma):0,l=n.screenOrientation?i.o.degToRad(n.screenOrientation):0;!function(e,t,r,a,s){var l,u=new i.L(0,0,1),d=new i.j,c=new i.x,f=new i.x(-Math.sqrt(.5),0,0,Math.sqrt(.5)),h=new i.x,p=new i.x;0==n.screenOrientation?(l=new i.L(1,0,0),h.setFromAxisAngle(l,-o)):180==n.screenOrientation?(l=new i.L(1,0,0),h.setFromAxisAngle(l,o)):90==n.screenOrientation?(l=new i.L(0,1,0),h.setFromAxisAngle(l,o)):-90==n.screenOrientation&&(l=new i.L(0,1,0),h.setFromAxisAngle(l,-o)),f.multiply(h),f.multiply(p),d.set(r,t,-a,"YXZ"),e.setFromEuler(d),e.multiply(f),e.multiply(c.setFromAxisAngle(u,-s))}(n.camera.quaternion,t,a,s,l),n.alpha=t,!0!==e&&n.dispatchEvent(r)}},this.updateAlphaOffsetAngle=function(e){this.alphaOffsetAngle=e,this.update()},this.dispose=function(){this.disconnect()},this.connect()}function N(e){var t=new i.u(-1,1,1,-1,0,1),n=new i.C,r=new i.I;r.aspect=.5;var a={minFilter:i.m,magFilter:i.s,format:i.z},o=new i.N(512,512,a);o.scissorTest=!0,o.texture.generateMipmaps=!1;var s=new i.K(.441,.156),l=new i.w(1,1,10,20).removeAttribute("normal").toNonIndexed(),u=l.attributes.position.array,d=l.attributes.uv.array;l.attributes.position.count*=2,l.attributes.uv.count*=2;var c=new Float32Array(2*u.length);c.set(u),c.set(u,u.length);var f=new Float32Array(2*d.length);f.set(d),f.set(d,d.length);for(var h=new i.K,p=u.length/3,m=0,g=c.length/3;m<g;m++){h.x=c[3*m+0],h.y=c[3*m+1];var v=h.dot(h),y=1.5+(s.x+s.y*v)*v,_=m<p?0:1;c[3*m+0]=h.x/y*1.5-.5+_,c[3*m+1]=h.y/y*3,f[2*m]=.5*(f[2*m]+_)}l.attributes.position.array=c,l.attributes.uv.array=f;var E=new i.r({map:o.texture}),b=new i.q(l,E);n.add(b),this.setSize=function(t,n){e.setSize(t,n);var i=e.getPixelRatio();o.setSize(t*i,n*i)},this.render=function(i,a){i.updateMatrixWorld(),null===a.parent&&a.updateMatrixWorld(),r.update(a);var s=o.width/2,l=o.height;e.autoClear&&e.clear(),o.scissor.set(0,0,s,l),o.viewport.set(0,0,s,l),e.setRenderTarget(o),e.render(i,r.cameraL),e.clearDepth(),o.scissor.set(s,0,s,l),o.viewport.set(s,0,s,l),e.setRenderTarget(o),e.render(i,r.cameraR),e.clearDepth(),e.setRenderTarget(null),e.render(n,t)}}I.prototype=Object.assign(Object.create(T.prototype),{constructor:I,add:function(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}e instanceof _&&(e.material.depthTest=!1),T.prototype.add.call(this,e)},createGeometry:function(e,t){return new i.w(e,e*t)},createMaterial:function(e){const t=Object.assign({},C),n=t.uniforms;return n.zoom.value=e,n.opacity.value=0,new i.E({uniforms:n,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,side:i.a,transparent:!0})},registerMouseEvents:function(){this.container.addEventListener("mousedown",this.onMouseDown.bind(this),{passive:!0}),this.container.addEventListener("mousemove",this.onMouseMove.bind(this),{passive:!0}),this.container.addEventListener("mouseup",this.onMouseUp.bind(this),{passive:!0}),this.container.addEventListener("touchstart",this.onMouseDown.bind(this),{passive:!0}),this.container.addEventListener("touchmove",this.onMouseMove.bind(this),{passive:!0}),this.container.addEventListener("touchend",this.onMouseUp.bind(this),{passive:!0}),this.container.addEventListener("mousewheel",this.onMouseWheel.bind(this),{passive:!1}),this.container.addEventListener("DOMMouseScroll",this.onMouseWheel.bind(this),{passive:!1}),this.container.addEventListener("contextmenu",this.onContextMenu.bind(this),{passive:!0})},unregisterMouseEvents:function(){this.container.removeEventListener("mousedown",this.onMouseDown.bind(this),!1),this.container.removeEventListener("mousemove",this.onMouseMove.bind(this),!1),this.container.removeEventListener("mouseup",this.onMouseUp.bind(this),!1),this.container.removeEventListener("touchstart",this.onMouseDown.bind(this),!1),this.container.removeEventListener("touchmove",this.onMouseMove.bind(this),!1),this.container.removeEventListener("touchend",this.onMouseUp.bind(this),!1),this.container.removeEventListener("mousewheel",this.onMouseWheel.bind(this),!1),this.container.removeEventListener("DOMMouseScroll",this.onMouseWheel.bind(this),!1),this.container.removeEventListener("contextmenu",this.onContextMenu.bind(this),!1)},onMouseDown:function(e){switch(e.touches&&e.touches.length||1){case 1:const t=e.clientX>=0?e.clientX:e.touches[0].clientX,n=e.clientY>=0?e.clientY:e.touches[0].clientY;this.dragging=!0,this.userMouse.set(t,n);break;case 2:const i=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(i*i+r*r);this.userMouse.pinchDistance=a}this.onUpdateCallback()},onMouseMove:function(e){switch(e.touches&&e.touches.length||1){case 1:const t=e.clientX>=0?e.clientX:e.touches[0].clientX,n=e.clientY>=0?e.clientY:e.touches[0].clientY,r=.4*i.o.degToRad(t-this.userMouse.x),a=.4*i.o.degToRad(n-this.userMouse.y);this.dragging&&(this.quatA.setFromAxisAngle(this.vectorY,r),this.quatB.setFromAxisAngle(this.vectorX,a),this.quatCur.multiply(this.quatA).multiply(this.quatB),this.userMouse.set(t,n));break;case 2:const o=e.touches[0].pageX-e.touches[1].pageX,s=e.touches[0].pageY-e.touches[1].pageY,l=Math.sqrt(o*o+s*s);this.addZoomDelta(this.userMouse.pinchDistance-l)}},onMouseUp:function(){this.dragging=!1},onMouseWheel:function(e){e.preventDefault(),e.stopPropagation();let t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),this.addZoomDelta(t),this.onUpdateCallback()},addZoomDelta:function(e){const t=this.material.uniforms,n=.1*this.size,i=10*this.size;t.zoom.value+=e,t.zoom.value<=n?t.zoom.value=n:t.zoom.value>=i&&(t.zoom.value=i)},onUpdateCallback:function(){this.frameId=window.requestAnimationFrame(this.onUpdateCallback.bind(this)),this.quatSlerp.slerp(this.quatCur,.1),this.material&&this.material.uniforms.transform.value.makeRotationFromQuaternion(this.quatSlerp),!this.dragging&&1-this.quatSlerp.clone().dot(this.quatCur)<this.EPS&&window.cancelAnimationFrame(this.frameId)},reset:function(){this.quatCur.set(0,0,0,1),this.quatSlerp.set(0,0,0,1),this.onUpdateCallback()},onLoad:function(e){this.material.uniforms.resolution.value=this.container.clientWidth/this.container.clientHeight,this.registerMouseEvents(),this.onUpdateCallback(),this.dispatchEvent({type:"panolens-viewer-handler",method:"disableControl"}),T.prototype.onLoad.call(this,e)},onLeave:function(){this.unregisterMouseEvents(),this.dispatchEvent({type:"panolens-viewer-handler",method:"enableControl",data:d.ORBIT}),window.cancelAnimationFrame(this.frameId),T.prototype.onLeave.call(this)},onWindowResize:function(){this.material.uniforms.resolution.value=this.container.clientWidth/this.container.clientHeight},onContextMenu:function(){this.dragging=!1},dispose:function(){this.unregisterMouseEvents(),T.prototype.dispose.call(this)}}),L.prototype=Object.assign(Object.create(I.prototype),{constructor:L,onLoad:function(e){this.updateTexture(e),I.prototype.onLoad.call(this,e)},updateTexture:function(e){e.minFilter=e.magFilter=i.m,this.material.uniforms.tDiffuse.value=e},dispose:function(){const e=this.material.uniforms.tDiffuse;e&&e.value&&e.value.dispose(),I.prototype.dispose.call(this)}}),O.prototype=Object.assign(Object.create(b.prototype),{constructor:O,onPanolensContainer:function({container:e}){this.media.setContainer(e)},onPanolensScene:function({scene:e}){this.media.setScene(e)},start:function(){return this.media.start()},stop:function(){this.media.stop()}}),D.prototype=Object.assign(Object.create(i.k.prototype),{constructor:D}),P.prototype=Object.assign(Object.create(i.k.prototype),{constructor:P});const k=function(e){var t=new i.I;t.aspect=.5;var n=new i.K;this.setEyeSeparation=function(e){t.eyeSep=e},this.setSize=function(t,n){e.setSize(t,n)},this.render=function(i,r){i.updateMatrixWorld(),null===r.parent&&r.updateMatrixWorld(),t.update(r),e.getSize(n),e.autoClear&&e.clear(),e.setScissorTest(!0),e.setScissor(0,0,n.width/2,n.height),e.setViewport(0,0,n.width/2,n.height),e.render(i,t.cameraL),e.setScissor(n.width/2,0,n.width/2,n.height),e.setViewport(n.width/2,0,n.width/2,n.height),e.render(i,t.cameraR),e.setScissorTest(!1)}};function F(e){let t;(e=e||{}).controlBar=void 0===e.controlBar||e.controlBar,e.controlButtons=e.controlButtons||["fullscreen","setting","video"],e.autoHideControlBar=void 0!==e.autoHideControlBar&&e.autoHideControlBar,e.autoHideInfospot=void 0===e.autoHideInfospot||e.autoHideInfospot,e.horizontalView=void 0!==e.horizontalView&&e.horizontalView,e.clickTolerance=e.clickTolerance||10,e.cameraFov=e.cameraFov||60,e.reverseDragging=e.reverseDragging||!1,e.enableReticle=e.enableReticle||!1,e.dwellTime=e.dwellTime||1500,e.autoReticleSelect=void 0===e.autoReticleSelect||e.autoReticleSelect,e.viewIndicator=void 0!==e.viewIndicator&&e.viewIndicator,e.indicatorSize=e.indicatorSize||30,e.output=e.output?e.output:"none",e.autoRotate=e.autoRotate||!1,e.autoRotateSpeed=e.autoRotateSpeed||2,e.autoRotateActivationDuration=e.autoRotateActivationDuration||5e3,this.options=e,e.container?(t=e.container,t._width=t.clientWidth,t._height=t.clientHeight):(t=document.createElement("div"),t.classList.add("panolens-container"),t.style.width="100%",t.style.height="100%",t._width=window.innerWidth,t._height=window.innerHeight,document.body.appendChild(t)),this.container=t,this.camera=e.camera||new i.v(this.options.cameraFov,this.container.clientWidth/this.container.clientHeight,1,1e4),this.scene=e.scene||new i.C,this.renderer=e.renderer||new i.O({alpha:!0,antialias:!1}),this.sceneReticle=new i.C,this.viewIndicatorSize=this.options.indicatorSize,this.reticle={},this.tempEnableReticle=this.options.enableReticle,this.mode=c.NORMAL,this.panorama=null,this.widget=null,this.hoverObject=null,this.infospot=null,this.pressEntityObject=null,this.pressObject=null,this.raycaster=new i.B,this.raycasterPoint=new i.K,this.userMouse=new i.K,this.updateCallbacks=[],this.requestAnimationId=null,this.cameraFrustum=new i.l,this.cameraViewProjectionMatrix=new i.p,this.autoRotateRequestId=null,this.outputDivElement=null,this.touchSupported="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,this.HANDLER_MOUSE_DOWN=this.onMouseDown.bind(this),this.HANDLER_MOUSE_UP=this.onMouseUp.bind(this),this.HANDLER_MOUSE_MOVE=this.onMouseMove.bind(this),this.HANDLER_WINDOW_RESIZE=this.onWindowResize.bind(this),this.HANDLER_KEY_DOWN=this.onKeyDown.bind(this),this.HANDLER_KEY_UP=this.onKeyUp.bind(this),this.HANDLER_TAP=this.onTap.bind(this,{clientX:this.container.clientWidth/2,clientY:this.container.clientHeight/2}),this.OUTPUT_INFOSPOT=!1,this.tweenLeftAnimation=new y.Tween,this.tweenUpAnimation=new y.Tween,this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.container.clientWidth,this.container.clientHeight),this.renderer.setClearColor(0,0),this.renderer.autoClear=!1,this.renderer.domElement.classList.add("panolens-canvas"),this.renderer.domElement.style.display="block",this.container.style.backgroundColor="#000",this.container.appendChild(this.renderer.domElement),this.OrbitControls=new D(this.camera,this.container),this.OrbitControls.id="orbit",this.OrbitControls.minDistance=1,this.OrbitControls.noPan=!0,this.OrbitControls.autoRotate=this.options.autoRotate,this.OrbitControls.autoRotateSpeed=this.options.autoRotateSpeed,this.DeviceOrientationControls=new P(this.camera,this.container),this.DeviceOrientationControls.id="device-orientation",this.DeviceOrientationControls.enabled=!1,this.camera.position.z=1,this.options.passiveRendering&&console.warn("passiveRendering is now deprecated"),this.controls=[this.OrbitControls,this.DeviceOrientationControls],this.control=this.OrbitControls,this.CardboardEffect=new N(this.renderer),this.CardboardEffect.setSize(this.container.clientWidth,this.container.clientHeight),this.StereoEffect=new k(this.renderer),this.StereoEffect.setSize(this.container.clientWidth,this.container.clientHeight),this.effect=this.CardboardEffect,this.addReticle(),this.options.horizontalView&&(this.OrbitControls.minPolarAngle=Math.PI/2,this.OrbitControls.maxPolarAngle=Math.PI/2),!1!==this.options.controlBar&&this.addDefaultControlBar(this.options.controlButtons),this.options.viewIndicator&&this.addViewIndicator(),this.options.reverseDragging&&this.reverseDraggingDirection(),this.options.enableReticle?this.enableReticleControl():this.registerMouseAndTouchEvents(),"overlay"===this.options.output&&this.addOutputElement(),this.registerEventListeners(),this.animate.call(this)}F.prototype=Object.assign(Object.create(i.k.prototype),{constructor:F,add:function(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}this.scene.add(e),e.addEventListener&&e.addEventListener("panolens-viewer-handler",this.eventHandler.bind(this)),e instanceof b&&e.dispatchEvent&&e.dispatchEvent({type:"panolens-container",container:this.container}),e instanceof O&&e.dispatchEvent({type:"panolens-scene",scene:this.scene}),"panorama"===e.type&&(this.addPanoramaEventListener(e),this.panorama||this.setPanorama(e))},remove:function(e){e.removeEventListener&&e.removeEventListener("panolens-viewer-handler",this.eventHandler.bind(this)),this.scene.remove(e)},addDefaultControlBar:function(e){if(this.widget)return void console.warn("Default control bar exists");const t=new E(this.container);t.addEventListener("panolens-viewer-handler",this.eventHandler.bind(this)),t.addControlBar(),e.forEach(e=>{t.addControlButton(e)}),this.widget=t},setPanorama:function(e){const t=this.panorama;if("panorama"===e.type&&t!==e){this.hideInfospot();const n=function(){t&&t.onLeave(),e.removeEventListener("enter-fade-start",n)};e.addEventListener("enter-fade-start",n),(this.panorama=e).onEnter()}},eventHandler:function(e){e.method&&this[e.method]&&this[e.method](e.data)},dispatchEventToChildren:function(e){this.scene.traverse(function(t){t.dispatchEvent&&t.dispatchEvent(e)})},activateWidgetItem:function(e,t){const n=this.widget.mainMenu,i=n.children[0],r=n.children[1];let a;if(void 0!==e){switch(e){case 0:default:a=i.subMenu.children[1];break;case 1:a=i.subMenu.children[2]}i.subMenu.setActiveItem(a),i.setSelectionTitle(a.textContent)}if(void 0!==t){switch(t){case c.CARDBOARD:a=r.subMenu.children[2];break;case c.STEREO:a=r.subMenu.children[3];break;default:a=r.subMenu.children[1]}r.subMenu.setActiveItem(a),r.setSelectionTitle(a.textContent)}},enableEffect:function(e){if(this.mode===e)return;if(e===c.NORMAL)return void this.disableEffect();this.mode=e;const t=this.camera.fov;switch(e){case c.CARDBOARD:this.effect=this.CardboardEffect,this.enableReticleControl();break;case c.STEREO:this.effect=this.StereoEffect,this.enableReticleControl();break;default:this.effect=null,this.disableReticleControl()}this.activateWidgetItem(void 0,this.mode),this.dispatchEventToChildren({type:"panolens-dual-eye-effect",mode:this.mode}),this.camera.fov=t+.01,this.effect.setSize(this.container.clientWidth,this.container.clientHeight),this.render(),this.camera.fov=t,this.dispatchEvent({type:"mode-change",mode:this.mode})},disableEffect:function(){this.mode!==c.NORMAL&&(this.mode=c.NORMAL,this.disableReticleControl(),this.activateWidgetItem(void 0,this.mode),this.dispatchEventToChildren({type:"panolens-dual-eye-effect",mode:this.mode}),this.renderer.setSize(this.container.clientWidth,this.container.clientHeight),this.render(),this.dispatchEvent({type:"mode-change",mode:this.mode}))},enableReticleControl:function(){this.reticle.visible||(this.tempEnableReticle=!0,this.unregisterMouseAndTouchEvents(),this.reticle.show(),this.registerReticleEvent(),this.updateReticleEvent())},disableReticleControl:function(){this.tempEnableReticle=!1,this.options.enableReticle?this.updateReticleEvent():(this.reticle.hide(),this.unregisterReticleEvent(),this.registerMouseAndTouchEvents())},enableAutoRate:function(){this.options.autoRotate=!0,this.OrbitControls.autoRotate=!0},disableAutoRate:function(){clearTimeout(this.autoRotateRequestId),this.options.autoRotate=!1,this.OrbitControls.autoRotate=!1},toggleVideoPlay:function(e){this.panorama instanceof x&&this.panorama.dispatchEvent({type:"video-toggle",pause:e})},setVideoCurrentTime:function(e){this.panorama instanceof x&&this.panorama.dispatchEvent({type:"video-time",percentage:e})},onVideoUpdate:function(e){const{widget:t}=this;t&&t.dispatchEvent({type:"video-update",percentage:e})},addUpdateCallback:function(e){e&&this.updateCallbacks.push(e)},removeUpdateCallback:function(e){const t=this.updateCallbacks.indexOf(e);e&&t>=0&&this.updateCallbacks.splice(t,1)},showVideoWidget:function(){const{widget:e}=this;e&&e.dispatchEvent({type:"video-control-show"})},hideVideoWidget:function(){const{widget:e}=this;e&&e.dispatchEvent({type:"video-control-hide"})},updateVideoPlayButton:function(e){const{widget:t}=this;t&&t.videoElement&&t.videoElement.controlButton&&t.videoElement.controlButton.update(e)},addPanoramaEventListener:function(e){e.addEventListener("enter-fade-start",this.setCameraControl.bind(this)),e instanceof x&&(e.addEventListener("enter-fade-start",this.showVideoWidget.bind(this)),e.addEventListener("leave",function(){this.panorama instanceof x||this.hideVideoWidget.call(this)}.bind(this)))},setCameraControl:function(){this.OrbitControls.target.copy(this.panorama.position)},getControl:function(){return this.control},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRenderer:function(){return this.renderer},getContainer:function(){return this.container},getControlId:function(){return this.control.id},getNextControlId:function(){return this.controls[this.getNextControlIndex()].id},getNextControlIndex:function(){const e=this.controls,t=this.control,n=e.indexOf(t)+1;return n>=e.length?0:n},setCameraFov:function(e){this.camera.fov=e,this.camera.updateProjectionMatrix()},enableControl:function(e){switch(e=e>=0&&e<this.controls.length?e:0,this.control.enabled=!1,this.control=this.controls[e],this.control.enabled=!0,e){case d.ORBIT:this.camera.position.copy(this.panorama.position),this.camera.position.z+=1;break;case d.DEVICEORIENTATION:this.camera.position.copy(this.panorama.position)}this.control.update(),this.activateWidgetItem(e,void 0)},disableControl:function(){this.control.enabled=!1},toggleNextControl:function(){this.enableControl(this.getNextControlIndex())},getScreenVector:function(e){const t=e.clone(),n=this.container.clientWidth/2,i=this.container.clientHeight/2;return t.project(this.camera),t.x=t.x*n+n,t.y=-t.y*i+i,t.z=0,t},checkSpriteInViewport:function(e){return this.camera.matrixWorldInverse.getInverse(this.camera.matrixWorld),this.cameraViewProjectionMatrix.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.cameraFrustum.setFromMatrix(this.cameraViewProjectionMatrix),e.visible&&this.cameraFrustum.intersectsSprite(e)},reverseDraggingDirection:function(){this.OrbitControls.rotateSpeed*=-1,this.OrbitControls.momentumScalingFactor*=-1},addReticle:function(){this.reticle=new v(16777215,!0,this.options.dwellTime),this.reticle.hide(),this.camera.add(this.reticle),this.sceneReticle.add(this.camera)},tweenControlCenter:function(e,t,n){if(this.control!==this.OrbitControls)return;let r,a,o,s,l,u,d,c,f,h;e instanceof Array&&(t=e[1],n=e[2],e=e[0]),t=void 0!==t?t:1e3,n=n||y.Easing.Exponential.Out,r=this,s=this.camera.getWorldDirection(new i.L),l=s.clone(),c=this.panorama.getWorldPosition(new i.L).sub(this.camera.getWorldPosition(new i.L)),u=e.clone(),u.x*=-1,u.add(c).normalize(),d=u.clone(),s.y=0,u.y=0,a=Math.atan2(u.z,u.x)-Math.atan2(s.z,s.x),a=a>Math.PI?a-2*Math.PI:a,a=a<-Math.PI?a+2*Math.PI:a,o=Math.abs(l.angleTo(s)+(l.y*d.y<=0?d.angleTo(u):-d.angleTo(u))),o*=d.y<l.y?1:-1,f={left:0,up:0},h={left:0,up:0},this.tweenLeftAnimation.stop(),this.tweenUpAnimation.stop(),this.tweenLeftAnimation=new y.Tween(f).to({left:a},t).easing(n).onUpdate(function(e){r.control.rotateLeft(e.left-h.left),h.left=e.left}).start(),this.tweenUpAnimation=new y.Tween(f).to({up:o},t).easing(n).onUpdate(function(e){r.control.rotateUp(e.up-h.up),h.up=e.up}).start()},tweenControlCenterByObject:function(e,t,n){let r=!1;if(e.traverseAncestors(function(e){e.scalePlaceHolder&&(r=!0)}),r){const r=new i.L(-1,1,1);this.tweenControlCenter(e.getWorldPosition(new i.L).multiply(r),t,n)}else this.tweenControlCenter(e.getWorldPosition(new i.L),t,n)},onWindowResize:function(e,t){let n,i;const r=this.container.classList.contains("panolens-container")||this.container.isFullscreen;if(void 0!==e&&void 0!==t)n=e,i=t,this.container._width=e,this.container._height=t;else{const e=/(android)/i.test(window.navigator.userAgent),t=e?Math.min(document.documentElement.clientWidth,window.innerWidth||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),a=e?Math.min(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientHeight,window.innerHeight||0);n=r?t:this.container.clientWidth,i=r?a:this.container.clientHeight,this.container._width=n,this.container._height=i}this.camera.aspect=n/i,this.camera.updateProjectionMatrix(),this.renderer.setSize(n,i),(this.options.enableReticle||this.tempEnableReticle)&&this.updateReticleEvent(),this.dispatchEvent({type:"window-resize",width:n,height:i}),this.scene.traverse(function(e){e.dispatchEvent&&e.dispatchEvent({type:"window-resize",width:n,height:i})})},addOutputElement:function(){const e=document.createElement("div");e.style.position="absolute",e.style.right="10px",e.style.top="10px",e.style.color="#fff",this.container.appendChild(e),this.outputDivElement=e},outputPosition:function(){const e=this.raycaster.intersectObject(this.panorama,!0);if(e.length>0){const t=e[0].point.clone(),n=new i.L(-1,1,1),r=this.panorama.getWorldPosition(new i.L);t.sub(r).multiply(n);const a=`${t.x.toFixed(2)}, ${t.y.toFixed(2)}, ${t.z.toFixed(2)}`;if(0===t.length())return;switch(this.options.output){case"console":console.info(a);break;case"overlay":this.outputDivElement.textContent=a}}},onMouseDown:function(e){e.preventDefault(),this.userMouse.x=e.clientX>=0?e.clientX:e.touches[0].clientX,this.userMouse.y=e.clientY>=0?e.clientY:e.touches[0].clientY,this.userMouse.type="mousedown",this.onTap(e)},onMouseMove:function(e){e.preventDefault(),this.userMouse.type="mousemove",this.onTap(e)},onMouseUp:function(e){let t=!1;this.userMouse.type="mouseup";const n=this.userMouse.x>=e.clientX-this.options.clickTolerance&&this.userMouse.x<=e.clientX+this.options.clickTolerance&&this.userMouse.y>=e.clientY-this.options.clickTolerance&&this.userMouse.y<=e.clientY+this.options.clickTolerance||e.changedTouches&&this.userMouse.x>=e.changedTouches[0].clientX-this.options.clickTolerance&&this.userMouse.x<=e.changedTouches[0].clientX+this.options.clickTolerance&&this.userMouse.y>=e.changedTouches[0].clientY-this.options.clickTolerance&&this.userMouse.y<=e.changedTouches[0].clientY+this.options.clickTolerance?"click":void 0;if((!e||!e.target||e.target.classList.contains("panolens-canvas"))&&(e.preventDefault(),t=e.changedTouches&&1===e.changedTouches.length?this.onTap({clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY},n):this.onTap(e,n),this.userMouse.type="none",!t&&"click"===n)){const{options:{autoHideInfospot:e,autoHideControlBar:t},panorama:n,toggleControlBar:i}=this;e&&n&&n.toggleInfospotVisibility(),t&&i()}},onTap:function(e,t){const{left:n,top:i}=this.container.getBoundingClientRect(),{clientWidth:r,clientHeight:a}=this.container;if(this.raycasterPoint.x=(e.clientX-n)/r*2-1,this.raycasterPoint.y=-(e.clientY-i)/a*2+1,this.raycaster.setFromCamera(this.raycasterPoint,this.camera),!this.panorama)return;("mousedown"!==e.type&&this.touchSupported||this.OUTPUT_INFOSPOT)&&this.outputPosition();const o=this.raycaster.intersectObjects(this.panorama.children,!0),s=this.getConvertedIntersect(o),l=o.length>0?o[0].object:void 0;if("mouseup"===this.userMouse.type&&(s&&this.pressEntityObject===s&&this.pressEntityObject.dispatchEvent&&this.pressEntityObject.dispatchEvent({type:"pressstop-entity",mouseEvent:e}),this.pressEntityObject=void 0),"mouseup"===this.userMouse.type&&(l&&this.pressObject===l&&this.pressObject.dispatchEvent&&this.pressObject.dispatchEvent({type:"pressstop",mouseEvent:e}),this.pressObject=void 0),"click"===t?(this.panorama.dispatchEvent({type:"click",intersects:o,mouseEvent:e}),s&&s.dispatchEvent&&s.dispatchEvent({type:"click-entity",mouseEvent:e}),l&&l.dispatchEvent&&l.dispatchEvent({type:"click",mouseEvent:e})):(this.panorama.dispatchEvent({type:"hover",intersects:o,mouseEvent:e}),(this.hoverObject&&o.length>0&&this.hoverObject!==s||this.hoverObject&&0===o.length)&&(this.hoverObject.dispatchEvent&&(this.hoverObject.dispatchEvent({type:"hoverleave",mouseEvent:e}),this.reticle.end()),this.hoverObject=void 0),s&&o.length>0&&(this.hoverObject!==s&&(this.hoverObject=s,this.hoverObject.dispatchEvent&&(this.hoverObject.dispatchEvent({type:"hoverenter",mouseEvent:e}),(this.options.autoReticleSelect&&this.options.enableReticle||this.tempEnableReticle)&&this.reticle.start(this.onTap.bind(this,e,"click")))),"mousedown"===this.userMouse.type&&this.pressEntityObject!=s&&(this.pressEntityObject=s,this.pressEntityObject.dispatchEvent&&this.pressEntityObject.dispatchEvent({type:"pressstart-entity",mouseEvent:e})),"mousedown"===this.userMouse.type&&this.pressObject!=l&&(this.pressObject=l,this.pressObject.dispatchEvent&&this.pressObject.dispatchEvent({type:"pressstart",mouseEvent:e})),("mousemove"===this.userMouse.type||this.options.enableReticle)&&(l&&l.dispatchEvent&&l.dispatchEvent({type:"hover",mouseEvent:e}),this.pressEntityObject&&this.pressEntityObject.dispatchEvent&&this.pressEntityObject.dispatchEvent({type:"pressmove-entity",mouseEvent:e}),this.pressObject&&this.pressObject.dispatchEvent&&this.pressObject.dispatchEvent({type:"pressmove",mouseEvent:e}))),!s&&this.pressEntityObject&&this.pressEntityObject.dispatchEvent&&(this.pressEntityObject.dispatchEvent({type:"pressstop-entity",mouseEvent:e}),this.pressEntityObject=void 0),!l&&this.pressObject&&this.pressObject.dispatchEvent&&(this.pressObject.dispatchEvent({type:"pressstop",mouseEvent:e}),this.pressObject=void 0)),l&&l instanceof _){if(this.infospot=l,"click"===t)return!0}else this.infospot&&this.hideInfospot();this.options.autoRotate&&"mousemove"!==this.userMouse.type&&(clearTimeout(this.autoRotateRequestId),this.control===this.OrbitControls&&(this.OrbitControls.autoRotate=!1,this.autoRotateRequestId=window.setTimeout(this.enableAutoRate.bind(this),this.options.autoRotateActivationDuration)))},getConvertedIntersect:function(e){let t;for(let n=0;n<e.length;n++)if(e[n].distance>=0&&e[n].object&&!e[n].object.passThrough){if(e[n].object.entity&&e[n].object.entity.passThrough)continue;if(e[n].object.entity&&!e[n].object.entity.passThrough){t=e[n].object.entity;break}t=e[n].object;break}return t},hideInfospot:function(){this.infospot&&(this.infospot.onHoverEnd(),this.infospot=void 0)},toggleControlBar:function(){const{widget:e}=this;e&&e.dispatchEvent({type:"control-bar-toggle"})},onKeyDown:function(e){this.options.output&&"none"!==this.options.output&&"Control"===e.key&&(this.OUTPUT_INFOSPOT=!0)},onKeyUp:function(){this.OUTPUT_INFOSPOT=!1},update:function(){y.update(),this.updateCallbacks.forEach(function(e){e()}),this.control.update(),this.scene.traverse(function(e){if(e instanceof _&&e.element&&(this.hoverObject===e||"none"!==e.element.style.display||e.element.left&&"none"!==e.element.left.style.display||e.element.right&&"none"!==e.element.right.style.display))if(this.checkSpriteInViewport(e)){const{x:t,y:n}=this.getScreenVector(e.getWorldPosition(new i.L));e.translateElement(t,n)}else e.onDismiss()}.bind(this))},render:function(){this.mode===c.CARDBOARD||this.mode===c.STEREO?(this.renderer.clear(),this.effect.render(this.scene,this.camera),this.effect.render(this.sceneReticle,this.camera)):(this.renderer.clear(),this.renderer.render(this.scene,this.camera),this.renderer.clearDepth(),this.renderer.render(this.sceneReticle,this.camera))},animate:function(){this.requestAnimationId=window.requestAnimationFrame(this.animate.bind(this)),this.onChange()},onChange:function(){this.update(),this.render()},registerMouseAndTouchEvents:function(){const e={passive:!1};this.container.addEventListener("mousedown",this.HANDLER_MOUSE_DOWN,e),this.container.addEventListener("mousemove",this.HANDLER_MOUSE_MOVE,e),this.container.addEventListener("mouseup",this.HANDLER_MOUSE_UP,e),this.container.addEventListener("touchstart",this.HANDLER_MOUSE_DOWN,e),this.container.addEventListener("touchend",this.HANDLER_MOUSE_UP,e)},unregisterMouseAndTouchEvents:function(){this.container.removeEventListener("mousedown",this.HANDLER_MOUSE_DOWN,!1),this.container.removeEventListener("mousemove",this.HANDLER_MOUSE_MOVE,!1),this.container.removeEventListener("mouseup",this.HANDLER_MOUSE_UP,!1),this.container.removeEventListener("touchstart",this.HANDLER_MOUSE_DOWN,!1),this.container.removeEventListener("touchend",this.HANDLER_MOUSE_UP,!1)},registerReticleEvent:function(){this.addUpdateCallback(this.HANDLER_TAP)},unregisterReticleEvent:function(){this.removeUpdateCallback(this.HANDLER_TAP)},updateReticleEvent:function(){const e=this.container.clientWidth/2+this.container.offsetLeft,t=this.container.clientHeight/2;this.removeUpdateCallback(this.HANDLER_TAP),this.HANDLER_TAP=this.onTap.bind(this,{clientX:e,clientY:t}),this.addUpdateCallback(this.HANDLER_TAP)},registerEventListeners:function(){window.addEventListener("resize",this.HANDLER_WINDOW_RESIZE,!0),window.addEventListener("keydown",this.HANDLER_KEY_DOWN,!0),window.addEventListener("keyup",this.HANDLER_KEY_UP,!0)},unregisterEventListeners:function(){window.removeEventListener("resize",this.HANDLER_WINDOW_RESIZE,!0),window.removeEventListener("keydown",this.HANDLER_KEY_DOWN,!0),window.removeEventListener("keyup",this.HANDLER_KEY_UP,!0)},dispose:function(){this.tweenLeftAnimation.stop(),this.tweenUpAnimation.stop(),this.unregisterEventListeners(),function e(t){for(let n=t.children.length-1;n>=0;n--)e(t.children[n]),t.remove(t.children[n]);t instanceof b||t instanceof _?(t.dispose(),t=null):t.dispatchEvent&&t.dispatchEvent("dispose")}(this.scene),this.widget&&(this.widget.dispose(),this.widget=null),i.e&&i.e.enabled&&i.e.clear()},destroy:function(){this.dispose(),this.render(),window.cancelAnimationFrame(this.requestAnimationId)},onPanoramaDispose:function(e){e instanceof x&&this.hideVideoWidget(),e===this.panorama&&(this.panorama=null)},loadAsyncRequest:function(e,t=()=>{}){const n=new window.XMLHttpRequest;n.onloadend=function(e){t(e)},n.open("GET",e,!0),n.send(null)},addViewIndicator:function(){const e=this;this.loadAsyncRequest(f.ViewIndicator,function(t){if(0===t.loaded)return;const n=t.target.responseXML.documentElement;n.style.width=e.viewIndicatorSize+"px",n.style.height=e.viewIndicatorSize+"px",n.style.position="absolute",n.style.top="10px",n.style.left="10px",n.style.opacity="0.5",n.style.cursor="pointer",n.id="panolens-view-indicator-container",e.container.appendChild(n);const r=n.querySelector("#indicator");e.addUpdateCallback(function(){e.radius=.225*e.viewIndicatorSize,e.currentPanoAngle=e.camera.rotation.y-i.o.degToRad(90),e.fovAngle=i.o.degToRad(e.camera.fov),e.leftAngle=-e.currentPanoAngle-e.fovAngle/2,e.rightAngle=-e.currentPanoAngle+e.fovAngle/2,e.leftX=e.radius*Math.cos(e.leftAngle),e.leftY=e.radius*Math.sin(e.leftAngle),e.rightX=e.radius*Math.cos(e.rightAngle),e.rightY=e.radius*Math.sin(e.rightAngle),e.indicatorD="M "+e.leftX+" "+e.leftY+" A "+e.radius+" "+e.radius+" 0 0 1 "+e.rightX+" "+e.rightY,e.leftX&&e.leftY&&e.rightX&&e.rightY&&e.radius&&r.setAttribute("d",e.indicatorD)}),n.addEventListener("mouseenter",function(){this.style.opacity="1"}),n.addEventListener("mouseleave",function(){this.style.opacity="0.5"})})},appendControlItem:function(e){const t=this.widget.createCustomItem(e);return"video"===e.group?this.widget.videoElement.appendChild(t):this.widget.barElement.appendChild(t),t},clearAllCache:function(){i.e.clear()}}),i.y!=l&&console.warn(`three.js version is not matched. Please consider use the target revision ${l}`),window.TWEEN=y}.call(this,n(16))},function(e,t,n){e.exports={WebVTT:n(105).WebVTT,VTTCue:n(106).VTTCue,VTTRegion:n(108).VTTRegion}},function(e,t,n){"use strict";n.r(t);var i=function(e,t){var n=/[\u0020\t\f]/,i=/[^\u0020\t\f]/,r=(e=e,0),a=function(e){t(e,r+1)};function o(t){for(;null!=e[r]&&t.test(e[r]);)r++}function s(t){for(var n="";null!=e[r]&&t.test(e[r]);)n+=e[r],r++;return n}function l(){var t,n,i,o,l="minutes";if(null!=e[r])if(/\d/.test(e[r]))if(((t=s(/\d/)).length>2||parseInt(t,10)>59)&&(l="hours"),":"==e[r])if(r++,2==(n=s(/\d/)).length){if("hours"==l||":"==e[r]){if(":"!=e[r])return void a("No seconds found or minutes is greater than 59.");if(r++,2!=(i=s(/\d/)).length)return void a("Must be exactly two digits.")}else i=n,n=t,t="0";if("."==e[r])if(r++,3==(o=s(/\d/)).length)if(parseInt(n,10)>59)a("You cannot have more than 59 minutes.");else{if(!(parseInt(i,10)>59))return 60*parseInt(t,10)*60+60*parseInt(n,10)+parseInt(i,10)+parseInt(o,10)/1e3;a("You cannot have more than 59 seconds.")}else a("Milliseconds must be given in three digits.");else a('No decimal separator (".") found.')}else a("Must be exactly two digits.");else a("No time unit separator found.");else a("Timestamp must start with a character in the range 0-9.");else a("No timestamp found.")}this.parse=function(t,s){if(o(n),t.startTime=l(),null!=t.startTime)if(t.startTime<s&&a("Start timestamp is not greater than or equal to start timestamp of previous cue."),i.test(e[r])&&a("Timestamp not separated from '--\x3e' by whitespace."),o(n),"-"==e[r])if(r++,"-"==e[r])if(r++,">"==e[r]){if(r++,i.test(e[r])&&a("'--\x3e' not separated from timestamp by whitespace."),o(n),t.endTime=l(),null!=t.endTime)return t.endTime<=t.startTime&&a("End timestamp is not greater than start timestamp."),i.test(e[r])&&!1,o(n),function(e,t){for(var i=e.split(n),r=[],o=0;o<i.length;o++)if(""!=i[o]){var s=i[o].indexOf(":"),l=i[o].slice(0,s);if(value=i[o].slice(s+1),-1!=r.indexOf(l)&&a("Duplicate setting."),r.push(l),""==value)return void a("No value for setting defined.");if("vertical"==l){if("rl"!=value&&"lr"!=value){a("Writing direction can only be set to 'rl' or 'rl'.");continue}t.direction=value}else if("line"==l){if(!/\d/.test(value)){a("Line position takes a number or percentage.");continue}if(-1!=value.indexOf("-",1)){a("Line position can only have '-' at the start.");continue}if(-1!=value.indexOf("%")&&value.indexOf("%")!=value.length-1){a("Line position can only have '%' at the end.");continue}if("-"==value[0]&&"%"==value[value.length-1]){a("Line position cannot be a negative percentage.");continue}if("%"==value[value.length-1]){if(parseInt(value,10)>100){a("Line position cannot be >100%.");continue}t.snapToLines=!1}t.linePosition=parseInt(value,10)}else if("position"==l){if("%"!=value[value.length-1]){a("Text position must be a percentage.");continue}if(parseInt(value,10)>100){a("Size cannot be >100%.");continue}t.textPosition=parseInt(value,10)}else if("size"==l){if("%"!=value[value.length-1]){a("Size must be a percentage.");continue}if(parseInt(value,10)>100){a("Size cannot be >100%.");continue}t.size=parseInt(value,10)}else if("align"==l){var u=["start","middle","end","left","right"];if(-1==u.indexOf(value)){a("Alignment can only be set to one of "+u.join(", ")+".");continue}t.alignment=value}else a("Invalid setting.")}}(e.substring(r),t),!0}else a("No valid timestamp separator found.");else a("No valid timestamp separator found.");else a("No valid timestamp separator found.")},this.parseTimestamp=function(){var t=l();if(null==e[r])return t;a("Timestamp must not have trailing characters.")}},r=function(e,t,n){var r=0,a=function(e){"metadata"!=n&&t(e,r+1)};function o(){for(var t="data",n="",i="",o=[];null!=e[r-1]||0==r;){var s=e[r];if("data"==t)if("&"==s)i=s,t="escape";else if("<"==s&&""==n)t="tag";else{if("<"==s||null==s)return["text",n];n+=s}else if("escape"==t)if("&"==s)a("Incorrect escape."),n+=i,i=s;else if(/[abglmnsprt]/.test(s))i+=s;else if(";
73"==s)"&amp"==i?n+="&":"&lt"==i?n+="<":"&gt"==i?n+=">":"&lrm"==i?n+="‎":"&rlm"==i?n+="‏":"&nbsp"==i?n+=" ":(a("Incorrect escape."),n+=i+";"),t="data";else{if("<"==s||null==s)return a("Incorrect escape."),["text",n+=i];a("Incorrect escape."),n+=i+s,t="data"}else if("tag"==t)if("\t"==s||"\n"==s||"\f"==s||" "==s)t="start tag annotation";else if("."==s)t="start tag class";else if("/"==s)t="end tag";else if(/\d/.test(s))n=s,t="timestamp tag";else{if(">"==s||null==s)return">"==s&&r++,["start tag","",[],""];n=s,t="start tag"}else if("start tag"==t)if("\t"==s||"\f"==s||" "==s)t="start tag annotation";else if("\n"==s)i=s,t="start tag annotation";else if("."==s)t="start tag class";else{if(">"==s||null==s)return">"==s&&r++,["start tag",n,[],""];n+=s}else if("start tag class"==t)if("\t"==s||"\f"==s||" "==s)o.push(i),i="",t="start tag annotation";else if("\n"==s)o.push(i),i=s,t="start tag annotation";else if("."==s)o.push(i),i="";else{if(">"==s||null==s)return">"==s&&r++,o.push(i),["start tag",n,o,""];i+=s}else if("start tag annotation"==t){if(">"==s||null==s)return">"==s&&r++,["start tag",n,o,i=i.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];i+=s}else if("end tag"==t){if(">"==s||null==s)return">"==s&&r++,["end tag",n];n+=s}else if("timestamp tag"==t){if(">"==s||null==s)return">"==s&&r++,["timestamp",n];n+=s}else a("Never happens.");r++}}this.parse=function(t,s){var l={children:[]},u=l,d=[];function c(e){u.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:u}),u=u.children[u.children.length-1]}function f(e){for(var t=u;t;){if(t.name==e)return!0;t=t.parent}}for(;null!=e[r];){var h=o();if("text"==h[0])u.children.push({type:"text",value:h[1],parent:u});else if("start tag"==h[0]){"chapters"==n&&a("Start tags not allowed in chapter title text.");var p=h[1];"v"!=p&&"lang"!=p&&""!=h[3]&&a("Only <v> and <lang> can have an annotation."),"c"==p||"i"==p||"b"==p||"u"==p||"ruby"==p||"rt"==p&&"ruby"==u.name?c(h):"v"==p?(f("v")&&a("<v> cannot be nested inside itself."),c(h),u.value=h[3],h[3]||a("<v> requires an annotation.")):"lang"==p?(c(h),u.value=h[3]):a("Incorrect start tag.")}else if("end tag"==h[0])"chapters"==n&&a("End tags not allowed in chapter title text."),h[1]==u.name?u=u.parent:"ruby"==h[1]&&"rt"==u.name?u=u.parent.parent:a("Incorrect end tag.");else if("timestamp"==h[0]){"chapters"==n&&a("Timestamp not allowed in chapter title text.");var m=new i(h[1],a).parseTimestamp();null!=m&&((m<=t||m>=s)&&a("Timestamp must be between start timestamp and end timestamp."),d.length>0&&d[d.length-1]>=m&&a("Timestamp must be greater than any previous timestamp."),u.children.push({type:"timestamp",value:m,parent:u}),d.push(m))}}for(;u.parent;)"v"!=u.name&&a("Required end tag missing."),u=u.parent;return l}};t.default=function(){this.parse=function(e,t){var n=Date.now(),a=0,o=e.split(/\r\n|\r|\n/),s=!1,l=[],u=[];function d(e,t){u.push({message:e,line:a+1,col:t})}var c=o[a],f=c.length,h="WEBVTT",p=0,m=6;for("\ufeff"===c[0]&&(p=1,m+=1),(f<m||c.indexOf(h)!==0+p||f>m&&" "!==c[m]&&"\t"!==c[m])&&d('No valid signature. (File needs to start with "WEBVTT".)'),a++;""!=o[a]&&null!=o[a];){if(d("No blank line after the signature."),-1!=o[a].indexOf("--\x3e")){s=!0;break}a++}for(;null!=o[a];){for(var g;!s&&""==o[a];)a++;if(!s&&null==o[a])break;g={id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",textPosition:50,size:100,alignment:"middle",text:"",tree:null};var v=!0;if(-1==o[a].indexOf("--\x3e")){if(g.id=o[a],/^NOTE($|[ \t])/.test(g.id)){for(a++;""!=o[a]&&null!=o[a];)-1!=o[a].indexOf("--\x3e")&&d("Cannot have timestamp in a comment."),a++;continue}if(""==o[++a]||null==o[a]){d("Cue identifier cannot be standalone.");continue}-1==o[a].indexOf("--\x3e")&&(v=!1,d("Cue identifier needs to be followed by timestamp."))}s=!1;var y=new i(o[a],d),_=0;if(l.length>0&&(_=l[l.length-1].startTime),!v||y.parse(g,_)){for(a++;""!=o[a]&&null!=o[a];){if(-1!=o[a].indexOf("--\x3e")){d("Blank line missing before cue."),s=!0;break}""!=g.text&&(g.text+="\n"),g.text+=o[a],a++}var E=new r(g.text,d,t);g.tree=E.parse(g.startTime,g.endTime),l.push(g)}else for(g=null,a++;""!=o[a]&&null!=o[a];){if(-1!=o[a].indexOf("--\x3e")){s=!0;break}a++}}return l.sort(function(e,t){return e.startTime<t.startTime?-1:e.startTime>t.startTime?1:e.endTime>t.endTime?-1:e.endTime<t.endTime?1:0}),{cues:l,errors:u,time:Date.now()-n}}}},function(e,t,n){"use strict";
73Object.defineProperty(t,"__esModule",{value:!0}),t.Debug=t.MediaPlayerFactory=t.MetricsReporting=t.Protection=t.MediaPlayer=void 0;var i=n(110),r=l(n(227)),a=l(n(246)),o=l(n(261)),s=l(n(3));function l(e){return e&&e.__esModule?e:{default:e}}dashjs.Protection=a.default,dashjs.MetricsReporting=r.default,dashjs.MediaPlayerFactory=o.default,dashjs.Debug=s.default,t.default=dashjs,t.MediaPlayer=i.MediaPlayer,t.Protection=a.default,t.MetricsReporting=r.default,t.MediaPlayerFactory=o.default,t.Debug=s.default},function(e,t,n){var i;"undefined"!=typeof window&&(i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({
vendor: 3,049 bytes, lines 73-78
73"./node_modules/eventemitter3/index.js":
74/*!*********************************************!*\
75  !*** ./node_modules/eventemitter3/index.js ***!
76  \*********************************************/
77/*! no static exports found */
78/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty,r="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0===--e._eventsCount?e._events=new a:delete e._events[t]}function u(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(r=!1)),u.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)i.call(e,t)&&n.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},u.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o},u.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},u.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var l,u,d=this._events[s],c=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),c){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,i),!0;case 5:return d.fn.call(d.context,t,n,i,a),!0;case 6:return d.fn.call(d.context,t,n,i,a,o),!0}for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var f,h=d.length;for(u=0;u<h;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),c){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,n);break;case 4:d[u].fn.call(d[u].context,t,n,i);break;default:if(!l)for(f=1,l=new Array(c-1);f<c;f++)l[f-1]=arguments[f];d[u].fn.apply(d[u].context,l)}}return!0},u.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},u.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},u.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,u=[],d=o.length;s<d;s++)(o[s].fn!==t||i&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[a]=1===u.length?u[0]:u:l(this,a)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u},
vendor: 1,977 bytes, lines 78-83
78"./node_modules/url-toolkit/src/url-toolkit.js":
79/*!*****************************************************!*\
80  !*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
81  \*****************************************************/
82/*! no static exports found */
83/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var i,r,a,o,s;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=s.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=s.normalizePath(i.path),s.buildURLFromParts(i)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=r.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var d=o.path,c=d.substring(0,d.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(c)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},
vendor: 2,940 bytes, lines 83-88
83"./node_modules/webworkify-webpack/index.js":
84/*!**************************************************!*\
85  !*** ./node_modules/webworkify-webpack/index.js ***!
86  \**************************************************/
87/*! no static exports found */
88/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){function i(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var i=n(n.s=ENTRY_MODULE);return i.default||i}var r="[\\.|\\-|\\+|\\w|/|@]+",a="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+r+").*?\\)";function o(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(e){return!isNaN(1*e)}function l(e,t,i){var l={};l[i]=[];var u=t.toString(),d=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return l;for(var c,f=d[1],h=new RegExp("(\\\\n|\\W)"+o(f)+a,"g");c=h.exec(u);)"dll-reference"!==c[3]&&l[i].push(c[3]);for(h=new RegExp("\\("+o(f)+'\\("(dll-reference\\s('+r+'))"\\)\\)'+a,"g");c=h.exec(u);)e[c[2]]||(l[i].push(c[1]),e[c[2]]=n(c[1]).m),l[c[2]]=l[c[2]]||[],l[c[2]].push(c[4]);for(var p=Object.keys(l),m=0;m<p.length;m++)for(var g=0;g<l[p[m]].length;g++)s(l[p[m]][g])&&(l[p[m]][g]=1*l[p[m]][g]);return l}function u(e){return Object.keys(e).reduce(function(t,n){return t||e[n].length>0},!1)}e.exports=function(e,t){t=t||{};var r={main:n.m},a=t.all?{main:Object.keys(r.main)}:function(e,t){for(var n={main:[t]},i={main:[]},r={main:{}};u(n);)for(var a=Object.keys(n),o=0;o<a.length;o++){var s=a[o],d=n[s].pop();if(r[s]=r[s]||{},!r[s][d]&&e[s][d]){r[s][d]=!0,i[s]=i[s]||[],i[s].push(d);for(var c=l(e,e[s][d],s),f=Object.keys(c),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(c[f[h]])}}return i}(r,e),o="";Object.keys(a).filter(function(e){return"main"!==e}).forEach(function(e){for(var t=0;a[e][t];)t++;a[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+e+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+a[e].map(function(t){return JSON.stringify(t)+": "+r[e][t].toString()}).join(",")+"});\n"}),o=o+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+a.main.map(function(e){return JSON.stringify(e)+": "+r.main[e].toString()}).join(",")+"}))(self);";var s=new window.Blob([o],{type:"text/javascript"});if(t.bare)return s;var d=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(s),c=new window.Worker(d);return c.objectURL=d,c}},
vendor: 18,475 bytes, lines 88-108
88"./src/crypt/decrypter.js":
89/*!********************************************!*\
90  !*** ./src/crypt/decrypter.js + 3 modules ***!
91  \********************************************/
92/*! exports provided: default */
93/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
94/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
95/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
96/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var i=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),r=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),a=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),i=0;i<4;i++)n[i]=t.getUint32(4*i);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,i=n[0],r=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],c=s[3],f=new Uint32Array(256),h=0,p=0,m=0;for(m=0;m<256;m++)f[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[h]=g,t[g]=h;var v=f[h],y=f[v],_=f[y],E=257*f[g]^16843008*g;i[h]=E<<24|E>>>8,r[h]=E<<16|E>>>16,a[h]=E<<8|E>>>24,o[h]=E,E=16843009*_^65537*y^257*v^16843008*h,l[g]=E<<24|E>>>8,u[g]=E<<16|E>>>16,d[g]=E<<8|E>>>24,c[g]=E,h?(h=v^f[f[f[_^v]]],p^=f[f[p]]):h=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,i=0;i<t.length&&n;)n=t[i]===this.key[i],i++;if(!n){this.key=t;var r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);var a,o,s,l,u=this.ksRows=4*(r+6+1),d=this.keySchedule=new Uint32Array(u),c=this.invKeySchedule=new Uint32Array(u),f=this.sBox,h=this.rcon,p=this.invSubMix,m=p[0],g=p[1],v=p[2],y=p[3];for(a=0;a<u;a++)a<r?s=d[a]=t[a]:(l=s,a%r===0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=h[a/r|0]<<24):r>6&&a%r===4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),d[a]=s=(d[a-r]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?d[a]:d[a-4],c[o]=o<4||a<=4?l:m[f[l>>>24]]^g[f[l>>>16&255]]^v[f[l>>>8&255]]^y[f[255&l]],c[o]=c[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n,i){for(var r,a,o,s,l,u,d,c,f,h,p,m,g,v,y,_,E,b=this.keySize+6,T=this.invKeySchedule,w=this.invSBox,A=this.invSubMix,S=A[0],x=A[1],M=A[2],R=A[3],C=this.uint8ArrayToUint32Array_(n),I=C[0],L=C[1],O=C[2],D=C[3],P=new Int32Array(e),N=new Int32Array(P.length),k=this.networkToHostOrderSwap;t<P.length;){for(f=k(P[t]),h=k(P[t+1]),p=k(P[t+2]),m=k(P[t+3]),l=f^T[0],u=m^T[1],d=p^T[2],c=h^T[3],g=4,v=1;v<b;v++)r=S[l>>>24]^x[u>>16&255]^M[d>>8&255]^R[255&c]^T[g],a=S[u>>>24]^x[d>>16&255]^M[c>>8&255]^R[255&l]^T[g+1],o=S[d>>>24]^x[c>>16&255]^M[l>>8&255]^R[255&u]^T[g+2],s=S[c>>>24]^x[l>>16&255]^M[u>>8&255]^R[255&d]^T[g+3],l=r,u=a,d=o,c=s,g+=4;r=w[l>>>24]<<24^w[u>>16&255]<<16^w[d>>8&255]<<8^w[255&c]^T[g],a=w[u>>>24]<<24^w[d>>16&255]<<16^w[c>>8&255]<<8^w[255&l]^T[g+1],o=w[d>>>24]<<24^w[c>>16&255]<<16^w[l>>8&255]<<8^w[255&u]^T[g+2],s=w[c>>>24]<<24^w[l>>16&255]<<16^w[u>>8&255]<<8^w[255&d]^T[g+3],g+=3,N[t]=k(r^I),N[t+1]=k(s^L),N[t+2]=k(o^O),N[t+3]=k(a^D),I=f,L=h,O=p,D=m,t+=4}return i?(y=N.buffer,_=y.byteLength,(E=_&&new DataView(y).getUint8(_-1))?y.slice(0,_-E):y):N.buffer},t.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),o=n("./src/errors.ts"),s=n("./src/utils/logger.js"),l=n("./src/events.js"),u=n("./src/utils/get-self-scope.js"),d=Object(u.getSelfScope)(),c=function(){function e(e,t,n){var i=(void 0===n?{}:n).removePKCS7Padding,r=void 0===i||i;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=r,r)try{var a=d.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}var t=e.prototype;return t.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.decrypt=function(e,t,n,o){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(s.logger.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new a),u.expandKey(t),o(u.decrypt(e,0,n,this.removePKCS7Padding))}else{this.logEnabled&&(s.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var d=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new r(d,t)),this.fastAesKey.expandKey().then(function(r){new i(d,n).decrypt(e,r).catch(function(i){l.onWebCryptoError(i,e,t,n,o)}).then(function(e){o(e)})}).catch(function(i){l.onWebCryptoError(i,e,t,n,o)})}},t.onWebCryptoError=function(e,t,n,i,r){this.config.enableSoftwareAES?(s.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,i,r)):(s.logger.error("decrypting error : "+e.message),this.observer.trigger(l.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},t.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.default=c},"./src/demux/demuxer-inline.js":
97/*!**************************************************!*\
98  !*** ./src/demux/demuxer-inline.js + 12 modules ***!
99  \**************************************************/
100/*! exports provided: default */
101/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/hls.ts */
102/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/hls.ts */
103/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/hls.ts */
104/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
105/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
106/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/hls.ts */
107/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
108/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var i=n("./src/events.js"),r=n("./src/errors.ts"),a=n("./src/crypt/decrypter.js"),o=n("./src/polyfills/number-isFinite.js"),s=n("./src/utils/logger.js"),l=n("./src/utils/get-self-scope.js");function u(e,t){return 255===e[t]&&240==(246&e[t+1])}function d(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function f(e,t){return!!(t+1<e.length&&u(e,t))}function h(e,t){if(f(e,t)){var n=d(e,t);t+5<e.length&&(n=c(e,t));var i=t+n;if(i===e.length||i+1<e.length&&u(e,i))return!0}return!1}function p(e,t,n,a,o){if(!e.samplerate){var l=function(e,t,n,a){var o,l,u,d,c,f=navigator.userAgent.toLowerCase(),h=a,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(o=((192&t[n+2])>>>6)+1,!((l=(60&t[n+2])>>>2)>p.length-1))return d=(1&t[n+2])<<2,d|=(192&t[n+3])>>>6,s.logger.log("manifest codec:"+a+",ADTS data:type:"+o+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+d),/firefox/i.test(f)?l>=6?(o=5,c=new Array(4),u=l-3):(o=2,c=new Array(2),u=l):-1!==f.indexOf("android")?(o=2,c=new Array(2),u=l):(o=5,c=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&l>=6?u=l-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(l>=6&&1===d||/vivaldi/i.test(f))||!a&&1===d)&&(o=2,c=new Array(2)),u=l)),c[0]=o<<3,c[0]|=(14&l)>>1,c[1]|=(1&l)<<7,c[1]|=d<<3,5===o&&(c[1]|=(14&u)>>1,c[2]=(1&u)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:p[l],channelCount:d,codec:"mp4a.40."+o,manifestCodec:h};e.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(t,n,a,o);e.config=l.config,e.samplerate=l.samplerate,e.channelCount=l.channelCount,e.codec=l.codec,e.manifestCodec=l.manifestCodec,s.logger.log("parsed codec:"+e.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,i,r){var a=function(e,t,n,i,r){var a,o,s=e.length;if(a=d(e,t),o=c(e,t),(o-=a)>0&&t+a+o<=s)return{headerLength:a,frameLength:o,stamp:n+i*r}}(t,n,i,r,m(e.samplerate));if(a){var o=a.stamp,s=a.headerLength,l=a.frameLength,u={unit:t.subarray(n+s,n+s+l),pts:o,dts:o};return e.samples.push(u),{sample:u,length:l+s}}}var v=n("./src/demux/id3.js"),y=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(v.default.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(h(e,t))return s.logger.log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,n,i){for(var r=this._audioTrack,a=v.default.getID3Data(e,0)||[],l=v.default.getTimeStamp(a),u=Object(o.isFiniteNumber)(l)?90*l:9e4*t,d=0,c=u,h=e.length,m=a.length,y=[{pts:c,dts:c,data:a}];m<h-1;)if(f(e,m)&&m+5<h){p(r,this.observer,e,m,r.manifestCodec);var _=g(r,e,m,u,d);if(!_){s.logger.log("Unable to parse AAC frame");break}m+=_.length,c=_.sample.pts,d++}else v.default.isHeader(e,m)?(a=v.default.getID3Data(e,m),y.push({pts:c,dts:c,data:a}),m+=a.length):m++;this.remuxer.remux(r,{samples:[]},{samples:y,inputTimeScale:9e4},{samples:[]},t,n,i)},t.destroy=function(){},e}(),_=n("./src/demux/mp4demuxer.js"),E={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,n,i,r){if(!(n+24>t.length)){var a=this.parseHeader(t,n);if(a&&n+a.frameLength<=t.length){var o=i+r*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3,o=e[t+2]>>1&1;if(1!==n&&0!==r&&15!==r&&3!==a){var s=3===n?3-i:3===i?3:4,l=1e3*E.BitratesMap[14*s+r-1],u=3===n?0:2===n?1:2,d=E.SamplingRateMap[3*u+a],c=e[t+3]>>6==3?1:2,f=E.SamplesCoefficients[n][i],h=E.BytesInSlot[i],p=8*f*h;return{sampleRate:d,channelCount:c,frameLength:parseInt(f*l/d+o,10)*h,samplesPerFrame:p}}},isHeaderPattern:function(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var n=this.parseHeader(e,t),i=4;n&&n.frameLength&&(i=n.frameLength);var r=t+i;if(r===e.length||r+1<e.length&&this.isHeaderPattern(e,r))return!0}return!1}},b=E,T=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,i=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");i.set(e.subarray(n,n+r)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&s.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){var t,n=8,i=8;for(t=0;t<e;t++)0!==i&&(i=(n+this.readEG()+256)%256),n=0===i?n:i},t.readSPS=function(){var e,t,n,i,r,a,o,s=0,l=0,u=0,d=0,c=this.readUByte.bind(this),f=this.readBits.bind(this),h=this.readUEG.bind(this),p=this.readBoolean.bind(this),m=this.skipBits.bind(this),g=this.skipEG.bind(this),v=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(c(),e=c(),f(5),m(3),c(),v(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var _=h();if(3===_&&m(1),v(),v(),m(1),p())for(a=3!==_?8:12,o=0;o<a;o++)p()&&y(o<6?16:64)}v();var E=h();if(0===E)h();else if(1===E)for(m(1),g(),g(),t=h(),o=0;o<t;o++)g();v(),m(1),n=h(),i=h(),0===(r=f(1))&&m(1),m(1),p()&&(s=h(),l=h(),u=h(),d=h());var b=[1,1];if(p()&&p())switch(c()){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[c()<<8|c(),c()<<8|c()]}return{width:Math.ceil(16*(n+1)-2*s-2*l),height:(2-r)*(i+1)*16-(r?2:4)*(u+d),pixelRatio:b}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),w=function(){function e(e,t,n,i){this.decryptdata=n,this.discardEPB=i,this.decrypter=new a.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},t.decryptAacSample=function(e,t,n,i){var r=e[t].unit,a=r.subarray(16,r.length-r.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,function(a){a=new Uint8Array(a),r.set(a,16),i||s.decryptAacSamples(e,t+1,n)})},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,i),!i)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),i=0,r=32;r<=e.length-16;r+=160,i+=16)n.set(e.subarray(r,r+16),i);return n},t.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var n=0,i=32;i<=e.length-16;i+=160,n+=16)e.set(t.subarray(n,n+16),i);return e},t.decryptAvcSample=function(e,t,n,i,r,a){var o=this.discardEPB(r.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){r.data=l.getAvcDecryptedUnit(o,s),a||l.decryptAvcSamples(e,t,n+1,i)})},t.decryptAvcSamples=function(e,t,n,i){for(;;t++,n=0){if(t>=e.length)return void i();for(var r=e[t].units;!(n>=r.length);n++){var a=r[n];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,i,a,o),!o)return}}}},e}(),A={video:1,audio:2,id3:3,text:4},S=function(){function e(e,t,n,i){this.observer=e,this.config=n,this.typeSupported=i,this.remuxer=t,this.sampleAes=null}var t=e.prototype;return t.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new w(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0||(n&&s.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:A[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},t.resetInitSegment=function(t,n,i,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",r),this._audioTrack=e.createTrack("audio",r),this._id3Track=e.createTrack("id3",r),this._txtTrack=e.createTrack("text",r),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=n,this.videoCodec=i,this._duration=r},t.resetTimeStamp=function(){},t.append=function(t,n,a,o){var l,u,d,c,f,h=t.length,p=!1;this.contiguous=a;var m=this.pmtParsed,g=this._avcTrack,v=this._audioTrack,y=this._id3Track,_=g.pid,E=v.pid,b=y.pid,T=this._pmtId,w=g.pesData,A=v.pesData,S=y.pesData,x=this._parsePAT,M=this._parsePMT,R=this._parsePES,C=this._parseAVCPES.bind(this),I=this._parseAACPES.bind(this),L=this._parseMPEGPES.bind(this),O=this._parseID3PES.bind(this),D=e._syncOffset(t);for(h-=(h+D)%188,l=D;l<h;l+=188)if(71===t[l]){if(u=!!(64&t[l+1]),d=((31&t[l+1])<<8)+t[l+2],(48&t[l+3])>>4>1){if((c=l+5+t[l+4])===l+188)continue}else c=l+4;switch(d){case _:u&&(w&&(f=R(w))&&C(f,!1),w={data:[],size:0}),w&&(w.data.push(t.subarray(c,l+188)),w.size+=l+188-c);break;case E:u&&(A&&(f=R(A))&&(v.isAAC?I(f):L(f)),A={data:[],size:0}),A&&(A.data.push(t.subarray(c,l+188)),A.size+=l+188-c);break;case b:u&&(S&&(f=R(S))&&O(f),S={data:[],size:0}),S&&(S.data.push(t.subarray(c,l+188)),S.size+=l+188-c);break;case 0:u&&(c+=t[c]+1),T=this._pmtId=x(t,c);break;case T:u&&(c+=t[c]+1);
vendor: 3,038 bytes, line 108
108var P=M(t,c,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(_=P.avc)>0&&(g.pid=_),(E=P.audio)>0&&(v.pid=E,v.isAAC=P.isAAC),(b=P.id3)>0&&(y.pid=b),p&&!m&&(s.logger.log("reparse from beginning"),p=!1,l=D-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});w&&(f=R(w))?(C(f,!0),g.pesData=null):g.pesData=w,A&&(f=R(A))?(v.isAAC?I(f):L(f),v.pesData=null):(A&&A.size&&s.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=A),S&&(f=R(S))?(O(f),y.pesData=null):y.pesData=S,null==this.sampleAes?this.remuxer.remux(v,g,y,this._txtTrack,n,a,o):this.decryptAndRemux(v,g,y,this._txtTrack,n,a,o)},t.decryptAndRemux=function(e,t,n,i,r,a,o){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,function(){s.decryptAndRemuxAvc(e,t,n,i,r,a,o)})}else this.decryptAndRemuxAvc(e,t,n,i,r,a,o)},t.decryptAndRemuxAvc=function(e,t,n,i,r,a,o){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,function(){s.remuxer.remux(e,t,n,i,r,a,o)})}else this.remuxer.remux(e,t,n,i,r,a,o)},t.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},t._parsePMT=function(e,t,n,i){var r,a,o={audio:-1,avc:-1,id3:-1,isAAC:!0};for(r=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t<r;){switch(a=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!i){s.logger.log("unknown stream type:"+e[t]);break}case 15:-1===o.audio&&(o.audio=a);break;case 21:-1===o.id3&&(o.id3=a);break;case 219:if(!i){s.logger.log("unknown stream type:"+e[t]);break}case 27:-1===o.avc&&(o.avc=a);break;case 3:case 4:n?-1===o.audio&&(o.audio=a,o.isAAC=!1):s.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:s.logger.warn("HEVC stream type found, not supported for now");break;default:s.logger.log("unknown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return o},t._parsePES=function(e){var t,n,i,r,a,o,l,u,d=0,c=e.data;if(!e||0===e.size)return null;for(;c[0].length<19&&c.length>1;){var f=new Uint8Array(c[0].length+c[1].length);f.set(c[0]),f.set(c[1],c[0].length),c[0]=f,c.splice(1,1)}if(1===((t=c[0])[0]<<16)+(t[1]<<8)+t[2]){if((i=(t[4]<<8)+t[5])&&i>e.size-6)return null;if(192&(n=t[7])&&((o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(o-=8589934592),64&n?((l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(l-=8589934592),o-l>54e5&&(s.logger.warn(Math.round((o-l)/9e4)+"s delta between PTS and DTS, align them"),o=l)):l=o),u=(r=t[8])+9,e.size<=u)return null;e.size-=u,a=new Uint8Array(e.size);for(var h=0,p=c.length;h<p;h++){var m=(t=c[h]).byteLength;if(u){if(u>m){u-=m;continue}t=t.subarray(u),m-=u,u=0}a.set(t,d),d+=m}return i&&(i-=r+3),{data:a,pts:o,dts:l,len:i}}return null}
vendor: 10,585 bytes, line 108
108,t.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var n=t.samples,i=n.length;if(isNaN(e.pts)){if(!i)return void t.dropped++;var r=n[i-1];e.pts=r.pts,e.dts=r.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(i||this.contiguous)?(e.id=i,n.push(e)):t.dropped++}e.debug.length&&s.logger.log(e.pts+"/"+e.dts+":"+e.debug)},t._parseAVCPES=function(e,t){var n,i,r,a=this,o=this._avcTrack,s=this._parseAVCNALu(e.data),l=this.avcSample,u=!1,d=this.pushAccesUnit.bind(this),c=function(e,t,n,i){return{key:e,pts:t,dts:n,units:[],debug:i}};e.data=null,l&&s.length&&!o.audFound&&(d(l,o),l=this.avcSample=c(!1,e.pts,e.dts,"")),s.forEach(function(t){switch(t.type){case 1:i=!0,l||(l=a.avcSample=c(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(u&&s.length>4){var f=new T(s).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(l.key=!0)}break;case 5:i=!0,l||(l=a.avcSample=c(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0,(n=new T(a.discardEPB(t.data))).readUByte();for(var h=0,p=0,m=!1,g=0;!m&&n.bytesAvailable>1;){h=0;do{h+=g=n.readUByte()}while(255===g);p=0;do{p+=g=n.readUByte()}while(255===g);if(4===h&&0!==n.bytesAvailable){if(m=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var y=n.readUByte(),_=31&y,E=[y,n.readUByte()];for(r=0;r<_;r++)E.push(n.readUByte()),E.push(n.readUByte()),E.push(n.readUByte());a._insertSampleInOrder(a._txtTrack.samples,{type:3,pts:e.pts,bytes:E})}}else if(5===h&&0!==n.bytesAvailable){if(m=!0,p>16){var b=[];for(r=0;r<16;r++)b.push(n.readUByte().toString(16)),3!==r&&5!==r&&7!==r&&9!==r||b.push("-");var w=p-16,A=new Uint8Array(w);for(r=0;r<w;r++)A[r]=n.readUByte();a._insertSampleInOrder(a._txtTrack.samples,{pts:e.pts,payloadType:h,uuid:b.join(""),userDataBytes:A,userData:Object(v.utf8ArrayToStr)(A.buffer)})}}else if(p<n.bytesAvailable)for(r=0;r<p;r++)n.readUByte()}break;case 7:if(i=!0,u=!0,!o.sps){var S=(n=new T(t.data)).readSPS();o.width=S.width,o.height=S.height,o.pixelRatio=S.pixelRatio,o.sps=[t.data],o.duration=a._duration;var x=t.data.subarray(1,4),M="avc1.";for(r=0;r<3;r++){var R=x[r].toString(16);R.length<2&&(R="0"+R),M+=R}o.codec=M}break;case 8:i=!0,o.pps||(o.pps=[t.data]);break;case 9:i=!1,o.audFound=!0,l&&d(l,o),l=a.avcSample=c(!1,e.pts,e.dts,"");break;case 12:i=!1;break;default:i=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&i&&l.units.push(t)}),t&&l&&(d(l,o),this.avcSample=null)},t._insertSampleInOrder=function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var i=n-1;i>=0;i--)if(t.pts<e[i].pts){e.splice(i,0,t);break}}else e.push(t)},t._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var n=this._avcTrack.samples;t=n[n.length-1]}if(t){var i=t.units;e=i[i.length-1]}return e},t._parseAVCNALu=function(e){var t,n,i,r,a=0,o=e.byteLength,s=this._avcTrack,l=s.naluState||0,u=l,d=[],c=-1;for(-1===l&&(c=0,r=31&e[0],l=0,a=1);a<o;)if(t=e[a++],l)if(1!==l)if(t)if(1===t){if(c>=0)i={data:e.subarray(c,a-l-1),type:r},d.push(i);else{var f=this._getLastNalUnit();if(f&&(u&&a<=4-u&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-u)),(n=a-l-1)>0)){var h=new Uint8Array(f.data.byteLength+n);h.set(f.data,0),h.set(e.subarray(0,n),f.data.byteLength),f.data=h}}a<o?(c=a,r=31&e[a],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;if(c>=0&&l>=0&&(i={data:e.subarray(c,o),type:r,state:l},d.push(i)),0===d.length){var p=this._getLastNalUnit();if(p){var m=new Uint8Array(p.data.byteLength+e.byteLength);m.set(p.data,0),m.set(e,p.data.byteLength),p.data=m}}return s.naluState=l,d},t.discardEPB=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===r[0]&&(o++,r.shift()),n[a]=e[o];return n},t._parseAACPES=function(e){var t,n,a,o,l,u,d,c=this._audioTrack,h=e.data,v=e.pts,y=this.aacOverFlow,_=this.aacLastPTS;if(y){var E=new Uint8Array(y.byteLength+h.byteLength);E.set(y,0),E.set(h,y.byteLength),h=E}for(a=0,l=h.length;a<l-1&&!f(h,a);a++);if(!a||(a<l-1?(u="AAC PES did not start with ADTS header,offset:"+a,d=!1):(u="no ADTS header found in AAC PES",d=!0),s.logger.warn("parsing error:"+u),this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:d,reason:u}),!d)){if(p(c,this.observer,h,a,this.audioCodec),n=0,t=m(c.samplerate),y&&_){var b=_+t;Math.abs(b-v)>1&&(s.logger.log("AAC: align PTS for overlapping frames by "+Math.round((b-v)/90)),v=b)}for(;a<l;){if(f(h,a)){if(a+5<l){var T=g(c,h,a,v,n);if(T){a+=T.length,o=T.sample.pts,n++;continue}}break}a++}y=a<l?h.subarray(a,l):null,this.aacOverFlow=y,this.aacLastPTS=o}},t._parseMPEGPES=function(e){for(var t=e.data,n=t.length,i=0,r=0,a=e.pts;r<n;)if(b.isHeader(t,r)){var o=b.appendFrame(this._audioTrack,t,r,a,i);if(!o)break;r+=o.length,i++}else r++},t._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),x=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:i,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){var t,n,i=v.default.getID3Data(e,0);if(i&&void 0!==v.default.getTimeStamp(i))for(t=i.length,n=Math.min(e.length-1,t+100);t<n;t++)if(b.probe(e,t))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},t.append=function(e,t,n,i){for(var r=v.default.getID3Data(e,0),a=v.default.getTimeStamp(r),o=a?90*a:9e4*t,s=r.length,l=e.length,u=0,d=0,c=this._audioTrack,f=[{pts:o,dts:o,data:r}];s<l;)if(b.isHeader(e,s)){var h=b.appendFrame(c,e,s,o,u);if(!h)break;s+=h.length,d=h.sample.pts,u++}else v.default.isHeader(e,s)?(r=v.default.getID3Data(e,s),f.push({pts:d,dts:d,data:r}),s+=r.length):s++;this.remuxer.remux(c,{samples:[]},{samples:f,inputTimeScale:9e4},{samples:[]},t,n,i)},t.destroy=function(){},e}(),M=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),R=Math.pow(2,32)-1,C=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,r))},e.box=function(e){for(var t,n=Array.prototype.slice.call(arguments,1),i=8,r=n.length,a=r;r--;)i+=n[r].byteLength;for((t=new Uint8Array(i))[0]=i>>24&255,t[1]=i>>16&255,t[2]=i>>8&255,t[3]=255&i,t.set(e,4),r=0,i=8;r<a;r++)t.set(n[r],i),i+=n[r].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var i=Math.floor(n/(R+1)),r=Math.floor(n%(R+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,n))},e.moov=function(t){for(var n=t.length,i=[];n--;)i[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,i=[];n--;)i[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(i))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(R+1)),r=Math.floor(n%(R+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,a)},e.sdtp=function(t){var n,i,r=t.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,a[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.ST
vendor: 14,733 bytes, line 108
108SC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,i,r,a=[],o=[];for(n=0;n<t.sps.length;n++)r=(i=t.sps[n]).byteLength,a.push(r>>>8&255),a.push(255&r),a=a.concat(Array.prototype.slice.call(i));for(n=0;n<t.pps.length;n++)r=(i=t.pps[n]).byteLength,o.push(r>>>8&255),o.push(255&r),o=o.concat(Array.prototype.slice.call(i));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,d=t.pixelRatio[0],c=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,r=t.width,a=t.height,o=Math.floor(i/(R+1)),s=Math.floor(i%(R+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),r=t.id,a=Math.floor(n/(R+1)),o=Math.floor(n%(R+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var i,r,a,o,s,l,u=t.samples||[],d=u.length,c=12+16*d,f=new Uint8Array(c);for(n+=8+c,f.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),i=0;i<d;i++)a=(r=u[i]).duration,o=r.size,s=r.flags,l=r.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var n,i=e.moov(t);return(n=new Uint8Array(e.FTYP.byteLength+i.byteLength)).set(e.FTYP),n.set(i,e.FTYP.byteLength),n},e}(),I=C;function L(e,t,n,i){void 0===n&&(n=1),void 0===i&&(i=!1);var r=e*t*n;return i?Math.round(r):r}function O(e,t){return void 0===t&&(t=!1),L(e,1e3,1/9e4,t)}function D(e,t){return void 0===t&&(t=1),L(e,9e4,1/t)}var P,N=D(10),k=D(.2),F=function(){function e(e,t,n,i){this.observer=e,this.config=t,this.typeSupported=n;var r=navigator.userAgent;this.isSafari=i&&i.indexOf("Apple")>-1&&r&&!r.match("CriOS"),this.ISGenerated=!1}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},t.resetInitSegment=function(){this.ISGenerated=!1},t.remux=function(e,t,n,r,a,o,l){if(this.ISGenerated||this.generateIS(e,t,a),this.ISGenerated){var u=e.samples.length,d=t.samples.length,c=a,f=a;if(u&&d){var h=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;c+=Math.max(0,h),f+=Math.max(0,-h)}if(u){e.timescale||(s.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,a));var p,m=this.remuxAudio(e,c,o,l);d&&(m&&(p=m.endPTS-m.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,a)),this.remuxVideo(t,f,o,p,l))}else if(d){var g=this.remuxVideo(t,f,o,0,l);g&&e.codec&&this.remuxEmptyAudio(e,c,o,g)}}n.samples.length&&this.remuxID3(n,a),r.samples.length&&this.remuxText(r,a),this.observer.trigger(i.default.FRAG_PARSED)},t.generateIS=function(e,t,n){var a,o,l=this.observer,u=e.samples,d=t.samples,c=this.typeSupported,f="audio/mp4",h={},p={tracks:h},m=void 0===this._initPTS;if(m&&(a=o=1/0),e.config&&u.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(c.mpeg?(f="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3")),h.audio={container:f,codec:e.codec,initSegment:!e.isAAC&&c.mpeg?new Uint8Array:I.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(a=o=u[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&d.length){var g=t.inputTimeScale;t.timescale=g,h.video={container:"video/mp4",codec:t.codec,initSegment:I.initSegment([t]),metadata:{width:t.width,height:t.height}},m&&(a=Math.min(a,d[0].pts-g*n),o=Math.min(o,d[0].dts-g*n),this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:a}))}Object.keys(h).length?(l.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,m&&(this._initPTS=a,this._initDTS=o)):l.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.remuxVideo=function(e,t,n,a,o){var l,u,d,c,f,h,p,m=8,g=e.timescale,v=e.samples,y=[],_=v.length,E=this._PTSNormalize,b=this._initPTS,T=this.nextAvcDts,w=this.isSafari;if(0!==_){w&&(n|=v.length&&T&&(o&&Math.abs(t-T/g)<.1||Math.abs(v[0].pts-T-b)<g/5)),n||(T=t*g),v.forEach(function(e){e.pts=E(e.pts-b,T),e.dts=E(e.dts-b,T)}),v.sort(function(e,t){var n=e.dts-t.dts,i=e.pts-t.pts;return n||i||e.id-t.id});var A=v.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-1*k)},0);if(A<0){s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+O(A,!0)+" ms to overcome this issue");for(var S=0;S<v.length;S++)v[S].dts+=A}var x=v[0];f=Math.max(x.dts,0),c=Math.max(x.pts,0);var M=f-T;n&&M&&(M>1?s.logger.log("AVC: "+O(M,!0)+" ms hole between fragments detected,filling it"):M<-1&&s.logger.log("AVC: "+O(-M,!0)+" ms overlapping between fragments detected"),f=T,v[0].dts=f,c=Math.max(c-M,T),v[0].pts=c,s.logger.log("Video: PTS/DTS adjusted: "+O(c,!0)+"/"+O(f,!0)+", delta: "+O(M,!0)+" ms")),x=v[v.length-1],p=Math.max(x.dts,0),h=Math.max(x.pts,0,p),w&&(l=Math.round((p-f)/(v.length-1)));for(var R=0,C=0,L=0;L<_;L++){for(var D=v[L],P=D.units,N=P.length,F=0,B=0;B<N;B++)F+=P[B].data.length;C+=F,R+=N,D.length=F,D.dts=w?f+L*l:Math.max(D.dts,f),D.pts=Math.max(D.pts,D.dts)}var U=C+4*R+8;try{u=new Uint8Array(U)}catch(e){return void this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating video mdat "+U})}var j=new DataView(u.buffer);j.setUint32(0,U),u.set(I.types.mdat,4);for(var G=0;G<_;G++){for(var V=v[G],H=V.units,z=0,W=void 0,q=0,Y=H.length;q<Y;q++){var K=H[q],X=K.data,Q=K.data.byteLength;j.setUint32(m,Q),m+=4,u.set(X,m),m+=Q,z+=4+Q}if(w)W=Math.max(0,l*Math.round((V.pts-V.dts)/l));else{if(G<_-1)l=v[G+1].dts-V.dts;else{var Z=this.config,J=V.dts-v[G>0?G-1:G].dts;if(Z.stretchShortVideoTrack){var $=Z.maxBufferHole,ee=Math.floor($*g),te=(a?c+a*g:this.nextAudioPts)-V.pts;te>ee?((l=te-J)<0&&(l=J),s.logger.log("It is approximately "+O(te,!1)+" ms to the next segment; using duration "+O(l,!1)+" ms for the last video frame.")):l=J}else l=J}W=Math.round(V.pts-V.dts)}y.push({size:z,duration:l,cts:W,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:V.key?2:1,isNonSync:V.key?0:1}})}this.nextAvcDts=p+l;var ne=e.dropped;if(e.nbNalu=0,e.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ie=y[0].flags;ie.dependsOn=2,ie.isNonSync=0}e.samples=y,d=I.moof(e.sequenceNumber++,f,e),e.samples=[];var re={data1:d,data2:u,startPTS:c/g,endPTS:(h+l)/g,startDTS:f/g,endDTS:this.nextAvcDts/g,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:ne};return this.observer.trigger(i.default.FRAG_PARSING_DATA,re),re}},t.remuxAudio=function(e,t,n,a){var o,l,u,d,c,f,h=e.inputTimeScale,p=e.timescale,m=h/p,g=(e.isAAC?1024:1152)*m,v=this._PTSNormalize,y=this._initPTS,_=!e.isAAC&&this.typeSupported.mpeg,E=_?0:8,b=e.samples,T=[],w=this.nextAudioPts;if(n|=b.length&&w&&(a&&Math.abs(t-w/h)<.1||Math.abs(b[0].pts-w-y)<20*g),b.forEach(function(e){e.pts=e.dts=v(e.pts-y,t*h)}),b=b.filter(function(e){return e.pts>=0}),0!==b.length){if(n||(w=a?t*h:b[0].pts),e.isAAC)for(var A=this.config.maxAudioFramesDrift,S=0,x=w;S<b.length;){var R,C=b[S];if((R=C.pts-x)<=-A*g)s.logger.warn("Dropping 1 audio frame @ "+O(x,!0)+" ms due to "+O(R,!0)+" ms overlap."),b.splice(S,1);else if(R>=A*g&&R<N&&x){var L=Math.round(R/g);s.logger.warn("Injecting "+L+" audio frames @ "+O(x,!0)+" ms due to "+O(x,!0)+" ms gap.");for(var D=0;D<L;D++){var P=Math.max(x,0);(l=M.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=C.unit.subarray()),b.splice(S,0,{unit:l,pts:P,dts:P}),x+=g,S++}C.pts=C.dts=x,x+=g,S++}else Math.abs(R),C.pts=C.dts=x,x+=g,S++}for(var k=b.length,F=0;k--;)F+=b[k].unit.byteLength;for(var B=0,U=b.length;B<U;B++){var j=b[B],G=j.unit,V=j.pts;if(void 0!==f)o.duration=Math.round((V-f)/m);else{var H=V-w,z=0;if(n&&e.isAAC&&H){if(H>0&&H<N)z=Math.round((V-w)/g),s.logger.log(O(H,!0)+" ms hole between AAC samples detected,filling it"),z>0&&((l=M.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(l=G.subarray()),F+=z*l.length);else if(H<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+O(w,!0)+" ms / "+O(V,!0)+" ms / "+O(-H,!0)+" ms"),F-=G.byteLength;continue}V=w}if(c=V,!(F>0))return;F+=E;try{u=new Uint8Array(F)}catch(e){return void this.observer.trigger(i.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:F,reason:"fail allocating audio mdat "+F})}_||(new DataView(u.buffer).setUint32(0,F),u.set(I.types.mdat,4));for(var W=0;W<z;W++)(l=M.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=G.subarray()),u.set(l,E),E+=l.byteLength,o={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},T.push(o)}u.set(G,E);var q=G.byteLength;E+=q,o={size:q,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},T.push(o),f=V}var Y=0;if((k=T.length)>=2&&(Y=T[k-2].duration,o.duration=Y),k){this.nextAudioPts=w=f+m*Y,e.samples=T,d=_?new Uint8Array:I.moof(e.sequenceNumber++,c/m,e),e.samples=[];var K=c/h,X=w/h,Q={data1:d,data2:u,startPTS:K,endPTS:X,startDTS:K,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:k};return this.observer.trigger(i.default.FRAG_PARSING_DATA,Q),Q}return null}},t.remuxEmptyAudio=function(e,t,n,i){var r=e.inputTimeScale,a=r/(e.samplerate?e.samplerate:r),o=this.nextAudioPts,l=(void 0!==o?o:i.startDTS*r)+this._initDTS,u=i.endDTS*r+this._initDTS,d=1024*a,c=Math.ceil((u-l)/d),f=M.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),f){for(var h=[],p=0;p<c;p++){var m=l+p*d;h.push({unit:f,pts:m,dts:m})}e.samples=h,this.remuxAudio(e,t,n)}else s.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.remuxID3=function(e){var t,n=e.samples.length,r=e.inputTimeScale,a=this._initPTS,o=this._initDTS;if(n){for(var s=0;s<n;s++)(t=e.samples[s]).pts=(t.pts-a)/r,t.dts=(t.dts-o)/r;this.observer.trigger(i.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},t.remuxText=function(e){e.samples.sort(function(e,t){return e.pts-t.pts});var t,n=e.samples.length,r=e.inputTimeScale,a=this._initPTS;if(n){for(var o=0;o<n;o++)(t=e.samples[o]).pts=(t.pts-a)/r;this.observer.trigger(i.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},t._PTSNormalize=function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e},e}(),B=function(){function e(e){this.observer=e}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.remux=function(e,t,n,r,a,o,s,l){var u=this.observer,d="";e&&(d+="audio"),t&&(d+="video"),u.trigger(i.default.FRAG_PARSING_DATA,{data1:l,startPTS:a,startDTS:a,type:d,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(i.default.FRAG_PARSED)},e}(),U=Object(l.getSelfScope)();try{P=U.performance.now.bind(U.performance)}catch(e){s.logger.debug("Unable to use Performance API on this environment"),P=U.Date.now}var j=function(){function e(e,t,n,i){this.observer=e,this.typeSupported=t,this.config=n,this.vendor=i}var t=e.prototype;return t.destroy=function(){var e=this.demuxer;e&&e.destroy()},t.push=function(e,t,n,r,o,s,l,u,d,c,f,h){var p=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var m=this.decrypter;null==m&&(m=this.decrypter=new a.default(this.observer,this.config));var g=P();m.decrypt(e,t.key.buffer,t.iv.buffer,function(e){var a=P();p.observer.trigger(i.default.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:a}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,o,s,l,u,d,c,f,h)})}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,o,s,l,u,d,c,f,h)},t.pushDecrypted=function(e,t,n,a,o,s,l,u,d,c,f,h){var p=this.demuxer;if(!p||(l||u)&&!this.probe(e)){for(var m=this.observer,g=this.typeSupported,v=this.config,E=[{demux:S,remux:F},{demux:_.default,remux:B},{demux:y,remux:F},{demux:x,remux:F}],b=0,T=E.length;b<T;b++){var w=E[b],A=w.demux.probe;if(A(e)){var M=this.remuxer=new w.remux(m,v,g,this.vendor);p=new w.demux(m,M,v,g),this.probe=A;break}}if(!p)return void m.trigger(i.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=p}var R=this.remuxer;(l||u)&&(p.resetInitSegment(n,a,o,c),R.resetInitSegment()),l&&(p.resetTimeStamp(h),R.resetTimeStamp(h)),"function"==typeof p.setDecryptData&&p.setDecryptData(t),p.append(e,s,d,f)},e}();t.default=j},
vendor: 1,885 bytes, lines 108-113
108"./src/demux/demuxer-worker.js":
109/*!*************************************!*\
110  !*** ./src/demux/demuxer-worker.js ***!
111  \*************************************/
112/*! exports provided: default */
113/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/demux/demuxer.js (referenced with require.resolve) */function(e,t,n){"use strict";n.r(t);var i=n(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),r=n(/*! ../events */"./src/events.js"),a=n(/*! ../utils/logger */"./src/utils/logger.js"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");t.default=function(e){var t=new o.EventEmitter;t.trigger=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.emit.apply(t,[e,e].concat(i))},t.off=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];t.removeListener.apply(t,[e].concat(i))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",function(r){var o=r.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.demuxer=new i.default(t,o.typeSupported,s,o.vendor),Object(a.enableLogs)(s.debug),n("init",null);break;case"demux":e.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}}),t.on(r.default.FRAG_DECRYPTED,n),t.on(r.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(r.default.FRAG_PARSED,n),t.on(r.default.ERROR,n),t.on(r.default.FRAG_PARSING_METADATA,n),t.on(r.default.FRAG_PARSING_USERDATA,n),t.on(r.default.INIT_PTS_FOUND,n),t.on(r.default.FRAG_PARSING_DATA,function(t,n){var i=[],r={event:t,data:n};n.data1&&(r.data1=n.data1.buffer,i.push(n.data1.buffer),delete n.data1),n.data2&&(r.data2=n.data2.buffer,i.push(n.data2.buffer),delete n.data2),e.postMessage(r,i)})}},
vendor: 3,280 bytes, lines 113-117
113"./src/demux/id3.js":
114/*!**************************!*\
115  !*** ./src/demux/id3.js ***!
116  \**************************/
117/*! exports provided: default, utf8ArrayToStr */function(e,t,n){"use strict";n.r(t),n.d(t,"utf8ArrayToStr",function(){return s});var i,r=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),a=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,n){for(var i=n,r=0;e.isHeader(t,n);)r+=10,r+=e._readSize(t,n+6),e.isFooter(t,n+10)&&(r+=10),n+=r;if(r>0)return t.subarray(i,i+r)},e._readSize=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),i=0;i<n.length;i++){var r=n[i];if(e.isTimeStampFrame(r))return e._readTimeStamp(r)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var n=String.fromCharCode(t[0],t[1],t[2],t[3]),i=e._readSize(t,4);return{type:n,size:i,data:t.subarray(10,10+i)}},e.getID3Frames=function(t){for(var n=0,i=[];e.isHeader(t,n);){for(var r=e._readSize(t,n+6),a=(n+=10)+r;n+8<a;){var o=e._getFrameData(t.subarray(n)),s=e._decodeFrame(o);s&&i.push(s),n+=o.size+10}e.isFooter(t,n)&&(n+=10)}return i},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,n&&(i+=47721858.84),Math.round(i)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var n=e._utf8ArrayToStr(t.data,!0),i=new Uint8Array(t.data.subarray(n.length+1));return{key:t.type,info:n,data:i.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var n=1,i=e._utf8ArrayToStr(t.data.subarray(n),!0);n+=i.length+1;var r=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:i,data:r}}var a=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:a}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var n=1,i=e._utf8ArrayToStr(t.data.subarray(n));n+=i.length+1;var r=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:i,data:r}}var a=e._utf8ArrayToStr(t.data);return{key:t.type,data:a}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var n=o();if(n){var i=n.decode(e);if(t){var r=i.indexOf("\0");return-1!==r?i.substring(0,r):i}return i.replace(/\0/g,"")}for(var a,s,l,u=e.length,d="",c=0;c<u;){if(0===(a=e[c++])&&t)return d;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:d+=String.fromCharCode(a);break;case 12:case 13:s=e[c++],d+=String.fromCharCode((31&a)<<6|63&s);break;case 14:s=e[c++],l=e[c++],d+=String.fromCharCode((15&a)<<12|(63&s)<<6|63&l)}}return d},e}();function o(){var e=Object(r.getSelfScope)();return i||void 0===e.TextDecoder||(i=new e.TextDecoder("utf-8")),i}var s=a._utf8ArrayToStr;t.default=a},
vendor: 4,420 bytes, lines 117-121
117"./src/demux/mp4demuxer.js":
118/*!*********************************!*\
119  !*** ./src/demux/mp4demuxer.js ***!
120  \*********************************/
121/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var i=n(/*! ../utils/logger */"./src/utils/logger.js"),r=n(/*! ../events */"./src/events.js"),a=Math.pow(2,32)-1,o=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,n,i,a){if(t&&t.byteLength){var o=this.initData=e.parseInitSegment(t);null==n&&(n="mp4a.40.5"),null==i&&(i="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:n+","+i,initSegment:a?t:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:n,initSegment:a?t:null}),o.video&&(s.video={container:"video/mp4",codec:i,initSegment:a?t:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else n&&(this.audioCodec=n),i&&(this.videoCodec=i)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n},e.writeUint32=function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},e.findBox=function(t,n){var i,r,a,o,s,l,u=[];if(t.data?(s=t.start,a=t.end,t=t.data):(s=0,a=t.byteLength),!n.length)return null;for(i=s;i<a;)l=(r=e.readUint32(t,i))>1?i+r:a,e.bin2str(t.subarray(i+4,i+8))===n[0]&&(1===n.length?u.push({data:t,start:i+8,end:l}):(o=e.findBox({data:t,start:i+8,end:l},n.slice(1))).length&&(u=u.concat(o))),i=l;return u},e.parseSegmentIndex=function(t){var n,i=e.findBox(t,["moov"])[0],r=i?i.end:null,a=0,o=e.findBox(t,["sidx"]);if(!o||!o[0])return null;n=[];var s=(o=o[0]).data[0];a=0===s?8:16;var l=e.readUint32(o,a);a+=4,a+=0===s?8:16,a+=2;var u=o.end+0,d=e.readUint16(o,a);a+=2;for(var c=0;c<d;c++){var f=a,h=e.readUint32(o,f);f+=4;var p=2147483647&h;if(1==(2147483648&h)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var m=e.readUint32(o,f);f+=4,n.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/l,start:u,end:u+p-1}}),u+=p,a=f+=4}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:d,references:n,moovEndOffset:r}},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach(function(t){var r=e.findBox(t,["tkhd"])[0];if(r){var a=r.data[r.start],o=0===a?12:20,s=e.readUint32(r,o),l=e.findBox(t,["mdia","mdhd"])[0];if(l){o=0===(a=l.data[l.start])?12:20;var u=e.readUint32(l,o),d=e.findBox(t,["mdia","hdlr"])[0];if(d){var c={soun:"audio",vide:"video"}[e.bin2str(d.data.subarray(d.start+8,d.start+12))];if(c){var f=e.findBox(t,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var h=e.bin2str(f.data.subarray(f.start+12,f.start+16));i.logger.log("MP4Demuxer:"+c+":"+h+" found")}n[s]={timescale:u,type:c},n[c]={timescale:u,id:s}}}}}}),n},e.getStartDTS=function(t,n){var i,r,a;return i=e.findBox(n,["moof","traf"]),r=[].concat.apply([],i.map(function(n){return e.findBox(n,["tfhd"]).map(function(i){var r,a,o;return r=e.readUint32(i,4),a=t[r].timescale||9e4,o=e.findBox(n,["tfdt"]).map(function(t){var n,i;return n=t.data[t.start],i=e.readUint32(t,4),1===n&&(i*=Math.pow(2,32),i+=e.readUint32(t,8)),i})[0],o/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0},e.offsetStartDTS=function(t,n,i){e.findBox(n,["moof","traf"]).map(function(n){return e.findBox(n,["tfhd"]).map(function(r){var o=e.readUint32(r,4),s=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map(function(t){var n=t.data[t.start],r=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,r-i*s);else{r*=Math.pow(2,32),r+=e.readUint32(t,8),r-=i*s,r=Math.max(r,0);var o=Math.floor(r/(a+1)),l=Math.floor(r%(a+1));e.writeUint32(t,4,o),e.writeUint32(t,8,l)}})})})},t.append=function(t,n,i,a){var o=this.initData;o||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(o,t);this.initPTS=l=u-n,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(o,t,l),s=e.getStartDTS(o,t),this.remuxer.remux(o.audio,o.video,null,null,s,i,a,t)},t.destroy=function(){},e}();t.default=o},
121"./src/errors.ts":
122/*!***********************!*\
123  !*** ./src/errors.ts ***!
124  \***********************/
125/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var i,r;n.r(t),n.d(t,"ErrorTypes",function(){return i}),n.d(t,"ErrorDetails",function(){return r}),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(i||(i={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException"}(r||(r={}))},
125"./src/events.js":
126/*!***********************!*\
127  !*** ./src/events.js ***!
128  \***********************/
129/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcesse
vendor: 792 bytes, line 129
129d",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},"./src/hls.ts":
vendor: 26,485 bytes, lines 129-144
129
130/*!*********************************!*\
131  !*** ./src/hls.ts + 50 modules ***!
132  \*********************************/
133/*! exports provided: default */
134/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/demux/demuxer-worker.js */
135/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/demuxer-inline.js because of ./src/demux/demuxer-worker.js */
136/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/demux/demuxer-worker.js */
137/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/demux/demuxer-worker.js */
138/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/demux/demuxer-worker.js */
139/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/demux/demuxer-worker.js */
140/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/demux/demuxer-worker.js */
141/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/demux/demuxer-worker.js */
142/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/demux/demuxer-worker.js */
143/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/eventemitter3/index.js (<- Module is not an ECMAScript module) */
144/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/url-toolkit/src/url-toolkit.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var i={};n.r(i),n.d(i,"newCue",function(){return gt});var r,a,o=n("./node_modules/url-toolkit/src/url-toolkit.js"),s=n("./src/errors.ts"),l=n("./src/polyfills/number-isFinite.js"),u=n("./src/events.js"),d=n("./src/utils/logger.js"),c={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},f=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.handledEvents=n,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if(c[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)},this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)},this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){try{(function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)}).call(this,e,t).call()}catch(t){d.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}(),h=f;!function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(a||(a={}));var p=n("./src/demux/mp4demuxer.js");function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var g,v=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}var t,n,i;return t=e,(n=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(o.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&m(t.prototype,n),i&&m(t,i),e}();function y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}!function(e){e.AUDIO="audio",e.VIDEO="video"}(g||(g={}));var _=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((e={})[g.AUDIO]=!1,e[g.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t,n,i,r=e.prototype;return r.setByteRange=function(e,t){var n=e.split("@",2),i=[];1===n.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(n[1]),i[1]=parseInt(n[0])+i[0],this._byteRange=i},r.addElementaryStream=function(e){this._elementaryStreams[e]=!0},r.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},r.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},r.setDecryptDataFromLevelKey=function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&((n=new v(e.baseuri,e.reluri)).method=e.method,n.iv=this.createInitializationVector(t)),n},t=e,(n=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&d.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.isFiniteNumber)(this.programDateTime))return null;var e=Object(l.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&y(t.prototype,n),i&&y(t,i),e}();function E(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var b=function(){function e(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}var t,n,i;return t=e,(n=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.isFiniteNumber)(this.fragments[0].programDateTime))}}])&&E(t.prototype,n),i&&E(t,i),e}(),T=/^(\d+)x(\d+)$/,w=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,A=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.slice(2*i,2*i+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.enumeratedString=function(e){return this[e]},t.decimalResolution=function(e){var t=T.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(w.lastIndex=0;null!==(t=w.exec(e));){var i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),n[t[1]]=i}return n},e}(),S={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function x(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}var M=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,R=/#EXT-X-MEDIA:(.*)/g,C=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),I=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,L=/\.(mp4|m4s|m4v|m4a)$/i,O=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.id===t)return i}},e.convertAVC1ToAVCOTI=function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t},e.resolve=function(e,t){return o.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var i,r=[];function a(e,t){["video","audio"].forEach(function(n){var i=e.filter(function(e){return function(e,t){var n=S[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)});if(i.length){var r=i.filter(function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)});t[n+"Codec"]=r.length>0?r[0]:i[0],e=e.filter(function(e){return-1===i.indexOf(e)})}}),t.unknownCodecs=e}for(M.lastIndex=0;null!=(i=M.exec(t));){var o={},s=o.attrs=new A(i[1]);o.url=e.resolve(i[2],n);var l=s.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),o.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),o.name=s.NAME,a([].concat((s.CODECS||"").split(/[ ,]+/)),o),o.videoCodec&&-1!==o.videoCodec.indexOf("avc1")&&(o.videoCodec=e.convertAVC1ToAVCOTI(o.videoCodec)),r.push(o)}return r},e.parseMasterPlaylistMedia=function(t,n,i,r){var a;void 0===r&&(r=[]);var o=[],s=0;for(R.lastIndex=0;null!==(a=R.exec(t));){var l=new A(a[1]);if(l.TYPE===i){var u={id:s++,groupId:l["GROUP-ID"],name:l.NAME||l.LANGUAGE,type:i,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(u.url=e.resolve(l.URI,n)),r.length){var d=e.findGroup(r,u.groupId);u.audioCodec=d?d.codec:r[0].codec}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,i,r){var a,o,s,u=0,c=0,f=new b(t),h=0,p=null,m=new _,g=null;for(C.lastIndex=0;null!==(a=C.exec(e));){var y=a[1];if(y){m.duration=parseFloat(y);var E=(" "+a[2]).slice(1);m.title=E||null,m.tagList.push(E?["INF",y,E]:["INF",y])}else if(a[3]){if(Object(l.isFiniteNumber)(m.duration)){var T=u++;m.type=i,m.start=c,s&&(m.levelkey=s),m.sn=T,m.level=n,m.cc=h,m.urlId=r,m.baseurl=t,m.relurl=(" "+a[3]).slice(1),D(m,p),f.fragments.push(m),p=m,c+=m.duration,m=new _}}else if(a[4]){var w=(" "+a[4]).slice(1);p?m.setByteRange(w,p):m.setByteRange(w)}else if(a[5])m.rawProgramDateTime=(" "+a[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),null===g&&(g=f.fragments.length);else{if(!(a=a[0].match(I))){d.logger.warn("No matches on slow regex match for level playlist!");continue}for(o=1;o<a.length&&void 0===a[o];o++);var S=(" "+a[o+1]).slice(1),x=(" "+a[o+2]).slice(1);switch(a[o]){case"#":m.tagList.push(x?[S,x]:[S]);break;case"PLAYLIST-TYPE":f.type=S.toUpperCase();break;case"MEDIA-SEQUENCE":u=f.startSN=parseInt(S);break;case"TARGETDURATION":f.targetduration=parseFloat(S);break;case"VERSION":f.version=parseInt(S);break;case"EXTM3U":break;case"ENDLIST":f.live=!1;break;case"DIS":h++,m.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":h=parseInt(S);break;case"KEY":var M=new A(S),R=M.enumeratedString("METHOD"),O=M.URI,P=M.hexadecimalInteger("IV");R&&(s=new v(t,O),O&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(R)>=0&&(s.method=R,s.key=null,s.iv=P));break;case"START":var N=new A(S).decimalFloatingPoint("TIME-OFFSET");Object(l.isFiniteNumber)(N)&&(f.startTimeOffset=N);break;case"MAP":var k=new A(S);m.relurl=k.URI,k.BYTERANGE&&m.setByteRange(k.BYTERANGE),m.baseurl=t,m.level=n,m.type=i,m.sn="initSegment",f.initSegment=m,(m=new _).rawProgramDateTime=f.initSegment.rawProgramDateTime;break;default:d.logger.warn("line parsed but not handled: "+a)}}}return(m=p)&&!m.relurl&&(f.fragments.pop(),c-=m.duration),f.totalduration=c,f.averagetargetduration=c/f.fragments.length,f.endSN=u-1,f.startCC=f.fragments[0]?f.fragments[0].cc:0,f.endCC=h,!f.initSegment&&f.fragments.length&&f.fragments.every(function(e){return L.test(e.relurl)})&&(d.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(m=new _).relurl=f.fragments[0].relurl,m.baseurl=t,m.level=n,m.type=i,m.sn="initSegment",f.initSegment=m,f.needSidxRanges=!0),g&&function(e,t){for(var n=e[t],i=t-1;i>=0;i--){var r=e[i];r.programDateTime=n.programDateTime-1e3*r.duration,n=r}}(f.fragments,g),f},e}();function D(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(l.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}var P=window.performance,N=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING,u.default.SUBTITLE_TRACK_LOADING)||this).loaders={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.canHaveQualityLevels=function(e){return e!==r.AUDIO_TRACK&&e!==r.SUBTITLE_TRACK},i.mapContextToLevelType=function(e){switch(e.type){case r.AUDIO_TRACK:return a.AUDIO;case r.SUBTITLE_TRACK:return a.SUBTITLE;default:return a.MAIN}},i.getResponseUrl=function(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n};var o=i.prototype;return o.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,i=t.loader,r=new(n||i)(t);return e.loader=r,this.loaders[e.type]=r,r},o.getInternalLoader=function(e){return this.loaders[e.type]},o.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},o.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},o.destroy=function(){this.destroyInternalLoaders(),e.prototype.destroy.call(this)},o.onManifestLoading=function(e){this.load({url:e.url,type:r.MANIFEST,level:0,id:null,responseType:"text"})},o.onLevelLoading=function(e){this.load({url:e.url,type:r.LEVEL,level:e.level,id:e.id,responseType:"text"})},o.onAudioTrackLoading=function(e){this.load({url:e.url,type:r.AUDIO_TRACK,level:null,id:e.id,responseType:"text"})},o.onSubtitleTrackLoading=function(e){this.load({url:e.url,type:r.SUBTITLE_TRACK,level:null,id:e.id,responseType:"text"})},o.load=function(e){var t=this.hls.config;d.logger.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var n,i,a,o,s=this.getInternalLoader(e);if(s){var l=s.context;if(l&&l.url===e.url)return d.logger.trace("playlist request ongoing"),!1;d.logger.warn("aborting previous loader for type: "+e.type),s.abort()}switch(e.type){case r.MANIFEST:n=t.manifestLoadingMaxRetry,i=t.manifestLoadingTimeOut,a=t.manifestLoadingRetryDelay,o=t.manifestLoadingMaxRetryTimeout;break;case r.LEVEL:n=0,o=0,a=0,i=t.levelLoadingTimeOut;break;default:n=t.levelLoadingMaxRetry,i=t.levelLoadingTimeOut,a=t.levelLoadingRetryDelay,o=t.levelLoadingMaxRetryTimeout}s=this.createInternalLoader(e);var u={timeout:i,maxRetry:n,retryDelay:a,maxRetryDelay:o},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return d.logger.debug("Calling internal loader delegate for URL: "+e.url),s.load(e,u,c),!0},o.loadsuccess=function(e,t,n,i){if(void 0===i&&(i=null),n.isSidxRequest)return this._handleSidxRequest(e,n),void this._handlePlaylistLoaded(e,t,n,i);if(this.resetInternalLoader(n.type),"string"!=typeof e.data)throw new Error('expected responseType of "text" for PlaylistLoader');var r=e.data;t.tload=P.now(),0===r.indexOf("#EXTM3U")?r.indexOf("#EXTINF:")>0||r.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,i):this._handleMasterPlaylist(e,t,n,i):this._handleManifestParsingError(e,n,"no EXTM3U delimiter",i)},o.loaderror=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!1,e)},o.loadtimeout=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!0)},o._handleMasterPlaylist=function(e,t,n,r){var a=this.hls,o=e.data,s=i.getResponseUrl(e,n),l=O.parseMasterPlaylist(o,s);if(l.length){var c=l.map(function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}}),f=O.parseMasterPlaylistMedia(o,s,"AUDIO",c),h=O.parseMasterPlaylistMedia(o,s,"SUBTITLES");if(f.length){var p=!1;f.forEach(function(e){e.url||(p=!0)}),!1===p&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(d.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}a.trigger(u.default.MANIFEST_LOADED,{levels:l,audioTracks:f,subtitles:h,url:s,stats:t,networkDetails:r})}else this._handleManifestParsingError(e,n,"no level found in manifest",r)},o._handleTrackOrLevelPlaylist=function(e,t,n,a){var o=this.hls,s=n.id,d=n.level,c=n.type,f=i.getResponseUrl(e,n),h=Object(l.isFiniteNumber)(s)?s:0,p=Object(l.isFiniteNumber)(d)?d:h,m=i.mapContextToLevelType(n),g=O.parseLevelPlaylist(e.data,f,p,m,h);if(g.tload=t.tload,c===r.MANIFEST){var v={url:f,details:g};o.trigger(u.default.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:f,stats:t,networkDetails:a})}if(t.tparsed=P.now(),g.needSidxRanges){var y=g.initSegment.url;this.load({url:y,isSidxRequest:!0,type:c,level:d,levelDetails:g,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else n.levelDetails=g,this._handlePlaylistLoaded(e,t,n,a)},o._handleSidxRequest=function(e,t){if("string"==typeof e.data)throw new Error("sidx request must be made with responseType of array buffer");var n=p.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var i=n.references,r=t.levelDetails;i.forEach(function(e,t){var n=e.info;if(r){var i=r.fragments[t];0===i.byteRange.length&&i.setByteRange(String(1+n.end-n.start)+"@"+String(n.start))}}),r&&r.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}},o._handleManifestParsingError=function(e,t,n,i){this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:i})},o._handleNetworkError=function(e,t,n,i){var a,o;void 0===n&&(n=!1),void 0===i&&(i=null),d.logger.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case r.MANIFEST:a=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case r.LEVEL:a=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case r.AUDIO_TRACK:a=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var c={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:o,url:e.url,loader:l,context:e,networkDetails:t};i&&(c.response=i),this.hls.trigger(u.default.ERROR,c)},o._handlePlaylistLoaded=function(e,t,n,a){var o=n.type,s=n.level,l=n.id,d=n.levelDetails;if(d&&d.targetduration)if(i.canHaveQualityLevels(n.type))this.hls.trigger(u.default.LEVEL_LOADED,{details:d,level:s||0,id:l||0,stats:t,networkDetails:a});else switch(o){case r.AUDIO_TRACK:this.hls.trigger(u.default.AUDIO_TRACK_LOADED,{details:d,id:l,stats:t,networkDetails:a});break;case r.SUBTITLE_TRACK:this.hls.trigger(u.default.SUBTITLE_TRACK_LOADED,{details:d,id:l,stats:t,networkDetails:a})}else this._handleManifestParsingError(e,n,"invalid target duration",a)},i}(h),k=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING)||this).loaders={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){var t=this.loaders;for(var n in t){var i=t[n];i&&i.destroy()}this.loaders={},e.prototype.destroy.call(this)},r.onFragLoading=function(e){var t=e.frag,n=t.type,i=this.loaders,r=this.hls.config,a=r.fLoader,o=r.loader;t.loaded=0;var s,u,c,f=i[n];f&&(d.logger.warn("abort previous fragment loader for type: "+n),f.abort()),f=i[n]=t.loader=r.fLoader?new a(r):new o(r),s={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var h=t.byteRangeStartOffset,p=t.byteRangeEndOffset;Object(l.isFiniteNumber)(h)&&Object(l.isFiniteNumber)(p)&&(s.rangeStart=h,s.rangeEnd=p),u={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:r.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},f.load(s,u,c)},r.loadsuccess=function(e,t,n,i){void 0===i&&(i=null);var r=e.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:r,frag:a,stats:t,networkDetails:i})},r.loaderror=function(e,t,n){void 0===n&&(n=null);var i=t.frag,r=i.loader;r&&r.abort(),this.loaders[i.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})},r.loadtimeout=function(e,t,n){void 0===n&&(n=null);var i=t.frag,r=i.loader;r&&r.abort(),this.loaders[i.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})},r.loadprogress=function(e,t,n,i){void 0===i&&(i=null);var r=t.frag;r.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:r,stats:e,networkDetails:i})},i}(h),F=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.KEY_LOADING)||this).loaders={},n.decryptkey=null,n.decrypturl=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){for(var t in this.loaders){var n=this.loaders[t];n&&n.destroy()}this.loaders={},e.prototype.destroy.call(this)},r.onKeyLoading=function(e){var t=e.frag,n=t.type,i=this.loaders[n];if(t.decryptdata){var r=t.decryptdata.uri;if(r!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;if(i&&(d.logger.warn("abort previous key loader for type:"+n),i.abort()),!r)return void d.logger.warn("key uri is falsy");t.loader=this.loaders[n]=new a.loader(a),this.decrypturl=r,this.decryptkey=null;var o={url:r,frag:t,responseType:"arraybuffer"},s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.loader.load(o,s,l)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}else d.logger.warn("Missing decryption data on fragment in onKeyLoading")},r.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=void 0,delete this.loaders[i.type],this.hls.trigger(u.default.KEY_LOADED,{frag:i})):d.logger.error("after key load, decryptdata unset")},r.loaderror=function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},r.loadtimeout=function(e,t){var n=t.frag,i=n.loader;i&&i.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},i}(h),B="NOT_LOADED",U="APPENDING",j="PARTIAL",G="OK",V=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.BUFFER_APPENDED,u.default.FRAG_BUFFERED,u.default.FRAG_LOADED)||this).bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=t.config,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,h.prototype.destroy.call(this),e.prototype.destroy.call(this)},r.getBufferedFrag=function(e,t){var n=this.fragments,i=Object.keys(n).filter(function(i){var r=n[i];if(r.body.type!==t)return!1;if(!r.buffered)return!1;var a=r.body;return a.startPTS<=e&&e<=a.endPTS});if(0===i.length)return null;var r=i.pop();return n[r].body},r.detectEvictedFragments=function(e,t){var n,i,r=this;Object.keys(this.fragments).forEach(function(a){var o=r.fragments[a];if(!0===o.buffered){var s=o.range[e];if(s){n=s.time;for(var l=0;l<n.length;l++)if(i=n[l],!1===r.isTimeBuffered(i.startPTS,i.endPTS,t)){r.removeFragment(o.body);break}}}})},r.detectPartialFragments=function(e){var t=this,n=this.getFragmentKey(e),i=this.fragments[n];i&&(i.buffered=!0,Object.keys(this.timeRanges).forEach(function(n){if(e.hasElementaryStream(n)){var r=t.timeRanges[n];i.range[n]=t.getBufferedTimes(e.startPTS,e.endPTS,r)}}))},r.getBufferedTimes=function(e,t,n){for(var i,r,a=[],o=!1,s=0;s<n.length;s++){if(i=n.start(s)-this.bufferPadding,r=n.end(s)+this.bufferPadding,e>=i&&t<=r){a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))});break}if(e<r&&t>i)a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))}),o=!0;else if(t<=i)break}return{time:a,partial:o}}
vendor: 16,584 bytes, line 144
144,r.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},r.getPartialFragment=function(e){var t,n,i,r=this,a=null,o=0;return Object.keys(this.fragments).forEach(function(s){var l=r.fragments[s];r.isPartial(l)&&(n=l.body.startPTS-r.bufferPadding,i=l.body.endPTS+r.bufferPadding,e>=n&&e<=i&&(t=Math.min(e-n,i-e),o<=t&&(a=l.body,o=t)))}),a},r.getState=function(e){var t=this.getFragmentKey(e),n=this.fragments[t],i=B;return void 0!==n&&(i=n.buffered?!0===this.isPartial(n)?j:G:U),i},r.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},r.isTimeBuffered=function(e,t,n){for(var i,r,a=0;a<n.length;a++){if(i=n.start(a)-this.bufferPadding,r=n.end(a)+this.bufferPadding,e>=i&&t<=r)return!0;if(t<=i)return!1}return!1},r.onFragLoaded=function(e){var t=e.frag;Object(l.isFiniteNumber)(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})},r.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach(function(e){var n=t.timeRanges[e];t.detectEvictedFragments(e,n)})},r.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},r.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},r.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},r.removeAllFragments=function(){this.fragments=Object.create(null)},i}(h),H={search:function(e,t){for(var n=0,i=e.length-1,r=null,a=null;n<=i;){var o=t(a=e[r=(n+i)/2|0]);if(o>0)n=r+1;else{if(!(o<0))return a;i=r-1}}return null}},z=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var n=e.buffered,i=0;i<n.length;i++)if(t>=n.start(i)&&t<=n.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,n){try{if(e){var i,r=e.buffered,a=[];for(i=0;i<r.length;i++)a.push({start:r.start(i),end:r.end(i)});return this.bufferedInfo(a,t,n)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,n){e.sort(function(e,t){var n=e.start-t.start;return n||t.end-e.end});var i=[];if(n)for(var r=0;r<e.length;r++){var a=i.length;if(a){var o=i[a-1].end;e[r].start-o<n?e[r].end>o&&(i[a-1].end=e[r].end):i.push(e[r])}else i.push(e[r])}else i=e;for(var s,l=0,u=t,d=t,c=0;c<i.length;c++){var f=i[c].start,h=i[c].end;if(t+n>=f&&t<h)u=f,l=(d=h)-t;else if(t+n<f){s=f;break}}return{len:l,start:u,end:d,nextStart:s}},e}(),W=n("./node_modules/eventemitter3/index.js"),q=n("./node_modules/webworkify-webpack/index.js"),Y=n("./src/demux/demuxer-inline.js");function K(){return window.MediaSource||window.WebKitMediaSource}var X=n("./src/utils/get-self-scope.js"),Q=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.trigger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.emit.apply(this,[e,e].concat(n))},i}(W.EventEmitter),Z=Object(X.getSelfScope)(),J=K()||{isTypeSupported:function(){return!1}},$=function(){function e(e,t){var n=this;this.hls=e,this.id=t;var i=this.observer=new Q,r=e.config,a=function(t,i){(i=i||{}).frag=n.frag,i.id=n.id,e.trigger(t,i)};i.on(u.default.FRAG_DECRYPTED,a),i.on(u.default.FRAG_PARSING_INIT_SEGMENT,a),i.on(u.default.FRAG_PARSING_DATA,a),i.on(u.default.FRAG_PARSED,a),i.on(u.default.ERROR,a),i.on(u.default.FRAG_PARSING_METADATA,a),i.on(u.default.FRAG_PARSING_USERDATA,a),i.on(u.default.INIT_PTS_FOUND,a);var o={mp4:J.isTypeSupported("video/mp4"),mpeg:J.isTypeSupported("audio/mpeg"),mp3:J.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(r.enableWorker&&"undefined"!=typeof Worker){var c;d.logger.log("demuxing in webworker");try{c=this.w=q(/*! ../demux/demuxer-worker.js */"./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(t){e.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},c.postMessage({cmd:"init",typeSupported:o,vendor:l,id:t,config:JSON.stringify(r)})}catch(e){d.logger.warn("Error in worker:",e),d.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),c&&Z.URL.revokeObjectURL(c.objectURL),this.demuxer=new Y.default(i,o,r,l),this.w=void 0}}else this.demuxer=new Y.default(i,o,r,l)}var t=e.prototype;return t.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},t.push=function(e,t,n,i,r,a,o,s){var u=this.w,c=Object(l.isFiniteNumber)(r.startPTS)?r.startPTS:r.start,f=r.decryptdata,h=this.frag,p=!(h&&r.cc===h.cc),m=!(h&&r.level===h.level),g=h&&r.sn===h.sn+1,v=!m&&g;if(p&&d.logger.log(this.id+":discontinuity detected"),m&&d.logger.log(this.id+":switch detected"),this.frag=r,u)u.postMessage({cmd:"demux",data:e,decryptdata:f,initSegment:t,audioCodec:n,videoCodec:i,timeOffset:c,discontinuity:p,trackSwitch:m,contiguous:v,duration:a,accurateTimeOffset:o,defaultInitPTS:s},e instanceof ArrayBuffer?[e]:[]);else{var y=this.demuxer;y&&y.push(e,f,t,n,i,c,p,m,v,a,o,s)}},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":Z.URL.revokeObjectURL(this.w.objectURL);break;case u.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},e}();function ee(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function te(e,t,n){var i=e[t],r=e[n],a=r.startPTS;Object(l.isFiniteNumber)(a)?n>t?(i.duration=a-i.start,i.duration<0&&d.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(r.duration=i.start-a,r.duration<0&&d.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):r.start=n>t?i.start+i.duration:Math.max(i.start-r.duration,0)}function ne(e,t,n,i,r,a){var o=n;if(Object(l.isFiniteNumber)(t.startPTS)){var s=Math.abs(t.startPTS-n);Object(l.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(s,t.deltaPTS):t.deltaPTS=s,o=Math.max(n,t.startPTS),n=Math.min(n,t.startPTS),i=Math.max(i,t.endPTS),r=Math.min(r,t.startDTS),a=Math.max(a,t.endDTS)}var u=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=o,t.endPTS=i,t.startDTS=r,t.endDTS=a,t.duration=i-n;var d,c,f,h=t.sn;if(!e||h<e.startSN||h>e.endSN)return 0;for(d=h-e.startSN,(c=e.fragments)[d]=t,f=d;f>0;f--)te(c,f,f-1);for(f=d;f<c.length-1;f++)te(c,f,f+1);return e.PTSKnown=!0,u}function ie(e,t){t.initSegment&&e.initSegment&&(t.initSegment=e.initSegment);var n,i=0;if(re(e,t,function(e,r){i=e.cc-r.cc,Object(l.isFiniteNumber)(e.startPTS)&&(r.start=r.startPTS=e.startPTS,r.endPTS=e.endPTS,r.duration=e.duration,r.backtracked=e.backtracked,r.dropped=e.dropped,n=r),t.PTSKnown=!0}),t.PTSKnown){if(i){d.logger.log("discontinuity sliding from playlist, take drift into account");for(var r=t.fragments,a=0;a<r.length;a++)r[a].cc+=i}n?ne(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):function(e,t){var n=t.startSN-e.startSN,i=e.fragments,r=t.fragments;if(!(n<0||n>i.length))for(var a=0;a<r.length;a++)r[a].start+=i[n].start}(e,t),t.PTSKnown=e.PTSKnown}}function re(e,t,n){if(e&&t)for(var i=Math.max(e.startSN,t.startSN)-t.startSN,r=Math.min(e.endSN,t.endSN)-t.startSN,a=t.startSN-e.startSN,o=i;o<=r;o++){var s=e.fragments[a+o],l=t.fragments[o];if(!s||!l)break;n(s,l,o)}}function ae(e,t,n){var i=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),r=i/2;return e&&t.endSN===e.endSN&&(i=r),n&&(i=Math.max(r,i-(window.performance.now()-n))),Math.round(i)}var oe={toString:function(e){for(var t="",n=e.length,i=0;i<n;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}};function se(e,t){t.fragments.forEach(function(t){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}}),t.PTSKnown=!0}function le(e,t,n){!function(e,t,n){if(function(e,t,n){var i=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc<n.startCC)&&(i=!0),i}(e,n,t)){var i=function(e,t){var n=e.fragments,i=t.fragments;if(i.length&&n.length){var r=function(e,t){for(var n=null,i=0;i<e.length;i+=1){var r=e[i];if(r&&r.cc===t){n=r;break}}return n}(n,i[0].cc);if(r&&(!r||r.startPTS))return r;d.logger.log("No frag in previous level to align on")}else d.logger.log("No fragments to align")}(n.details,t);i&&(d.logger.log("Adjusting PTS using last level due to CC increase within current level"),se(i.start,t))}}(e,n,t),!n.PTSKnown&&t&&function(e,t){if(t&&t.fragments.length){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,i=(e.fragments[0].programDateTime-n)/1e3+t.fragments[0].start;Object(l.isFiniteNumber)(i)&&(d.logger.log("adjusting PTS using programDateTime delta, sliding:"+i.toFixed(3)),se(i,e))}}(n,t.details)}function ue(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(l.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;i<e.length;++i){var r=e[i];if(fe(t,n,r))return r}return null}function de(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0);var r=e?t[e.sn-t[0].sn+1]:null;return r&&!ce(n,i,r)?r:H.search(t,ce.bind(null,n,i))}function ce(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var i=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-i<=e?1:n.start-i>e&&n.start?-1:0}function fe(e,t,n){var i=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-i>e}var he=function(){function e(e,t,n,i){this.config=e,this.media=t,this.fragmentTracker=n,this.hls=i,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var t=e.prototype;return t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,r=n.currentTime,a=n.seeking,o=this.seeking&&!a,s=!this.seeking&&a;if(this.seeking=a,r===e){if((s||o)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&n.buffered.length){var l=z.bufferInfo(n,r,0),u=l.len>0,c=l.nextStart||0;if(u||c){if(a){if(l.len>2||!c||c-r>2)return;this.moved=!1}if(!this.moved&&this.stalled){var f=Math.max(c,l.start||0)-r;if(f>0&&f<=2)return void this._trySkipBufferHole(null)}var h=self.performance.now();if(null!==i){var p=h-i;!a&&p>=250&&this._reportStall(l.len);var m=z.bufferInfo(n,r,t.maxBufferHole);this._tryFixBufferStall(m,p)}else this.stalled=h}}}else if(this.moved=!0,null!==i){if(this.stallReported){var g=self.performance.now()-i;d.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,i=this.fragmentTracker,r=this.media.currentTime,a=i.getPartialFragment(r);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(d.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,d.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,i=this.media,r=i.currentTime,a=0,o=0;o<i.buffered.length;o++){var l=i.buffered.start(o);if(r+t.maxBufferHole>=a&&r<l){var c=Math.max(l+.05,i.currentTime+.1);return d.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+c),this.moved=!0,this.stalled=null,i.currentTime=c,e&&n.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+c,frag:e}),c}a=i.buffered.end(o)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,i=n.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<e.nudgeMaxRetry){var a=i+r*e.nudgeOffset;d.logger.warn("Nudging 'currentTime' from "+i+" to "+a),n.currentTime=a,t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else d.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}(),pe=function(e){var t,n;function i(t){for(var n,i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];return(n=e.call.apply(e,[this,t].concat(r))||this)._boundTick=void 0,n._tickTimer=null,n._tickInterval=null,n._tickCallCount=0,n._boundTick=n.tick.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},r.hasInterval=function(){return!!this._tickInterval},r.hasNextTick=function(){return!!this._tickTimer},r.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},r.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},r.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},r.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},r.doTick=function(){},i}(h),me="STOPPED",ge="STARTING",ve="IDLE",ye="PAUSED",_e="KEY_LOADING",Ee="FRAG_LOADING",be="FRAG_LOADING_WAITING_RETRY",Te="WAITING_TRACK",we="PARSING",Ae="PARSED",Se="BUFFER_FLUSHING",xe="ENDED",Me="ERROR",Re="WAITING_INIT_PTS",Ce="WAITING_LEVEL",Ie=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.doTick=function(){},r.startLoad=function(){},r.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=me},r._streamEnded=function(e,t){var n=this.fragCurrent,i=this.fragmentTracker;if(!t.live&&n&&!n.backtracked&&n.sn===t.endSN&&!e.nextStart){var r=i.getState(n);return r===j||r===G}return!1},r.onMediaSeeking=function(){var e=this.config,t=this.media,n=this.mediaBuffer,i=this.state,r=t?t.currentTime:null,a=z.bufferInfo(n||t,r,this.config.maxBufferHole);if(Object(l.isFiniteNumber)(r)&&d.logger.log("media seeking to "+r.toFixed(3)),i===Ee){var o=this.fragCurrent;if(0===a.len&&o){var s=e.maxFragLookUpTolerance,u=o.start-s,c=o.start+o.duration+s;r<u||r>c?(o.loader&&(d.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=ve):d.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else i===xe&&(0===a.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=ve);t&&(this.lastCurrentTime=r),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=r),this.tick()},r.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},r.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},r.onHandlerDestroyed=function(){this.state=me,this.fragmentTracker=null},r.computeLivePosition=function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)},i}(pe);function Le(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Oe=function(e){var t,n;function i(t,n){var i;
vendor: 14,203 bytes, line 144
144return(i=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.LEVEL_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_LOAD_EMERGENCY_ABORTED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_SWITCHED,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED)||this).fragmentTracker=n,i.config=t.config,i.audioCodecSwap=!1,i._state=me,i.stallReported=!1,i.gapController=null,i.altAudio=!1,i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,o,c,f=i.prototype;return f.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=n.startLevel;-1===i&&(i=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=i,this.loadedmetadata=!1}t>0&&-1===e&&(d.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=ve,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=me},f.stopLoad=function(){this.forceStartLoad=!1,e.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case Se:this.fragLoadError=0;break;case ve:this._doTickIdle();break;case Ce:var e=this.levels[this.level];e&&e.details&&(this.state=ve);break;case be:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(d.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=ve)}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch)){var i;i=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var r=e.nextLoadLevel,a=this.levels[r];if(a){var o,s=a.bitrate;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=z.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,i,t.maxBufferHole),c=l.len;if(!(c>=o)){d.logger.trace("buffer length of "+c.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=r;var f=a.details;if(!f||f.live&&this.levelLastLoaded!==r)this.state=Ce;else{if(this._streamEnded(l,f)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(u.default.BUFFER_EOS,h),void(this.state=xe)}this._fetchPayloadOrEos(i,l,f)}}}}},f._fetchPayloadOrEos=function(e,t,n){var i=this.fragPrevious,r=this.level,a=n.fragments,o=a.length;if(0!==o){var s,l=a[0].start,u=a[o-1].start+a[o-1].duration,c=t.end;if(n.initSegment&&!n.initSegment.data)s=n.initSegment;else if(n.live){var f=this.config.initialLiveManifestSize;if(o<f)return void d.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+f);if(null===(s=this._ensureFragmentAtLivePoint(n,c,l,u,i,a,o)))return}else c<l&&(s=a[0]);s||(s=this._findFragment(l,i,o,a,c,u,n)),s&&(s.encrypted?(d.logger.log("Loading key for "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+r),this._loadKey(s)):(d.logger.log("Loading "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+r+", currentTime:"+e.toFixed(3)+",bufferEnd:"+c.toFixed(3)),this._loadFragment(s)))}},f._ensureFragmentAtLivePoint=function(e,t,n,i,r,a,o){var s,l=this.hls.config,u=this.media,c=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(n-l.maxFragLookUpTolerance,i-c)){var f=this.liveSyncPosition=this.computeLivePosition(n,e);t=f,u&&!u.paused&&u.readyState&&u.duration>f&&f>u.currentTime&&(d.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),u.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>i&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(r)if(e.hasProgramDateTime)d.logger.log("live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),s=ue(a,r.endProgramDateTime,l.maxFragLookUpTolerance);else{var h=r.sn+1;if(h>=e.startSN&&h<=e.endSN){var p=a[h-e.startSN];r.cc===p.cc&&(s=p,d.logger.log("live playlist, switching playlist, load frag with next SN: "+s.sn))}s||(s=H.search(a,function(e){return r.cc-e.cc}))&&d.logger.log("live playlist, switching playlist, load frag with same CC: "+s.sn)}s||(s=a[Math.min(o-1,Math.round(o/2))],d.logger.log("live playlist, switching playlist, unknown, load middle frag : "+s.sn))}return s},f._findFragment=function(e,t,n,i,r,a,o){var s,l=this.hls.config;if(s=r<a?de(t,i,r,r>a-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):i[n-1]){var u=s.sn-o.startSN,c=t&&s.level===t.level,f=i[u-1],h=i[u+1];if(t&&s.sn===t.sn)if(c&&!s.backtracked)if(s.sn<o.endSN){var p=t.deltaPTS;p&&p>l.maxBufferHole&&t.dropped&&u?(s=f,d.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(s=h,d.logger.log("Re-loading fragment with SN: "+s.sn))}else s=null;else s.backtracked&&(h&&h.backtracked?(d.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+s.sn+". Loading fragment "+h.sn),s=h):(d.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),s.dropped=0,f?(s=f).backtracked=!0:u&&(s=null)))}return s},f._loadKey=function(e){this.state=_e,this.hls.trigger(u.default.KEY_LOADING,{frag:e})},f._loadFragment=function(e){var t=this.fragmentTracker.getState(e);this.fragCurrent=e,"initSegment"!==e.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||t===B||t===j?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,this.hls.trigger(u.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new $(this.hls,"main")),this.state=Ee):t===U&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)},f.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,a.MAIN)},f.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},f._checkFragmentChanged=function(){var e,t,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((t=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),z.isBuffered(n,t)?e=this.getBufferedFrag(t):z.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var i=e;if(i!==this.fragPlaying){this.hls.trigger(u.default.FRAG_CHANGED,{frag:i});var r=i.level;this.fragPlaying&&this.fragPlaying.level===r||this.hls.trigger(u.default.LEVEL_SWITCHED,{level:r}),this.fragPlaying=i}}},f.immediateLevelSwitch=function(){if(d.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e,t=this.media;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,z.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},f.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t,n,i;if((n=this.getBufferedFrag(e.currentTime))&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var r=this.hls.nextLoadLevel,a=this.levels[r],o=this.fragLastKbps;t=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if((i=this.getBufferedFrag(e.currentTime+t))&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(e,t){this.state=Se;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(u.default.BUFFER_FLUSHING,n)},f.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new he(n,t,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(d.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.backtracked=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;Object(l.isFiniteNumber)(t)&&d.logger.log("media seeked to "+t.toFixed(3)),this.tick()},f.onManifestLoading=function(){d.logger.log("trigger BUFFER_RESET"),this.hls.trigger(u.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(e){var t,n=!1,i=!1;e.levels.forEach(function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(n=!0),-1!==t.indexOf("mp4a.40.5")&&(i=!0))}),this.audioCodecSwitch=n&&i,this.audioCodecSwitch&&d.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=e.altAudio,this.levels=e.levels,this.startFragRequested=!1;var r=this.config;(r.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(r.startPosition)},f.onLevelLoaded=function(e){var t=e.details,n=e.level,i=this.levels[this.levelLastLoaded],r=this.levels[n],a=t.totalduration,o=0;if(d.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.live){var s=r.details;s&&t.fragments.length>0?(ie(s,t),o=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),t.PTSKnown&&Object(l.isFiniteNumber)(o)?d.logger.log("live playlist sliding:"+o.toFixed(3)):(d.logger.log("live playlist - outdated PTS, unknown sliding"),le(this.fragPrevious,i,t))):(d.logger.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,le(this.fragPrevious,i,t))}else t.PTSKnown=!1;if(r.details=t,this.levelLastLoaded=n,this.hls.trigger(u.default.LEVEL_UPDATED,{details:t,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var c=t.startTimeOffset;Object(l.isFiniteNumber)(c)?(c<0&&(d.logger.log("negative start time offset "+c+", count from end of last fragment"),c=o+a+c),d.logger.log("start time offset found in playlist, adjust startPosition to "+c),this.startPosition=c):t.live?(this.startPosition=this.computeLivePosition(o,t),d.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Ce&&(this.state=ve),this.tick()},f.onKeyLoaded=function(){this.state===_e&&(this.state=ve,this.tick())},f.onFragLoaded=function(e){var t=this.fragCurrent,n=this.hls,i=this.levels,r=this.media,a=e.frag;if(this.state===Ee&&t&&"main"===a.type&&a.level===t.level&&a.sn===t.sn){var o=e.stats,s=i[t.level],l=s.details;if(this.bitrateTest=!1,this.stats=o,d.logger.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),a.bitrateTest&&n.nextLoadLevel)this.state=ve,this.startFragRequested=!1,o.tparsed=o.tbuffered=window.performance.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else if("initSegment"===a.sn)this.state=ve,o.tparsed=o.tbuffered=window.performance.now(),l.initSegment.data=e.payload,n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else{d.logger.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=we,this.pendingBuffering=!0,this.appended=!1,a.bitrateTest&&(a.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:a}));var c=!(r&&r.seeking)&&(l.PTSKnown||!l.live),f=l.initSegment?l.initSegment.data:[],h=this._getAudioCodec(s);(this.demuxer=this.demuxer||new $(this.hls,"main")).push(e.payload,f,h,s.videoCodec,t,l.totalduration,c)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===we){var i,r,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,r=a.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(d.logger.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==r.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==r.container&&(o="mp4a.40.2",d.logger.log("Android: force audio codec to "+o)),r.levelCodec=o,r.id=e.id}for(i in(r=a.video)&&(r.levelCodec=this.levels[this.level].videoCodec,r.id=e.id),this.hls.trigger(u.default.BUFFER_CODECS,a),a){r=a[i],d.logger.log("main track:"+i+",container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var l=r.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,{type:i,data:l,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(e){var t=this,n=this.fragCurrent,i=e.frag;if(n&&"main"===e.id&&i.sn===n.sn&&i.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===we){var r=this.levels[this.level],a=n;if(Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),!0===e.hasAudio&&a.addElementaryStream(g.AUDIO),!0===e.hasVideo&&a.addElementaryStream(g.VIDEO),d.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"
vendor: 4,596 bytes, line 144
144+(e.dropped||0)),"video"===e.type)if(a.dropped=e.dropped,a.dropped)if(a.backtracked)d.logger.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var o=r.details;if(!o||a.sn!==o.startSN)return d.logger.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=ve,this.fragPrevious=a,void this.tick();d.logger.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var s=ne(r.details,a,e.startPTS,e.endPTS,e.startDTS,e.endDTS),c=this.hls;c.trigger(u.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach(function(n){n&&n.length&&t.state===we&&(t.appended=!0,t.pendingBuffering=!0,c.trigger(u.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))}),this.tick()}},f.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===we&&(this.stats.tparsed=window.performance.now(),this.state=Ae,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(e){var t=!!e.url,n=e.id;if(!t){if(this.mediaBuffer!==this.media){d.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(d.logger.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ve}var r=this.hls;r.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),r.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},f.onAudioTrackSwitched=function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(d.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n,this.tick()},f.onBufferCreated=function(e){var t,n,i=e.tracks,r=!1;for(var a in i){var o=i[a];"main"===o.id?(n=a,t=o,"video"===a&&(this.videoBuffer=i[a].buffer)):r=!0}r&&t?(d.logger.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==we&&t!==Ae||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(!(this.state!==Ae||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;d.logger.log("main buffered : "+oe.toString(t.buffered)),this.fragPrevious=e;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(u.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=ve}this.tick()}},f.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=!!this.media&&z.isBuffered(this.media,this.media.currentTime)&&z.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);d.logger.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=be}else d.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Me;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==Me&&(e.fatal?(this.state=Me,d.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==Ce||(this.state=ve));break;case s.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==we&&this.state!==Ae||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=ve):(d.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},f._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>
vendor: 8,962 bytes, line 144
144=e&&(t.maxMaxBufferLength/=2,d.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},f._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},f.onFragLoadEmergencyAborted=function(){this.state=ve,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(g.VIDEO,e.buffered),this.state=ve,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var e=this.media,t=e.currentTime,n=e.seeking?t:this.startPosition;t!==n&&n>=0&&(d.logger.log("target start position not buffered, seek to buffered.start(0) "+n+" from current time "+t+" "),e.currentTime=n)},f._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(d.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},r=i,(o=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,d.logger.log("main stream-controller: "+t+"->"+e),this.hls.trigger(u.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}])&&Le(r.prototype,o),c&&Le(r,c),i}(Ie);function De(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}window.performance;var Pe,Ne=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.FRAG_LOADED,u.default.ERROR)||this).canload=!1,n.currentLevelIndex=null,n.manualLevelIndex=-1,n.timer=null,Pe=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,l=i.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach(function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)}),null!==this.timer&&this.loadLevel()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(e){var t,n=[],i=[],r={},a=null,o=!1,l=!1;if(e.levels.forEach(function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,o=o||!!e.videoCodec,l=l||!!e.audioCodec,Pe&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(a=r[e.bitrate])?a.url.push(e.url):(e.url=[e.url],e.urlId=0,r[e.bitrate]=e,n.push(e)),t&&(t.AUDIO&&(l=!0,ee(a||e,"audio",t.AUDIO)),t.SUBTITLES&&ee(a||e,"text",t.SUBTITLES))}),o&&l&&(n=n.filter(function(e){return!!e.videoCodec})),n=n.filter(function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||x(t,"audio"))&&(!n||x(n,"video"))}),e.audioTracks&&(i=e.audioTracks.filter(function(e){return!e.audioCodec||x(e.audioCodec,"audio")})).forEach(function(e,t){e.id=t}),n.length>0){t=n[0].bitrate,n.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=n;for(var c=0;c<n.length;c++)if(n[c].bitrate===t){this._firstLevel=c,d.logger.log("manifest loaded,"+n.length+" level(s) found, first bitrate:"+t);break}this.hls.trigger(u.default.MANIFEST_PARSED,{levels:n,audioTracks:i,firstLevel:this._firstLevel,stats:e.stats,audio:l,video:o,altAudio:i.some(function(e){return!!e.url})})}else this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){d.logger.log("switching to level "+e),this.currentLevelIndex=e;var i=t[e];i.level=e,n.trigger(u.default.LEVEL_SWITCHING,i)}var r=t[e],a=r.details;if(!a||a.live){var o=r.urlId;n.trigger(u.default.LEVEL_LOADING,{url:r.url[o],level:e,id:o})}}else n.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},l.onError=function(e){if(e.fatal)e.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer();else{var t,n=!1,i=!1;switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:t=e.frag.level,i=!0;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:t=e.context.level,n=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:t=e.level,n=!0}void 0!==t&&this.recoverLevel(e,t,n,i)}},l.recoverLevel=function(e,t,n,i){var r,a,o,s=this,l=this.hls.config,u=e.details,c=this._levels[t];if(c.loadError++,c.fragmentError=i,n){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return d.logger.error("level controller, cannot recover from "+u+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);a=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return s.loadLevel()},a),e.levelRetry=!0,this.levelRetryCount++,d.logger.warn("level controller, "+u+", retry in "+a+" ms, current retry count is "+this.levelRetryCount)}(n||i)&&((r=c.url.length)>1&&c.loadError<r?(c.urlId=(c.urlId+1)%r,c.details=void 0,d.logger.warn("level controller, "+u+" for level "+t+": switching to redundant URL-id "+c.urlId)):-1===this.manualLevelIndex?(o=0===t?this._levels.length-1:t-1,d.logger.warn("level controller, "+u+": switch to "+o),this.hls.nextAutoLevel=this.currentLevelIndex=o):i&&(d.logger.warn("level controller, "+u+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var n=this._levels[t.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(e){var t=this,n=e.level,i=e.details;if(n===this.currentLevelIndex){var r=this._levels[n];if(r.fragmentError||(r.loadError=0,this.levelRetryCount=0),i.live){var a=ae(r.details,i,e.stats.trequest);d.logger.log("live playlist, reload in "+Math.round(a)+" ms"),this.timer=setTimeout(function(){return t.loadLevel()},a)}else this.clearTimer()}},l.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var i=-1,r=0;r<n.audioGroupIds.length;r++)if(n.audioGroupIds[r]===t){i=r;break}i!==n.urlId&&(n.urlId=i,this.startLoad())}},l.loadLevel=function(){if(d.logger.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,n=e.urlId,i=e.url[n];d.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(u.default.LEVEL_LOADING,{url:i,level:t,id:n})}}},r=i,(a=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&De(r.prototype,a),o&&De(r,o),i}(h),ke=n("./src/demux/id3.js");function Fe(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function Be(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}var Ue=function(e){var t,n;function i(t){var n;
vendor: 2,485 bytes, line 144
144return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_METADATA,u.default.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,n.media=void 0,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){h.prototype.destroy.call(this)},r.onMediaAttached=function(e){this.media=e.media,this.media},r.onMediaDetaching=function(){Be(this.id3Track),this.id3Track=void 0,this.media=void 0},r.getID3Track=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Fe(n,this.media),n}return this.media.addTextTrack("metadata","id3")},r.onFragParsingMetadata=function(e){var t=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,r=0;r<n.length;r++){var a=ke.default.getID3Frames(n[r].data);if(a){var o=n[r].pts,s=r<n.length-1?n[r+1].pts:t.endPTS;o===s?s+=1e-4:o>s&&(d.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),s=o+.25);for(var l=0;l<a.length;l++){var u=a[l];if(!ke.default.isTimeStampFrame(u)){var c=new i(o,s,"");c.value=u,this.id3Track.addCue(c)}}}}},r.onLiveBackBufferReached=function(e){var t=e.bufferEnd,n=this.id3Track;if(n&&n.cues&&n.cues.length){var i=function(e,t){if(t<e[0].endTime)return e[0];if(t>e[e.length-1].endTime)return e[e.length-1];for(var n=0,i=e.length-1;n<=i;){var r=Math.floor((i+n)/2);if(t<e[r].endTime)i=r-1;else{if(!(t>e[r].endTime))return e[r];n=r+1}}return e[n].endTime-t<t-e[i].endTime?e[n]:e[i]}(n.cues,t);if(i)for(;n.cues[0]!==i;)n.removeCue(n.cues[0])}},i}(h),je=function(){function e(e){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),Ge=function(){function e(e,t,n,i){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_
vendor: 19,868 bytes, line 144
144=new je(t),this.fast_=new je(n)}var t=e.prototype;return t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,i=8*t/n;this.fast_.sample(n,i),this.slow_.sample(n,i)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();function Ve(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var He=window.performance,ze=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR)||this).lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=t,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,c=i.prototype;return c.destroy=function(){this.clearTimer(),h.prototype.destroy.call(this)},c.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var n,i,r=this.hls,a=r.config,o=t.level;r.levels[o].details.live?(n=a.abrEwmaFastLive,i=a.abrEwmaSlowLive):(n=a.abrEwmaFastVoD,i=a.abrEwmaSlowVoD),this._bwEstimator=new Ge(r,i,n,a.abrEwmaDefaultEstimate)}},c._abandonRulesCheck=function(){var e=this.hls,t=e.media,n=this.fragCurrent;if(n){var i=n.loader,r=e.minAutoLevel;if(!i||i.stats&&i.stats.aborted)return d.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=i.stats;if(t&&a&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var o=He.now()-a.trequest,s=Math.abs(t.playbackRate);if(o>500*n.duration/s){var l=e.levels,c=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/o),f=l[n.level],h=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,p=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*h/8)),m=t.currentTime,g=(p-a.loaded)/c,v=(z.bufferInfo(t,m,e.config.maxBufferHole).end-m)/s;if(v<2*n.duration/s&&g>v){var y,_;for(_=n.level-1;_>r;_--){var E=l[_].realBitrate?Math.max(l[_].realBitrate,l[_].bitrate):l[_].bitrate;if(n.duration*E/(6.4*c)<v)break}y<g&&(d.logger.warn("loading too slow, abort fragment loading and switch to level "+_+":fragLoadedDelay["+_+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+y.toFixed(1)+"<"+g.toFixed(1)+":"+v.toFixed(1)),e.nextLoadLevel=_,this._bwEstimator.sample(o,a.loaded),i.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},c.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&Object(l.isFiniteNumber)(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[t.level],i=(n.loaded?n.loaded.bytes:0)+e.stats.loaded,r=(n.loaded?n.loaded.duration:0)+e.frag.duration;n.loaded={bytes:i,duration:r},n.realBitrate=Math.round(8*i/r)}if(e.frag.bitrateTest){var a=e.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(e)}}},c.onFragBuffered=function(e){var t=e.stats,n=e.frag;if(!0!==t.aborted&&"main"===n.type&&Object(l.isFiniteNumber)(n.sn)&&(!n.bitrateTest||t.tload===t.tbuffered)){var i=t.tparsed-t.trequest;d.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(i,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},c.onError=function(e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},c.clearTimer=function(){clearInterval(this.timer),this.timer=null},c._findBestLevel=function(e,t,n,i,r,a,o,s,l){for(var u=r;u>=i;u--){var c=l[u];if(c){var f=c.details,h=f?f.totalduration/f.fragments.length:t,p=!!f&&f.live,m=void 0;m=u<=e?o*n:s*n;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,v=g*h/m;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(m)+"/"+g+"/"+h+"/"+a+"/"+v),m>g&&(!v||p&&!this.bitrateTestDelay||v<a))return u}}return-1},r=i,(a=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,i=e.config,r=e.minAutoLevel,a=e.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,c=this._bwEstimator?this._bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(z.bufferInfo(a,l,i.maxBufferHole).end-l)/u,h=this._findBestLevel(o,s,c,r,t,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor,n);if(h>=0)return h;d.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,m=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(0===f){var v=this.bitrateTestDelay;v&&(p=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-v,d.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),m=g=1)}return h=this._findBestLevel(o,s,c,r,t,f+p,m,g,n),Math.max(h,0)}}])&&Ve(r.prototype,a),o&&Ve(r,o),i}(h),We=K(),qe=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED)||this)._msDuration=null,n._levelDuration=null,n._levelTargetDuration=10,n._live=null,n._objectUrl=null,n._needsFlush=!1,n._needsEos=!1,n.config=void 0,n.audioTimestampOffset=void 0,n.bufferCodecEventsExpected=0,n._bufferCodecEventsTotal=0,n.media=null,n.mediaSource=null,n.segments=[],n.parent=void 0,n.appending=!1,n.appended=0,n.appendError=0,n.flushBufferCounter=0,n.tracks={},n.pendingTracks={},n.sourceBuffer={},n.flushRange=[],n._onMediaSourceOpen=function(){d.logger.log("media source opened"),n.hls.trigger(u.default.MEDIA_ATTACHED,{media:n.media});var e=n.mediaSource;e&&e.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},n._onMediaSourceClose=function(){d.logger.log("media source closed")},n._onMediaSourceEnded=function(){d.logger.log("media source ended")},n._onSBUpdateEnd=function(){if(n.audioTimestampOffset&&n.sourceBuffer.audio){var e=n.sourceBuffer.audio;d.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+n.audioTimestampOffset),e.timestampOffset=n.audioTimestampOffset,delete n.audioTimestampOffset}n._needsFlush&&n.doFlush(),n._needsEos&&n.checkEos(),n.appending=!1;var t=n.parent,i=n.segments.reduce(function(e,n){return n.parent===t?e+1:e},0),r={},a=n.sourceBuffer;for(var o in a){var s=a[o];if(!s)throw Error("handling source buffer update end error: source buffer for "+o+" uninitilized and unable to update buffered TimeRanges.");r[o]=s.buffered}n.hls.trigger(u.default.BUFFER_APPENDED,{parent:t,pending:i,timeRanges:r}),n._needsFlush||n.doAppending(),n.updateMediaElementDuration(),0===i&&n.flushLiveBackBuffer()},n._onSBUpdateError=function(e){d.logger.error("sourceBuffer error:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},n.config=t.config,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){h.prototype.destroy.call(this)},r.onLevelPtsUpdated=function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var i=this.sourceBuffer.audio;if(!i)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(i.timestampOffset-e.start)>.1){var r=i.updating;try{i.abort()}catch(e){d.logger.warn("can not abort audio buffer: "+e)}r?this.audioTimestampOffset=e.start:(d.logger.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+e.start),i.timestampOffset=e.start)}}},r.onManifestParsed=function(e){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=e.altAudio?2:1,d.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},r.onMediaAttaching=function(e){var t=this.media=e.media;if(t&&We){var n=this.mediaSource=new We;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),t.src=window.URL.createObjectURL(n),this._objectUrl=t.src}},r.onMediaDetaching=function(){d.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){d.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):d.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(u.default.MEDIA_DETACHED)},r.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,n=Object.keys(t).length;(n&&!e||2===n)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},r.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{n&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this._onSBUpdateEnd),n.removeEventListener("error",this._onSBUpdateError))}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},r.onBufferCodecs=function(e){var t=this;Object.keys(this.sourceBuffer).length||(Object.keys(e).forEach(function(n){t.pendingTracks[n]=e[n]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},r.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var i in e)if(!t[i]){var r=e[i];if(!r)throw Error("source buffer exists for track "+i+", however track does not");var a=r.levelCodec||r.codec,o=r.container+";codecs="+a;d.logger.log("creating sourceBuffer("+o+")");try{var l=t[i]=n.addSourceBuffer(o);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[i]={buffer:l,codec:a,id:r.id,container:r.container,levelCodec:r.levelCodec}}catch(e){d.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:o})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:this.tracks})},r.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},r.onBufferEos=function(e){for(var t in this.sourceBuffer)if(!e.type||e.type===t){var n=this.sourceBuffer[t];n&&!n.ended&&(n.ended=!0,d.logger.log(t+" sourceBuffer now EOS"))}this.checkEos()},r.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var n in e){var i=e[n];if(i){if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}}d.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){d.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},r.onBufferFlushing=function(e){e.type?this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}):(this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"video"}),this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},r.flushLiveBackBuffer=function(){if(this._live){var e=this.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))if(this.media)for(var t=this.media.currentTime,n=this.sourceBuffer,i=Object.keys(n),r=t-Math.max(e,this._levelTargetDuration),a=i.length-1;a>=0;a--){var o=i[a],s=n[o];if(s){var l=s.buffered;l.length>0&&r>l.start(0)&&this.removeBufferRange(o,s,0,r)&&this.hls.trigger(u.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r})}}else d.logger.error("flushLiveBackBuffer called without attaching media")}},r.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},r.updateMediaElementDuration=function(){var e,t=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer){var i=this.sourceBuffer[n];if(i&&!0===i.updating)return}e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(d.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||!Object(l.isFiniteNumber)(e))&&(d.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},r.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var i in n){var r=n[i];r&&(t+=r.buffered.length)}}catch(e){d.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}},r.doAppending=function(){var e=this.config,t=this.hls,n=this.segments,i=this.sourceBuffer;if(Object.keys(i).length){if(!this.media||this.media.error)return this.segments=[],void d.logger.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var r=n.shift();if(r)try{var a=i[r.type];if(!a)return void this._onSBUpdateEnd();if(a.updating)return void n.unshift(r);a.ended=!1,this.parent=r.parent,a.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0}catch(i){d.logger.error("error while trying to append buffer:"+i.message),n.unshift(r);var o={type:s.ErrorTypes.MEDIA_ERROR,parent:r.parent,details:"",fatal:!1};22===i.code?(this.segments=[],o.details=s.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,o.details=s.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.appendErrorMaxRetry&&(d.logger.log("fail "+e.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),t.trigger(u.default.ERROR,o)}}}},r.flushBuffer=function(e,t,n){var i=this.sourceBuffer;if(!Object.keys(i).length)return!0;var r="null";if(this.media&&(r=this.media.currentTime.toFixed(3)),d.logger.log("flushBuffer,pos/start/end: "+r+"/"+e+"/"+t),this.flushBufferCounter>=this.appended)return d.logger.warn("abort flushing too many retries"),!0;var a=i[n];if(a){if(a.ended=!1,a.updating)return d.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(n,a,e,t))return this.flushBufferCounter++,!1}return d.logger.log("buffer flushed"),!0},r.removeBufferRange=function(e,t,n,i){try{for(var r=0;r<t.buffered.length;r++){var a=t.buffered.start(r),o=t.buffered.end(r),s=Math.max(a,n),l=Math.min(o,i);if(Math.min(l,o)-s>.5){var u="null";return this.media&&(u=this.media.currentTime.toString()),d.logger.log("sb remove "+e+" ["+s+","+l+"], of ["+a+","+o+"], pos:"+u),t.remove(s,l),!0}}}catch(e){d.logger.warn("removeBufferRange failed",e)}return!1},i}(h);function Ye(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ke=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_CODECS,u.default.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,n.firstLevel=null,n.levels=[],n.media=null,n.restrictedLevels=[],n.timer=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,s=i.prototype;return s.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.stopCapping())},s.onFpsDropLevelCapping=function(e){i.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},s.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},s.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onLevelsUpdated=function(e){this.levels=e.levels},s.onMediaDetaching=function(){this.stopCapping()},s.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},s.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var n=this.levels.filter(function(n,r){return i.isLevelAllowed(r,t.restrictedLevels)&&r<=e});return i.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},s.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},i.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},i.getMaxLevelByMediaSize=function(e,t,n){if(!e||e&&!e.length)return-1;for(var i=function(e,t){return!t||e.width!==t.width||e.height!==t.height},r=e.length-1,a=0;a<e.length;a+=1){var o=e[a];if((o.width>=t||o.height>=n)&&i(o,e[a+1])){r=a;break}}return r},r=i,o=[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}],(a=[{key:"mediaWidth",get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=i.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=i.contentScaleFactor),e}}])&&Ye(r.prototype,a),o&&Ye(r,o),i}(h),Xe=window.performance,Qe=function(e){var t,n;
vendor: 5,452 bytes, line 144
144function i(t){return e.call(this,t,u.default.MEDIA_ATTACHING)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},r.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},r.checkFPS=function(e,t,n){var i=Xe.now();if(t){if(this.lastTime){var r=i-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,s=1e3*a/r,l=this.hls;if(l.trigger(u.default.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var c=l.currentLevel;d.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=c)&&(c-=1,l.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:l.currentLevel}),l.autoLevelCapping=c,l.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},r.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},i}(h),Ze=window,Je=Ze.performance,$e=Ze.XMLHttpRequest,et=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}var t=e.prototype;return t.destroy=function(){this.abort(),this.loader=null},t.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.load=function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:Je.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e,t=this.context;e=this.loader=new $e;var n=this.stats;n.tfirst=0,n.loaded=0;var i=this.xhrSetup;try{if(i)try{i(e,t.url)}catch(n){e.open("GET",t.url,!0),i(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(n){return void this.callbacks.onError({code:e.status,text:n.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},t.readystatechange=function(e){var t=e.currentTarget,n=t.readyState,i=this.stats,r=this.context,a=this.config;if(!i.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(Je.now(),i.trequest)),4===n){var o=t.status;if(o>=200&&o<300){var s,l;i.tload=Math.max(i.tfirst,Je.now()),l="arraybuffer"===r.responseType?(s=t.response).byteLength:(s=t.responseText).length,i.loaded=i.total=l;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,i,r,t)}else i.retry>=a.maxRetry||o>=400&&o<499?(d.logger.error(o+" while loading "+r.url),this.callbacks.onError({code:o,text:t.statusText},r,t)):(d.logger.warn(o+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},t.loadtimeout=function(){d.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.loadprogress=function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var i=this.callbacks.onProgress;i&&i(n,this.context,null,t)},e}();function tt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var nt=function(e){var t,n;function i(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.AUDIO_TRACK_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.LEVEL_LOADED,u.default.ERROR)||this)._trackId=-1,n._selectDefaultTrack=!0,n.tracks=[],n.trackIdBlacklist=Object.create(null),n.audioGroupId=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,l=i.prototype;return l.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},l.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:t}),this._selectAudioGroup(this.hls.nextLoadLevel)},l.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)d.logger.warn("Invalid audio track id:",e.id);else{if(d.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},l.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},l.onLevelLoaded=function(e){this._selectAudioGroup(e.level)}
vendor: 3,158 bytes, line 144
144,l.onError=function(e){e.type===s.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(d.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},l._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)d.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)d.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];d.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,i=t.type,r=t.id;this.hls.trigger(u.default.AUDIO_TRACK_SWITCHING,{id:r,type:i,url:n}),this._loadTrackDetailsIfNeeded(t)}},l.doTick=function(){this._updateTrack(this._trackId)},l._selectAudioGroup=function(e){var t=this.hls.levels[e];if(t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},l._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var n=this.tracks[this._trackId],i=null;if(n&&(i=n.name),this._selectDefaultTrack){var r=t.filter(function(e){return e.default});r.length?t=r:d.logger.warn("No default audio tracks defined")}var a=!1,o=function(){t.forEach(function(t){a||e.audioGroupId&&t.groupId!==e.audioGroupId||i&&i!==t.name||(e._setAudioTrack(t.id),a=!0)})};o(),a||(i=null,o()),a||(d.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},l._needsTrackLoading=function(e){var t=e.details,n=e.url;return!(t&&!t.live||!n)},l._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,n=e.id;d.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:t,id:n})}},l._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,d.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},l._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],n=t.name,i=t.language,r=t.groupId;d.logger.warn("Loading failed on audio track id: "+e+", group-id: "+r+', name/language: "'+n+'" / "'+i+'"');for(var a=e,o=0;o<this.tracks.length;o++)if(!this.trackIdBlacklist[o]&&this.tracks[o].name===n){a=o;break}a!==e?(d.logger.log("Attempting audio-track fallback id:",a,"group-id:",this.tracks[a].groupId),this._setAudioTrack(a)):d.logger.warn('No fallback audio-track found for name/language: "'+n+'" / "'+i+'"')},r=i,(a=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1}}])&&tt(r.prototype,a),o&&tt(r,o),i}(pe);function it(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var rt=window.performance,at=function(e){var t,n;function i(t,n){var i;
vendor: 7,939 bytes, line 144
144return(i=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.AUDIO_TRACKS_UPDATED,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.BUFFER_RESET,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED,u.default.INIT_PTS_FOUND)||this).fragmentTracker=n,i.config=t.config,i.audioCodecSwap=!1,i._state=me,i.initPTS=[],i.waitingFragment=null,i.videoTrackCC=null,i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,c=i.prototype;return c.onInitPtsFound=function(e){var t=e.id,n=e.frag.cc,i=e.initPTS;"main"===t&&(this.initPTS[n]=i,this.videoTrackCC=n,d.logger.log("InitPTS for cc: "+n+" found from video track: "+i),this.state===Re&&this.tick())},c.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(d.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=ve):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=ge),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=me},c.doTick=function(){var e,t,n,i=this.hls,r=i.config;switch(this.state){case Me:case ye:case Se:break;case ge:this.state=Te,this.loadedmetadata=!1;break;case ve:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!r.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,c=z.bufferInfo(o,e,r.maxBufferHole),f=z.bufferInfo(s,e,r.maxBufferHole),h=c.len,p=c.end,m=this.fragPrevious,g=Math.min(r.maxBufferLength,r.maxMaxBufferLength),v=Math.max(g,f.len),y=this.audioSwitch,_=this.trackId;if((h<v||y)&&_<a.length){if(void 0===(n=a[_].details)){this.state=Te;break}if(!y&&this._streamEnded(c,n))return this.hls.trigger(u.default.BUFFER_EOS,{type:"audio"}),void(this.state=xe);var E,b=n.fragments,T=b.length,w=b[0].start,A=b[T-1].start+b[T-1].duration;if(y)if(n.live&&!n.PTSKnown)d.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),p=0;else if(p=e,n.PTSKnown&&e<w){if(!(c.end>w||c.nextStart))return;d.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=w+.05}if(n.initSegment&&!n.initSegment.data)E=n.initSegment;else if(p<=w){if(E=b[0],null!==this.videoTrackCC&&E.cc!==this.videoTrackCC&&(E=function(e,t){return H.search(e,function(e){return e.cc<t?1:e.cc>t?-1:0})}(b,this.videoTrackCC)),n.live&&E.loadIdx&&E.loadIdx===this.fragLoadIdx){var S=c.nextStart?c.nextStart:w;return d.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(S+.05)),void(this.media.currentTime=S+.05)}}else{var x,M=r.maxFragLookUpTolerance,R=m?b[m.sn-b[0].sn+1]:void 0,C=function(e){var t=Math.min(M,e.duration);return e.start+e.duration-t<=p?1:e.start-t>p&&e.start?-1:0};p<A?(p>A-M&&(M=0),x=R&&!C(R)?R:H.search(b,C)):x=b[T-1],x&&(E=x,w=x.start,m&&E.level===m.level&&E.sn===m.sn&&(E.sn<n.endSN?(E=b[E.sn+1-n.startSN],d.logger.log("SN just loaded, load next one: "+E.sn)):E=null))}E&&(E.encrypted?(d.logger.log("Loading key for "+E.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+_),this.state=_e,i.trigger(u.default.KEY_LOADING,{frag:E})):(d.logger.log("Loading "+E.sn+", cc: "+E.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+_+", currentTime:"+e+",bufferEnd:"+p.toFixed(3)),this.fragCurrent=E,(y||this.fragmentTracker.getState(E)===B)&&("initSegment"!==E.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(E.sn)&&(this.nextLoadPosition=E.start+E.duration),i.trigger(u.default.FRAG_LOADING,{frag:E}),this.state=Ee)))}break;case Te:(t=this.tracks[this.trackId])&&t.details&&(this.state=ve);break;case be:var I=rt.now(),L=this.retryDate,O=(o=this.media)&&o.seeking;(!L||I>=L||O)&&(d.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=ve);break;case Re:var D=this.videoTrackCC;if(void 0===this.initPTS[D])break;var P=this.waitingFragment;if(P){var N=P.frag.cc;D!==N?(t=this.tracks[this.trackId]).details&&t.details.live&&(d.logger.warn("Waiting fragment CC ("+N+") does not match video track CC ("+D+")"),this.waitingFragment=null,this.state=ve):(this.state=Ee,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=ve}},c.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},c.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(d.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onAudioTracksUpdated=function(e){d.logger.log("audio tracks updated"),this.tracks=e.audioTracks},c.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=ye,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=ve),this.tick()},c.onAudioTrackLoaded=function(e){var t=e.details,n=e.id,i=this.tracks[n],r=t.totalduration,a=0;if(d.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+r),t.live){var o=i.details;o&&t.fragments.length>0?(ie(o,t),a=t.fragments[0].start,t.PTSKnown?d.logger.log("live audio playlist sliding:"+a.toFixed(3)):d.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,d.logger.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(i.details=t,!this.startFragRequested){if(-1===this.startPosition){var s=t.startTimeOffset;Object(l.isFiniteNumber)(s)?(d.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s):t.live?(this.startPosition=this.computeLivePosition(a,t),d.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===Te&&(this.state=ve),this.tick()},c.onKeyLoaded=function(){this.state===_e&&(this.state=ve,this.tick())},c.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===Ee&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var i=this.tracks[this.trackId],r=i.details,a=r.totalduration,o=t.level,s=t.sn,l=t.cc,c=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",f=this.stats=e.stats;if("initSegment"===s)this.state=ve,f.tparsed=f.tbuffered=rt.now(),r.initSegment.data=e.payload,this.hls.trigger(u.default.FRAG_BUFFERED,{stats:f,frag:t,id:"audio"}),this.tick();else{this.state=we,this.appended=!1,this.demuxer||(this.demuxer=new $(this.hls,"audio"));var h=this.initPTS[l],p=r.initSegment?r.initSegment.data:[];r.initSegment||void 0!==h?(this.pendingBuffering=!0,d.logger.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o),this.demuxer.push(e.payload,p,c,null,t,a,!1,h)):(d.logger.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o),this.waitingFragment=e,this.state=Re)}}this.fragLoadError=0},c.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===we){var i,r=e.tracks;
vendor: 22,757 bytes, line 144
144if(r.video&&delete r.video,i=r.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(u.default.BUFFER_CODECS,r),d.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var a=i.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,o))}this.tick()}}},c.onFragParsingData=function(e){var t=this,n=this.fragCurrent,i=e.frag;if(n&&"audio"===e.id&&"audio"===e.type&&i.sn===n.sn&&i.level===n.level&&this.state===we){var r=this.trackId,a=this.tracks[r],o=this.hls;Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),n.addElementaryStream(g.AUDIO),d.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),ne(a.details,n,e.startPTS,e.endPTS);var c=this.audioSwitch,f=this.media,h=!1;if(c)if(f&&f.readyState){var p=f.currentTime;d.logger.log("switching audio track : currentTime:"+p),p>=e.startPTS&&(d.logger.log("switching audio track : flushing all audio"),this.state=Se,o.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:r}))}else this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:r});var m=this.pendingData;if(!m)return d.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach(function(t){t&&t.length&&m.push({type:e.type,data:t,parent:"audio",content:"data"})}),!h&&m.length&&(m.forEach(function(e){t.state===we&&(t.pendingBuffering=!0,t.hls.trigger(u.default.BUFFER_APPENDING,e))}),this.pendingData=[],this.appended=!0)),this.tick()}},c.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===we&&(this.stats.tparsed=rt.now(),this.state=Ae,this._checkAppendedParsed())},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},c.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==we&&t!==Ae||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},c._checkAppendedParsed=function(){if(!(this.state!==Ae||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=rt.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;i&&d.logger.log("audio buffered : "+oe.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=ve}this.tick()}},c.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=e.frag;if(n&&"audio"!==n.type)break;if(!e.fatal){var i=this.fragLoadError;i?i++:i=1;var r=this.config;if(i<=r.fragLoadingMaxRetry){this.fragLoadError=i;var a=Math.min(Math.pow(2,i-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);d.logger.warn("AudioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=rt.now()+a,this.state=be}else d.logger.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Me}break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==Me&&(this.state=e.fatal?Me:ve,d.logger.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===we||this.state===Ae)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&z.isBuffered(o,l)&&z.isBuffered(o,l+.5)){var c=this.config;c.maxMaxBufferLength>=c.maxBufferLength&&(c.maxMaxBufferLength/=2,d.logger.warn("AudioStreamController: reduce max buffer length to "+c.maxMaxBufferLength+"s")),this.state=ve}else d.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=Se,this.hls.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},c.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(d.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach(function(t){e.hls.trigger(u.default.BUFFER_APPENDING,t)}),this.appended=!0,this.pendingData=[],this.state=Ae):(this.state=ve,this.fragPrevious=null,this.tick())},r=i,(a=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,d.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}])&&it(r.prototype,a),o&&it(r,o),i}(Ie),ot=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var e={"":!0,lr:!0,rl:!0},t={start:!0,middle:!0,end:!0,left:!0,right:!0};function n(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function r(t,r,a){var o=this,s={enumerable:!0};o.hasBeenReset=!1;var l="",u=!1,d=t,c=r,f=a,h=null,p="",m=!0,g="auto",v="start",y=50,_="middle",E=50,b="middle";Object.defineProperty(o,"id",i({},s,{get:function(){return l},set:function(e){l=""+e}})),Object.defineProperty(o,"pauseOnExit",i({},s,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(o,"startTime",i({},s,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",i({},s,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",i({},s,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",i({},s,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",i({},s,{get:function(){return p},set:function(t){var n=function(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");p=n,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",i({},s,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",i({},s,{get:function(){return g},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",i({},s,{get:function(){return v},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",i({},s,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",i({},s,{get:function(){return _},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",i({},s,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",i({},s,{get:function(){return b},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),o.displayState=void 0}return r.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},r}(),st=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function lt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new st,this.regionList=[]}function ut(){this.values=Object.create(null)}function dt(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(n);2===o.length&&t(o[0],o[1])}}ut.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var ct=new ot(0,0,0),ft="middle"===ct.align?"middle":"center";function ht(e,t,n){var i=e;function r(){var t=function(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),a(),t.endTime=r(),a(),function(e,t){var i=new ut;dt(e,function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",ft,"end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",ft,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",ft,"end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var r=i.get("line","auto");"auto"===r&&-1===ct.line&&(r=-1),t.line=r,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",ft);var a=i.get("position","auto");"auto"===a&&50===ct.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function pt(e){return e.replace(/<br(?: \/)?>/gi,"\n")}lt.prototype={parse:function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=pt(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){dt(e,function(e,t){},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(r=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var o=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new ot(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{ht(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var s=-1!==r.indexOf("--\x3e");if(!r||s&&(o=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID");continue}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return e.onflush&&e.onflush(),this}};var mt=lt;function gt(e,t,n,i){for(var r,a,o,s,l,u=window.VTTCue||TextTrackCue,d=0;d<i.rows.length;d++)if(o=!0,s=0,l="",!(r=i.rows[d]).isEmpty()){for(var c=0;c<r.chars.length;c++)r.chars[c].uchar.match(/\s/)&&o?s++:(l+=r.chars[c].uchar,o=!1);r.cueStartTime=t,t===n&&(n+=1e-4),a=new u(t,n,pt(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?a.line=d+1:a.line=d>7?d-2:d+1,a.align="left",a.position=Math.max(0,Math.min(100,s/32*100)),e.addCue(a)}}var vt,yt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},_t=function(e){var t=e;return yt.hasOwnProperty(e)&&(t=yt[e]),String.fromCharCode(t)},Et=15,bt=100,Tt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},wt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},At={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},St={25:2,26:4,29:6,30:8,31:10,27:13,28:15},xt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(vt||(vt={}));var Mt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){this.verboseFilter[e],this.verboseLevel}},Rt=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Ct=function(){function e(e,t,n,i,r){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=i||"black",this.flash=r||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var i=t[n];e.hasOwnProperty(i)&&(this[i]=e[i])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),It=function(){function e(e,t,n,i,r,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Ct(t,n,i,r,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Lt=function(){function e(){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.chars=[];for(var e=0;e<bt;e++)this.chars.push(new It);this.pos=0,this.currPenState=new Ct}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<bt;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<bt;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<bt;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(Mt.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>bt&&(Mt.log("ERROR","Too large cursor position "+this.pos),this.pos=bt)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=_t(e);this.pos>=bt?Mt.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<bt;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<bt;n++){var i=this.chars[n].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Ot=function(){function e(){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.rows=[];for(var e=0;e<Et;e++)this.rows.push(new Lt);this.currRow=14,this.nrRollUpRows=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<Et;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<Et;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<Et;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Et;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){Mt.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){Mt.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<Et;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,r=this.lastOutputScreen;if(r){var a=r.rows[i].cueStartTime;if(a&&Mt.time&&a<Mt.time)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(r.rows[i+o])}}this.currRow=t;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,u=Math.max(l-1,0);s.setCursor(e.indent),e.color=s.chars[u].penState.foreground}var d={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(d)},t.setBkgData=function(e){Mt.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){Mt.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),Mt.log("INFO","Rolling up")}else Mt.log("DEBUG","roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",i=-1,r=0;r<Et;r++){var a=this.rows[r].getTextString();a&&(i=r+1,e?t.push("Row "+i+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),Dt=function(){function e(e,t){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Ot,this.nonDisplayedMemory=new Ot,this.lastOutputScreen=new Ot,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,Mt.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";Mt.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(Mt.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){Mt.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){Mt.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){Mt.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){Mt.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){Mt.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}
vendor: 7,324 bytes, line 144
144,t.ccRDC=function(){Mt.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){Mt.log("INFO","TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){Mt.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){Mt.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){Mt.log("INFO","CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){Mt.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(Mt.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,Mt.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){Mt.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}Mt.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=Mt.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),Pt=function(){function e(e,t,n){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=e||1,this.outputs=[t,n],this.channels=[new Dt(1,t),new Dt(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,r,a=!1;this.lastTime=e,Mt.setTime(e);for(var o=0;o<t.length;o+=2)i=127&t[o],r=127&t[o+1],0!==i||0!==r?(Mt.log("DATA","["+Rt([t[o],t[o+1]])+"] -> ("+Rt([i,r])+")"),(n=this.parseCmd(i,r))||(n=this.parseMidrow(i,r)),n||(n=this.parsePAC(i,r)),n||(n=this.parseBackgroundAttributes(i,r)),n||(a=this.parseChars(i,r))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(a):Mt.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,Mt.log("WARNING","Couldn't parse cleaned data "+Rt([i,r])+" orig: "+Rt([t[o],t[o+1]])))):this.dataCounters.padding+=2},t.parseCmd=function(e,t){var n=null;if(!((20===e||28===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Mt.log("DEBUG","Repeated command ("+Rt([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var i=this.channels[n-1];return 20===e||28===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},t.parseMidrow=function(e,t){var n=null;return(17===e||25===e)&&t>=32&&t<=47&&((n=17===e?1:2)!==this.currChNr?(Mt.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(t),Mt.log("DEBUG","MIDROW ("+Rt([e,t])+")"),!0))},t.parsePAC=function(e,t){var n,i=null;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,i=t>=64&&t<=95?1===n?Tt[e]:At[e]:1===n?wt[e]:St[e];var r=this.interpretPAC(i,t);return this.channels[n-1].setPAC(r),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},t.interpretPAC=function(e,t){var n=t,i={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,i.underline=!(1&~n),n<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((n-16)/2),i},t.parseChars=function(e,t){var n=null,i=null,r=null;if(e>=25?(n=2,r=e-8):(n=1,r=e),r>=17&&r<=19){var a=t;a=17===r?t+80:18===r?t+112:t+144,Mt.log("INFO","Special char '"+_t(a)+"' in channel "+n),i=[a]}else e>=32&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var o=Rt(i);Mt.log("DEBUG","Char codes =  "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.parseBackgroundAttributes=function(e,t){var n,i,r;return((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47)&&(n={},16===e||24===e?(i=Math.floor((t-32)/2),n.background=xt[i],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),r=e<24?1:2,this.channels[r-1].setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},t.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}(),Nt=function(){function e(e,t){this.timelineController=void 0,this.trackName=void 0,this.startTime=void 0,this.endTime=void 0,this.screen=void 0,this.timelineController=e,this.trackName=t,this.startTime=null,this.endTime=null,this.screen=null}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e}(),kt=function(e,t,n){return e.substr(n||0,t.length)===t},Ft=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},Bt={parse:function(e,t,n,i,r,a){var o,s=Object(ke.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),u="00:00.000",d=0,c=0,f=0,h=[],p=!0,m=!1,g=new mt;g.oncue=function(e){var t=n[i],r=n.ccOffset;t&&t.new&&(void 0!==c?r=n.ccOffset=t.start:function(e,t,n){var i=e[t],r=e[i.prevCC];if(!r||!r.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;r&&r.new;)e.ccOffset+=i.start-r.start,i.new=!1,r=e[(i=r).prevCC];e.presentationOffset=n}(n,i,f)),f&&(r=f-n.presentationOffset),m&&(e.startTime+=r-c,e.endTime+=r-c),e.id=Ft(e.startTime.toString())+Ft(e.endTime.toString())+Ft(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&h.push(e)},g.onparsingerror=function(e){o=e},g.onflush=function(){o&&a?a(o):r(h)}
vendor: 4,821 bytes, line 144
144,s.forEach(function(e){if(p){if(kt(e,"X-TIMESTAMP-MAP=")){p=!1,m=!0,e.substr(16).split(",").forEach(function(e){kt(e,"LOCAL:")?u=e.substr(6):kt(e,"MPEGTS:")&&(d=parseInt(e.substr(7)))});try{t+(9e4*n[i].start||0)<0&&(t+=8589934592),d-=t,c=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),r=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(l.isFiniteNumber)(t)&&Object(l.isFiniteNumber)(n)&&Object(l.isFiniteNumber)(i)&&Object(l.isFiniteNumber)(r)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,(t+=6e4*i)+36e5*r}(u)/1e3,f=d/9e4}catch(e){m=!1,o=e}return}""===e&&(p=!1)}g.parse(e+"\n")}),g.flush()}};function Ut(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jt(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function Gt(e,t,n,i){return Math.min(t,i)-Math.max(e,n)}var Vt=function(e){var t,n;function i(t){var n;if((n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.FRAG_DECRYPTED,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.FRAG_LOADED,u.default.INIT_PTS_FOUND)||this).media=null,n.config=void 0,n.enabled=!0,n.Cues=void 0,n.textTracks=[],n.tracks=[],n.initPTS=[],n.unparsedVttFrags=[],n.cueRanges=[],n.captionsTracks={},n.captionsProperties=void 0,n.cea608Parser=void 0,n.lastSn=-1,n.prevCC=-1,n.vttCCs=null,n.hls=t,n.config=t.config,n.Cues=t.config.cueHandler,n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode}},n.config.enableCEA708Captions){var i=new Nt(Ut(n),"textTrack1"),r=new Nt(Ut(n),"textTrack2");n.cea608Parser=new Pt(0,i,r)}return n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.addCues=function(e,t,n,i){for(var r=this.cueRanges,a=!1,o=r.length;o--;){var s=r[o],l=Gt(s[0],s[1],t,n);if(l>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],n),a=!0,l/(n-t)>.5))return}a||r.push([t,n]),this.Cues.newCue(this.captionsTracks[e],t,n,i)},r.onInitPtsFound=function(e){var t=this,n=e.frag,i=e.id,r=e.initPTS,a=this.unparsedVttFrags;"main"===i&&(this.initPTS[n.cc]=r),a.length&&(this.unparsedVttFrags=[],a.forEach(function(e){t.onFragLoaded(e)}))},r.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var i=t.textTracks[n];if(i[e])return i}return null},r.createCaptionsTrack=function(e){var t=this.captionsProperties,n=this.captionsTracks,i=this.media,r=t[e],a=r.label,o=r.languageCode;if(!n[e]){var s=this.getExistingTrack(e);if(s)n[e]=s,Be(n[e]),Fe(n[e],i);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},r.createTextTrack=function(e,t,n){var i=this.media;if(i)return i.addTextTrack(e,t,n)},r.destroy=function(){e.prototype.destroy.call(this)},r.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},r.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach(function(t){Be(e[t]),delete e[t]})},r.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},r._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Be(t[n])}},r.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cueRanges=[],this.config.enableWebVTT){this.tracks=e.subtitles||[];var n=this.media?this.media.textTracks:[];this.tracks.forEach(function(e,i){var r;if(i<n.length){for(var a=null,o=0;o<n.length;o++)if(jt(n[o],e)){a=n[o];break}a&&(r=a)}r||(r=t.createTextTrack("subtitles",e.name,e.lang)),e.default?r.mode=t.hls.subtitleDisplay?"showing":"hidden":r.mode="disabled",t.textTracks.push(r)})}},r.onFragLoaded=function(e){var t=e.frag,n=e.payload,i=this.cea608Parser,r=this.initPTS,a=this.lastSn,o=this.unparsedVttFrags;if("main"===t.type){var s=t.sn;t.sn!==a+1&&i&&i.reset(),this.lastSn=s}else if("subtitle"===t.type)if(n.byteLength){if(!Object(l.isFiniteNumber)(r[t.cc]))return o.push(e),void(r.length&&this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t}));var d=t.decryptdata;null!=d&&null!=d.key&&"AES-128"===d.method||this._parseVTTs(t,n)}else this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},r._parseVTTs=function(e,t){var n=this.hls,i=this.prevCC,r=this.textTracks,a=this.vttCCs;a[e.cc]||(a[e.cc]={start:e.start,prevCC:i,new:!0},this.prevCC=e.cc),Bt.parse(t,this.initPTS[e.cc],a,e.cc,function(t){var i=r[e.level];"disabled"!==i.mode?(t.forEach(function(e){if(!i.cues.getCueById(e.id))try{if
vendor: 1,403 bytes, line 144
144(i.addCue(e),!i.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(n){d.logger.debug("Failed occurred on adding cues: "+n);var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,i.addCue(t)}}),n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})):n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})},function(t){d.logger.log("Failed to parse VTT cue: "+t),n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})})},r.onFragDecrypted=function(e){var t=e.frag,n=e.payload;if("subtitle"===t.type){if(!Object(l.isFiniteNumber)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(e);this._parseVTTs(t,n)}},r.onFragParsingUserdata=function(e){if(this.enabled&&this.cea608Parser)for(var t=0;t<e.samples.length;t++){var n=e.samples[t].bytes;if(n){var i=this.extractCea608Data(n);this.cea608Parser.addData(e.samples[t].pts,i)}}},r.extractCea608Data=function(e){for(var t,n,i,r=31&e[0],a=2,o=[],s=0;s<r;s++)t=e[a++],n=127&e[a++],i=127&e[a++],0===n&&0===i||4&t&&!(3&t)&&(o.push(n),o.push(i));return o},i}(h);function Ht(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function zt(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];"subtitles"===i.kind&&i.label&&t.push(e[n])}return t}var Wt,qt=function(e){var t,n;function i(t){var n;
vendor: 7,907 bytes, line 144
144return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADED,u.default.SUBTITLE_TRACK_LOADED)||this).tracks=[],n.trackId=-1,n.media=null,n.stopped=!0,n.subtitleDisplay=!0,n.queuedDefaultTrack=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,s=i.prototype;return s.destroy=function(){h.prototype.destroy.call(this)},s.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(Object(l.isFiniteNumber)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){t.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},s.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.isFiniteNumber)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),zt(this.media.textTracks).forEach(function(e){Be(e)}),this.subtitleTrack=-1,this.media=null)},s.onManifestLoaded=function(e){var t=this,n=e.subtitles||[];this.tracks=n,this.hls.trigger(u.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach(function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)})},s.onSubtitleTrackLoaded=function(e){var t=this,n=e.id,i=e.details,r=this.trackId,a=this.tracks,o=a[r];if(n>=a.length||n!==r||!o||this.stopped)this._clearReloadTimer();else if(d.logger.log("subtitle track "+n+" loaded"),i.live){var s=ae(o.details,i,e.stats.trequest);d.logger.log("Reloading live subtitle playlist in "+s+"ms"),this.timer=setTimeout(function(){t._loadCurrentTrack()},s)}else this._clearReloadTimer()},s.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},s.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},s._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},s._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,n=this.hls,i=t[e];e<0||!i||i.details&&!i.details.live||(d.logger.log("Loading subtitle track "+e),n.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:i.url,id:e}))},s._toggleTrackModes=function(e){var t=this.media,n=this.subtitleDisplay,i=this.trackId;if(t){var r=zt(t.textTracks);if(-1===e)[].slice.call(r).forEach(function(e){e.mode="disabled"});else{var a=r[i];a&&(a.mode="disabled")}var o=r[e];o&&(o.mode=n?"showing":"hidden")}},s._setSubtitleTrackInternal=function(e){var t=this.hls,n=this.tracks;!Object(l.isFiniteNumber)(e)||e<-1||e>=n.length||(this.trackId=e,d.logger.log("Switching to subtitle track "+e),t.trigger(u.default.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())},s._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=zt(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack=e}},r=i,(a=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))}}])&&Ht(r.prototype,a),o&&Ht(r,o),i}(h),Yt=n("./src/crypt/decrypter.js"),Kt=window.performance,Xt=function(e){var t,n;function i(t,n){var i;return(i=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.ERROR,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.SUBTITLE_TRACKS_UPDATED,u.default.SUBTITLE_TRACK_SWITCH,u.default.SUBTITLE_TRACK_LOADED,u.default.SUBTITLE_FRAG_PROCESSED,u.default.LEVEL_UPDATED)||this).fragmentTracker=n,i.config=t.config,i.state=me,i.tracks=[],i.tracksBuffered=[],i.currentTrackId=-1,i.decrypter=new Yt.default(t,t.config),i.lastAVStart=0,i._onMediaSeeking=i.onMediaSeeking.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.onSubtitleFragProcessed=function(e){var t=e.frag,n=e.success;if(this.fragPrevious=t,this.state=ve,n){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var r,a=t.start,o=0;o<i.length;o++)if(a>=i[o].start&&a<=i[o].end){r=i[o];break}var s=t.start+t.duration;r?r.end=s:(r={start:a,end:s},i.push(r))}}},r.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=ve},r.onMediaDetaching=function(){var e=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(t){e.tracksBuffered[t.id]=[]}),this.media=null,this.state=me)},r.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=ve)},r.onSubtitleTracksUpdated=function(e){var t=this;d.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach(function(e){t.tracksBuffered[e.id]=[]})},r.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},r.onSubtitleTrackLoaded=function(e){var t=e.id,n=e.details,i=this.currentTrackId,r=this.tracks,a=r[i];t>=r.length||t!==i||!a||(n.live&&function(e,t,n){void 0===n&&(n=0);var i=-1;re(e,t,function(e,t,n){t.start=e.start,i=n});var r=t.fragments;if(i<0)r.forEach(function(e){e.start+=n});else for(var a=i+1;a<r.length;a++)r[a].start=r[a-1].start+r[a-1].duration}(a.details,n,this.lastAVStart),a.details=n,this.setInterval(500))},r.onKeyLoaded=function(){this.state===_e&&(this.state=ve)},r.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,i=e.frag,r=this.hls;if(this.state===Ee&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var a=Kt.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,function(e){var t=Kt.now();r.trigger(u.default.FRAG_DECRYPTED,{frag:i,payload:e,stats:{tstart:a,tdecrypt:t}})})}},r.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},r.doTick=function(){if(this.media)switch(this.state){case ve:var e=this.config,t=this.currentTrackId,n=this.fragmentTracker,i=this.media,r=this.tracks;if(!r||!r[t]||!r[t].details)break;var a,o=e.maxBufferHole,s=e.maxFragLookUpTolerance,l=Math.min(e.maxBufferLength,e.maxMaxBufferLength),c=z.bufferedInfo(this._getBuffered(),i.currentTime,o),f=c.end,h=c.len,p=r[t].details,m=p.fragments,g=m.length,v=m[g-1].start+m[g-1].duration;if(h>l)return;var y=this.fragPrevious;f<v?(y&&p.hasProgramDateTime&&(a=ue(m,y.endProgramDateTime,s)),a||(a=de(y,m,f,s))):a=m[g-1],a&&a.encrypted?(d.logger.log("Loading key for "+a.sn),this.state=_e,this.hls.trigger(u.default.KEY_LOADING,{frag:a})):a&&n.getState(a)===B&&(this.fragCurrent=a,this.state=Ee,this.hls.trigger(u.default.FRAG_LOADING,{frag:a}))}else this.state=ve},r.stopLoad=function(){this.lastAVStart=0,e.prototype.stopLoad.call(this)},r._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},r.onMediaSeeking=function(){this.fragPrevious=null},i}(Ie);!function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(Wt||(Wt={}));var Qt="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function Zt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Jt=function(e){var t,n;function i(t){var n;
vendor: 1,675 bytes, line 144
144return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHED,u.default.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,n._licenseXhrSetup=void 0,n._emeEnabled=void 0,n._requestMediaKeySystemAccess=void 0,n._config=void 0,n._mediaKeysList=[],n._media=null,n._hasSetMediaKeys=!1,n._requestLicenseFailureCount=0,n._onMediaEncrypted=function(e){d.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),n._attemptSetMediaKeys(),n._generateRequestWithPreferredKeySession(e.initDataType,e.initData)},n._config=t.config,n._widevineLicenseUrl=n._config.widevineLicenseUrl,n._licenseXhrSetup=n._config.licenseXhrSetup,n._emeEnabled=n._config.emeEnabled,n._requestMediaKeySystemAccess=n._config.requestMediaKeySystemAccessFunc,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o,l=i.prototype;return l.getLicenseServerUrl=function(e){switch(e){case Wt.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},l._attemptKeySystemAccess=function(e,t,n){var i=this,r=function(e,t,n){if(e===Wt.WIDEVINE)return function(e,t){var n={videoCapabilities:[]};return t.forEach(function(e){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})}),[n]}(0,n);throw new Error("Unknown key-system: "+e)}(e,0,n);d.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,r).then(function(t){i._onMediaKeySystemAccessObtained(e,t)}).catch(function(t){d.logger.error('Failed to obtain key-system "'+e+'" access:',t)})},l._onMediaKeySystemAccessObtained=function(e,t){var n=this;
vendor: 6,027 bytes, line 144
144d.logger.log('Access for key-system "'+e+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(i),t.createMediaKeys().then(function(t){i.mediaKeys=t,d.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated()}).catch(function(e){d.logger.error("Failed to create media-keys:",e)})},l._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach(function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))})},l._onNewMediaKeySession=function(e){var t=this;d.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",function(n){t._onKeySessionMessage(e,n.message)},!1)},l._onKeySessionMessage=function(e,t){d.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(t){d.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)})},l._attemptSetMediaKeys=function(){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return d.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});d.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(e,t){var n=this,i=this._mediaKeysList[0];if(!i)return d.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(i.mediaKeysSessionInitialized)d.logger.warn("Key-Session already initialized but requested again");else{var r=i.mediaKeysSession;if(!r)return d.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return d.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});d.logger.log('Generating key-session request for "'+e+'" init data type'),i.mediaKeysSessionInitialized=!0,r.generateRequest(e,t).then(function(){d.logger.debug("Key-session generation succeeded")}).catch(function(e){d.logger.error("Error generating key-session request:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})}},l._createLicenseXhr=function(e,t,n){var i=new XMLHttpRequest,r=this._licenseXhrSetup;try{if(r)try{r(i,e)}catch(t){i.open("POST",e,!0),r(i,e)}i.readyState||i.open("POST",e,!0)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,e,t,n),i},l._onLicenseRequestReadyStageChange=function(e,t,n,i){if(4===e.readyState)if(200===e.status)this._requestLicenseFailureCount=0,d.logger.log("License request succeeded"),"arraybuffer"!==e.responseType&&d.logger.warn("xhr response type was not set to the expected arraybuffer for license request"),i(e.response);else{if(d.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var r=3-this._requestLicenseFailureCount+1;d.logger.warn("Retrying license request, "+r+" attempts left"),this._requestLicense(n,i)}},l._generateLicenseRequestChallenge=function(e,t){if(e.mediaKeySystemDomain===Wt.WIDEVINE)return t;throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},l._requestLicense=function(e,t){d.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return d.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var i=this.getLicenseServerUrl(n.mediaKeySystemDomain),r=this._createLicenseXhr(i,e,t);d.logger.log("Sending license request to URL: "+i);var a=this._generateLicenseRequestChallenge(n,e);r.send(a)}catch(e){d.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(e){if(this._emeEnabled){var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},l.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},l.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map(function(e){return e.audioCodec}),n=e.levels.map(function(e){return e.videoCodec});this._attemptKeySystemAccess(Wt.WIDEVINE,t,n)}},r=i,(a=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&Zt(r.prototype,a),o&&Zt(r,o),i}(h);function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var en=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
vendor: 4,947 bytes, line 144
144))),i.forEach(function(t){$t(e,t,n[t])})}return e}({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:et,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:ze,bufferController:qe,capLevelController:Ke,fpsController:Qe,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:Qt},{cueHandler:i,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"},{subtitleStreamController:Xt,subtitleTrackController:qt,timelineController:Vt,audioStreamController:at,audioTrackController:nt,emeController:Jt});function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function an(e,t,n){return t&&rn(e.prototype,t),n&&rn(e,n),e}n.d(t,"default",function(){return on});var on=function(e){var t,n;function i(t){var n;void 0===t&&(t={}),(n=e.call(this)||this).config=void 0,n._autoLevelCapping=void 0,n.abrController=void 0,n.capLevelController=void 0,n.levelController=void 0,n.streamController=void 0,n.networkControllers=void 0,n.audioTrackController=void 0,n.subtitleTrackController=void 0,n.emeController=void 0,n.coreComponents=void 0,n.media=null,n.url=null;var r=i.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");n.config=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){tn(e,t,n[t])})}return e}({},r,t);var a=nn(n).config;if(void 0!==a.liveMaxLatencyDurationCount&&a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==a.liveMaxLatencyDuration&&(void 0===a.liveSyncDuration||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(d.enableLogs)(a.debug),n._autoLevelCapping=-1;var o=n.abrController=new a.abrController(nn(n)),s=new a.bufferController(nn(n)),l=n.capLevelController=new a.capLevelController(nn(n)),u=new a.fpsController(nn(n)),c=new N(nn(n)),f=new k(nn(n)),h=new F(nn(n)),p=new Ue(nn(n)),m=n.levelController=new Ne(nn(n)),g=new V(nn(n)),v=[m,n.streamController=new Oe(nn(n),g)],y=a.audioStreamController;y&&v.push(new y(nn(n),g)),n.networkControllers=v;var _=[c,f,h,o,s,l,u,p,g];if(y=a.audioTrackController){var E=new y(nn(n));n.audioTrackController=E,_.push(E)}if(y=a.subtitleTrackController){var b=new y(nn(n));n.subtitleTrackController=b,v.push(b)}if(y=a.emeController){var T=new y(nn(n));n.emeController=T,_.push(T)}return(y=a.subtitleStreamController)&&v.push(new y(nn(n),g)),(y=a.timelineController)&&_.push(new y(nn(n))),n.coreComponents=_,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.isSupported=function(){return function(){var e=K();if(!e)return!1;var t=self.SourceBuffer||self.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupp
vendor: 4,788 bytes, line 144
144orted&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!i}()},an(i,null,[{key:"version",get:function(){return"0.13.2"}},{key:"Events",get:function(){return u.default}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:en},set:function(e){i.defaultConfig=e}}]);var r=i.prototype;return r.destroy=function(){d.logger.log("destroy"),this.trigger(u.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(e){e.destroy()}),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},r.attachMedia=function(e){d.logger.log("attachMedia"),this.media=e,this.trigger(u.default.MEDIA_ATTACHING,{media:e})},r.detachMedia=function(){d.logger.log("detachMedia"),this.trigger(u.default.MEDIA_DETACHING),this.media=null},r.loadSource=function(e){e=o.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),d.logger.log("loadSource:"+e),this.url=e,this.trigger(u.default.MANIFEST_LOADING,{url:e})},r.startLoad=function(e){void 0===e&&(e=-1),d.logger.log("startLoad("+e+")"),this.networkControllers.forEach(function(t){t.startLoad(e)})},r.stopLoad=function(){d.logger.log("stopLoad"),this.networkControllers.forEach(function(e){e.stopLoad()})},r.swapAudioCodec=function(){d.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},r.recoverMediaError=function(){d.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),e&&this.attachMedia(e)},an(i,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){d.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){d.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){d.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){d.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){d.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){d.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"bandwidthEstimate",get:function(){var e=this.abrController._bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,n=e?e.length:0,i=0;i<n;i++)if((e[i].realBitrate?Math.max(e[i].realBitrate,e[i].bitrate):e[i].bitrate)>t)return i;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}
144,set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),i}(Q);on.defaultConfig=void 0},
144"./src/polyfills/number-isFinite.js":
145/*!******************************************!*\
146  !*** ./src/polyfills/number-isFinite.js ***!
147  \******************************************/
148/*! exports provided: isFiniteNumber */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",function(){return i});var i=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)}},
148"./src/utils/get-self-scope.js":
149/*!*************************************!*\
150  !*** ./src/utils/get-self-scope.js ***!
151  \*************************************/
152/*! exports provided: getSelfScope */function(e,t,n){"use strict";function i(){return"undefined"==typeof window?self:window}n.r(t),n.d(t,"getSelfScope",function(){return i})},
vendor: 939 bytes, lines 152-156
152"./src/utils/logger.js":
153/*!*****************************!*\
154  !*** ./src/utils/logger.js ***!
155  \*****************************/
156/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",function(){return u}),n.d(t,"logger",function(){return d});var i=n(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function r(){}var a={trace:r,debug:r,log:r,warn:r,info:r,error:r},o=a,s=Object(i.getSelfScope)();function l(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];n.forEach(function(t){o[t]=e[t]?e[t].bind(e):function(e){var t=s.console[e];return t?function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i[0]&&(i[0]=function(e,t){return"["+e+"] > "+t}(e,i[0])),t.apply(s.console,i)}:r}(t)})}var u=function(e){if(s.console&&!0===e||"object"==typeof e){l(e,"debug","log","info","warn","error");try{o.log()}catch(e){o=a}}else o=a},d=o}
156}).default},e.exports=i())}]]);
157//# sourceMappingURL=vendors.js.map

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.