@shjjs/visual-ui 3.0.30 → 3.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/Media/components/Image/index.vue.mjs +2 -2
- package/es/components/Media/components/Image/index.vue2.mjs +12 -12
- package/es/components/Media/components/Image/version.mjs +11 -11
- package/es/components/Media/components/ImageDynamic/index.vue.mjs +2 -2
- package/es/components/Media/components/ImageDynamic/index.vue2.mjs +27 -27
- package/es/components/Media/components/ImageDynamic/version.mjs +12 -12
- package/es/components/Scene/components/Default/index.vue.mjs +2 -2
- package/es/components/Scene/components/Default/index.vue2.mjs +14 -14
- package/es/components/Scene/components/Default/version.mjs +24 -6
- package/es/packages/components/Media/components/Image/index.vue.d.ts +1 -0
- package/es/packages/components/Media/components/Image/types.d.ts +2 -2
- package/es/packages/components/Media/components/ImageDynamic/index.vue.d.ts +1 -0
- package/es/packages/components/Media/components/ImageDynamic/types.d.ts +2 -2
- package/es/packages/components/Scene/components/Default/index.vue.d.ts +1 -0
- package/es/packages/components/Scene/components/Default/types.d.ts +2 -0
- package/es/widgets.css +1 -1
- package/package.json +1 -1
- package/umd/index.js +2 -2
- package/umd/widgets.css +1 -1
package/umd/index.js
CHANGED
|
@@ -50,7 +50,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
50
50
|
`:""}
|
|
51
51
|
`),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;const{params:t,passedParams:r}=t4t(this);this.swiperParams=t,this.passedParams=r,delete this.swiperParams.init,this.render(),this.swiper=new CC(this.shadowRoot.querySelector(".swiper"),{...t.virtual?{}:{observer:!0},...t,touchEventsTarget:"container",onAny:function(n){n==="observerUpdate"&&e.calcSlideSlots();const s=t.eventsPrefix?`${t.eventsPrefix}${n.toLowerCase()}`:n.toLowerCase();for(var a=arguments.length,o=new Array(a>1?a-1:0),l=1;l<a;l++)o[l-1]=arguments[l];const u=new CustomEvent(s,{detail:o,bubbles:n!=="hashChange",cancelable:!0});e.dispatchEvent(u)}})}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){const{params:r,passedParams:n}=t4t(this,e,t);this.passedParams=n,this.swiperParams=r,!(this.swiper&&this.swiper.params[e]===t)&&Dyi({swiper:this.swiper,passedParams:this.passedParams,changedParams:[eue(e)],...e==="navigation"&&n[e]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{},...e==="pagination"&&n[e]?{paginationEl:".swiper-pagination"}:{},...e==="scrollbar"&&n[e]?{scrollbarEl:".swiper-scrollbar"}:{}})}attributeChangedCallback(e,t,r){this.swiper&&this.swiper.initialized&&(t==="true"&&r===null&&(r=!1),this.updateSwiperOnPropChange(e,r))}static get observedAttributes(){return $le.filter(t=>t.includes("_")).map(t=>t.replace(/[A-Z]/g,r=>`-${r}`).replace("_","").toLowerCase())}}$le.forEach(i=>{i!=="init"&&(i=i.replace("_",""),Object.defineProperty(s4t.prototype,i,{configurable:!0,get(){return(this.passedParams||{})[i]},set(e){this.passedParams||(this.passedParams={}),this.passedParams[i]=e,this.swiper&&this.swiper.initialized&&this.updateSwiperOnPropChange(i,e)}}))});class Ryi extends r4t{constructor(){super(),this.attachShadow({mode:"open"})}render(){const e=this.lazy||this.getAttribute("lazy")===""||this.getAttribute("lazy")==="true";if(n4t(this.shadowRoot,Eyi),this.shadowRoot.appendChild(document.createElement("slot")),e){const t=document.createElement("div");t.classList.add("swiper-lazy-preloader"),t.part.add("preloader"),this.shadowRoot.appendChild(t)}}initialize(){this.render()}connectedCallback(){this.swiperLoopMoveDOM||this.initialize()}}const a4t=()=>{typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",s4t),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",Ryi))};typeof window<"u"&&(window.SwiperElementRegisterParams=i=>{$le.push(...i)});const o4t="2.0.0",wyi=i=>{const e=Zt.cloneDeep(i);return e.version!==o4t?{carousel:{photoGallery:e.photoGallery,pagination:e.pagination,freeMode:e.freeMode,reverseDirection:e.reverseDirection,slidesPerView:e.slidesPerView,speed:e.speed,spaceBetween:e.spaceBetween,autoplay:e.autoplay,pauseOnMouseEnter:e.pauseOnMouseEnter,delay:e.delay,paginationType:e.paginationType,rewind:e.rewind,loop:e.loop,grabCursor:e.grabCursor,effect:e.effect,stopOnLastSlide:e.stopOnLastSlide,roundLengths:e.roundLengths,direction:e.direction},version:o4t}:i},Fyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.option),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0}),ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},Byi=["src"],Pyi=Kt({...Kt({name:"ShjCarousel"}),props:{option:{},sources:{},useEvents:{}},setup(i,{expose:e}){a4t();const t=kr(()=>wyi(i.option)),r=Wt(So()),n=()=>{r.value=So()};return na(()=>{Ha(()=>{n()})}),Fyi({option:t.value,sources:i.sources},n),e({refresh:()=>n(),refreshView:()=>n(),refreshData:()=>n()}),(s,a)=>{const o=NS("swiper-slide"),l=NS("swiper-container");return wt(),Ni(l,{key:r.value,class:"carousel",direction:t.value.carousel.direction,speed:t.value.carousel.speed,"round-lengths":t.value.carousel.roundLengths,"grab-cursor":t.value.carousel.grabCursor,rewind:t.value.carousel.rewind,loop:t.value.carousel.loop,"slides-per-view":t.value.carousel.slidesPerView,"space-between":t.value.carousel.spaceBetween,autoplay:t.value.carousel.autoplay,delay:t.value.carousel.delay,"stop-on-last-slide":t.value.carousel.stopOnLastSlide,"reverse-direction":t.value.carousel.reverseDirection,"pause-on-mouse-enter":t.value.carousel.pauseOnMouseEnter,"free-mode":t.value.carousel.freeMode,effect:t.value.carousel.effect,pagination:t.value.carousel.pagination,"pagination-type":t.value.carousel.paginationType},{default:po(()=>[(wt(!0),Ir(Zs,null,ol(t.value.carousel.photoGallery,(u,c)=>(wt(),Ni(o,{key:c},{default:po(()=>[vi("img",{class:"image",src:u.url,alt:""},null,8,Byi)]),_:2},1024))),128))]),_:1},8,["direction","speed","round-lengths","grab-cursor","rewind","loop","slides-per-view","space-between","autoplay","delay","stop-on-last-slide","reverse-direction","pause-on-mouse-enter","free-mode","effect","pagination","pagination-type"])}}}),l4t=Zi(zl(Pyi,[["__scopeId","data-v-7c84b75a"]]));var d8e={exports:{}},u4t;function Myi(){return u4t||(u4t=1,(function(i,e){(function(r,n){i.exports=n()})(self,function(){return(function(){var t={"./node_modules/es6-promise/dist/es6-promise.js":(function(a,o,l){(function(u,c){a.exports=c()})(this,(function(){function u(ke){var ft=typeof ke;return ke!==null&&(ft==="object"||ft==="function")}function c(ke){return typeof ke=="function"}var d=void 0;Array.isArray?d=Array.isArray:d=function(ke){return Object.prototype.toString.call(ke)==="[object Array]"};var h=d,p=0,g=void 0,x=void 0,v=function(ft,xt){z[p]=ft,z[p+1]=xt,p+=2,p===2&&(x?x(Z):K())};function y(ke){x=ke}function I(ke){v=ke}var S=typeof window<"u"?window:void 0,T=S||{},E=T.MutationObserver||T.WebKitMutationObserver,B=typeof self>"u"&&typeof process<"u"&&{}.toString.call(process)==="[object process]",P=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function M(){return function(){return process.nextTick(Z)}}function O(){return typeof g<"u"?function(){g(Z)}:U()}function k(){var ke=0,ft=new E(Z),xt=document.createTextNode("");return ft.observe(xt,{characterData:!0}),function(){xt.data=ke=++ke%2}}function V(){var ke=new MessageChannel;return ke.port1.onmessage=Z,function(){return ke.port2.postMessage(0)}}function U(){var ke=setTimeout;return function(){return ke(Z,1)}}var z=new Array(1e3);function Z(){for(var ke=0;ke<p;ke+=2){var ft=z[ke],xt=z[ke+1];ft(xt),z[ke]=void 0,z[ke+1]=void 0}p=0}function j(){try{var ke=Function("return this")().require("vertx");return g=ke.runOnLoop||ke.runOnContext,O()}catch{return U()}}var K=void 0;B?K=M():E?K=k():P?K=V():S===void 0?K=j():K=U();function J(ke,ft){var xt=this,It=new this.constructor(ne);It[ie]===void 0&&Vt(It);var Pt=xt._state;if(Pt){var Mr=arguments[Pt-1];v(function(){return je(Pt,It,Mr,xt._result)})}else He(xt,It,ke,ft);return It}function q(ke){var ft=this;if(ke&&typeof ke=="object"&&ke.constructor===ft)return ke;var xt=new ft(ne);return Ne(xt,ke),xt}var ie=Math.random().toString(36).substring(2);function ne(){}var le=void 0,de=1,he=2;function ge(){return new TypeError("You cannot resolve a promise with itself")}function ce(){return new TypeError("A promises callback cannot return that same promise.")}function me(ke,ft,xt,It){try{ke.call(ft,xt,It)}catch(Pt){return Pt}}function te(ke,ft,xt){v(function(It){var Pt=!1,Mr=me(xt,ft,function(Kr){Pt||(Pt=!0,ft!==Kr?Ne(It,Kr):Ae(It,Kr))},function(Kr){Pt||(Pt=!0,Oe(It,Kr))},"Settle: "+(It._label||" unknown promise"));!Pt&&Mr&&(Pt=!0,Oe(It,Mr))},ke)}function fe(ke,ft){ft._state===de?Ae(ke,ft._result):ft._state===he?Oe(ke,ft._result):He(ft,void 0,function(xt){return Ne(ke,xt)},function(xt){return Oe(ke,xt)})}function Te(ke,ft,xt){ft.constructor===ke.constructor&&xt===J&&ft.constructor.resolve===q?fe(ke,ft):xt===void 0?Ae(ke,ft):c(xt)?te(ke,ft,xt):Ae(ke,ft)}function Ne(ke,ft){if(ke===ft)Oe(ke,ge());else if(u(ft)){var xt=void 0;try{xt=ft.then}catch(It){Oe(ke,It);return}Te(ke,ft,xt)}else Ae(ke,ft)}function Le(ke){ke._onerror&&ke._onerror(ke._result),Ee(ke)}function Ae(ke,ft){ke._state===le&&(ke._result=ft,ke._state=de,ke._subscribers.length!==0&&v(Ee,ke))}function Oe(ke,ft){ke._state===le&&(ke._state=he,ke._result=ft,v(Le,ke))}function He(ke,ft,xt,It){var Pt=ke._subscribers,Mr=Pt.length;ke._onerror=null,Pt[Mr]=ft,Pt[Mr+de]=xt,Pt[Mr+he]=It,Mr===0&&ke._state&&v(Ee,ke)}function Ee(ke){var ft=ke._subscribers,xt=ke._state;if(ft.length!==0){for(var It=void 0,Pt=void 0,Mr=ke._result,Kr=0;Kr<ft.length;Kr+=3)It=ft[Kr],Pt=ft[Kr+xt],It?je(xt,It,Pt,Mr):Pt(Mr);ke._subscribers.length=0}}function je(ke,ft,xt,It){var Pt=c(xt),Mr=void 0,Kr=void 0,_i=!0;if(Pt){try{Mr=xt(It)}catch(Ar){_i=!1,Kr=Ar}if(ft===Mr){Oe(ft,ce());return}}else Mr=It;ft._state!==le||(Pt&&_i?Ne(ft,Mr):_i===!1?Oe(ft,Kr):ke===de?Ae(ft,Mr):ke===he&&Oe(ft,Mr))}function lt(ke,ft){try{ft(function(It){Ne(ke,It)},function(It){Oe(ke,It)})}catch(xt){Oe(ke,xt)}}var At=0;function gt(){return At++}function Vt(ke){ke[ie]=At++,ke._state=void 0,ke._result=void 0,ke._subscribers=[]}function yt(){return new Error("Array Methods must be provided an Array")}var Dt=(function(){function ke(ft,xt){this._instanceConstructor=ft,this.promise=new ft(ne),this.promise[ie]||Vt(this.promise),h(xt)?(this.length=xt.length,this._remaining=xt.length,this._result=new Array(this.length),this.length===0?Ae(this.promise,this._result):(this.length=this.length||0,this._enumerate(xt),this._remaining===0&&Ae(this.promise,this._result))):Oe(this.promise,yt())}return ke.prototype._enumerate=function(xt){for(var It=0;this._state===le&&It<xt.length;It++)this._eachEntry(xt[It],It)},ke.prototype._eachEntry=function(xt,It){var Pt=this._instanceConstructor,Mr=Pt.resolve;if(Mr===q){var Kr=void 0,_i=void 0,Ar=!1;try{Kr=xt.then}catch(Tr){Ar=!0,_i=Tr}if(Kr===J&&xt._state!==le)this._settledAt(xt._state,It,xt._result);else if(typeof Kr!="function")this._remaining--,this._result[It]=xt;else if(Pt===Ue){var rr=new Pt(ne);Ar?Oe(rr,_i):Te(rr,xt,Kr),this._willSettleAt(rr,It)}else this._willSettleAt(new Pt(function(Tr){return Tr(xt)}),It)}else this._willSettleAt(Mr(xt),It)},ke.prototype._settledAt=function(xt,It,Pt){var Mr=this.promise;Mr._state===le&&(this._remaining--,xt===he?Oe(Mr,Pt):this._result[It]=Pt),this._remaining===0&&Ae(Mr,this._result)},ke.prototype._willSettleAt=function(xt,It){var Pt=this;He(xt,void 0,function(Mr){return Pt._settledAt(de,It,Mr)},function(Mr){return Pt._settledAt(he,It,Mr)})},ke})();function Pe(ke){return new Dt(this,ke).promise}function Se(ke){var ft=this;return h(ke)?new ft(function(xt,It){for(var Pt=ke.length,Mr=0;Mr<Pt;Mr++)ft.resolve(ke[Mr]).then(xt,It)}):new ft(function(xt,It){return It(new TypeError("You must pass an array to race."))})}function Qe(ke){var ft=this,xt=new ft(ne);return Oe(xt,ke),xt}function be(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ve(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Ue=(function(){function ke(ft){this[ie]=gt(),this._result=this._state=void 0,this._subscribers=[],ne!==ft&&(typeof ft!="function"&&be(),this instanceof ke?lt(this,ft):Ve())}return ke.prototype.catch=function(xt){return this.then(null,xt)},ke.prototype.finally=function(xt){var It=this,Pt=It.constructor;return c(xt)?It.then(function(Mr){return Pt.resolve(xt()).then(function(){return Mr})},function(Mr){return Pt.resolve(xt()).then(function(){throw Mr})}):It.then(xt,xt)},ke})();Ue.prototype.then=J,Ue.all=Pe,Ue.race=Se,Ue.resolve=q,Ue.reject=Qe,Ue._setScheduler=y,Ue._setAsap=I,Ue._asap=v;function qe(){var ke=void 0;if(typeof l.g<"u")ke=l.g;else if(typeof self<"u")ke=self;else try{ke=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var ft=ke.Promise;if(ft){var xt=null;try{xt=Object.prototype.toString.call(ft.resolve())}catch{}if(xt==="[object Promise]"&&!ft.cast)return}ke.Promise=Ue}return Ue.polyfill=qe,Ue.Promise=Ue,Ue}))}),"./node_modules/events/events.js":(function(a){var o=typeof Reflect=="object"?Reflect:null,l=o&&typeof o.apply=="function"?o.apply:function(U,z,Z){return Function.prototype.apply.call(U,z,Z)},u;o&&typeof o.ownKeys=="function"?u=o.ownKeys:Object.getOwnPropertySymbols?u=function(U){return Object.getOwnPropertyNames(U).concat(Object.getOwnPropertySymbols(U))}:u=function(U){return Object.getOwnPropertyNames(U)};function c(V){}var d=Number.isNaN||function(U){return U!==U};function h(){h.init.call(this)}a.exports=h,a.exports.once=M,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var p=10;function g(V){if(typeof V!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof V)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return p},set:function(V){if(typeof V!="number"||V<0||d(V))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+V+".");p=V}}),h.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},h.prototype.setMaxListeners=function(U){if(typeof U!="number"||U<0||d(U))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+U+".");return this._maxListeners=U,this};function x(V){return V._maxListeners===void 0?h.defaultMaxListeners:V._maxListeners}h.prototype.getMaxListeners=function(){return x(this)},h.prototype.emit=function(U){for(var z=[],Z=1;Z<arguments.length;Z++)z.push(arguments[Z]);var j=U==="error",K=this._events;if(K!==void 0)j=j&&K.error===void 0;else if(!j)return!1;if(j){var J;if(z.length>0&&(J=z[0]),J instanceof Error)throw J;var q=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw q.context=J,q}var ie=K[U];if(ie===void 0)return!1;if(typeof ie=="function")l(ie,this,z);else for(var ne=ie.length,le=E(ie,ne),Z=0;Z<ne;++Z)l(le[Z],this,z);return!0};function v(V,U,z,Z){var j,K,J;if(g(z),K=V._events,K===void 0?(K=V._events=Object.create(null),V._eventsCount=0):(K.newListener!==void 0&&(V.emit("newListener",U,z.listener?z.listener:z),K=V._events),J=K[U]),J===void 0)J=K[U]=z,++V._eventsCount;else if(typeof J=="function"?J=K[U]=Z?[z,J]:[J,z]:Z?J.unshift(z):J.push(z),j=x(V),j>0&&J.length>j&&!J.warned){J.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+J.length+" "+String(U)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=V,q.type=U,q.count=J.length}return V}h.prototype.addListener=function(U,z){return v(this,U,z,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(U,z){return v(this,U,z,!0)};function y(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function I(V,U,z){var Z={fired:!1,wrapFn:void 0,target:V,type:U,listener:z},j=y.bind(Z);return j.listener=z,Z.wrapFn=j,j}h.prototype.once=function(U,z){return g(z),this.on(U,I(this,U,z)),this},h.prototype.prependOnceListener=function(U,z){return g(z),this.prependListener(U,I(this,U,z)),this},h.prototype.removeListener=function(U,z){var Z,j,K,J,q;if(g(z),j=this._events,j===void 0)return this;if(Z=j[U],Z===void 0)return this;if(Z===z||Z.listener===z)--this._eventsCount===0?this._events=Object.create(null):(delete j[U],j.removeListener&&this.emit("removeListener",U,Z.listener||z));else if(typeof Z!="function"){for(K=-1,J=Z.length-1;J>=0;J--)if(Z[J]===z||Z[J].listener===z){q=Z[J].listener,K=J;break}if(K<0)return this;K===0?Z.shift():B(Z,K),Z.length===1&&(j[U]=Z[0]),j.removeListener!==void 0&&this.emit("removeListener",U,q||z)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(U){var z,Z,j;if(Z=this._events,Z===void 0)return this;if(Z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Z[U]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Z[U]),this;if(arguments.length===0){var K=Object.keys(Z),J;for(j=0;j<K.length;++j)J=K[j],J!=="removeListener"&&this.removeAllListeners(J);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(z=Z[U],typeof z=="function")this.removeListener(U,z);else if(z!==void 0)for(j=z.length-1;j>=0;j--)this.removeListener(U,z[j]);return this};function S(V,U,z){var Z=V._events;if(Z===void 0)return[];var j=Z[U];return j===void 0?[]:typeof j=="function"?z?[j.listener||j]:[j]:z?P(j):E(j,j.length)}h.prototype.listeners=function(U){return S(this,U,!0)},h.prototype.rawListeners=function(U){return S(this,U,!1)},h.listenerCount=function(V,U){return typeof V.listenerCount=="function"?V.listenerCount(U):T.call(V,U)},h.prototype.listenerCount=T;function T(V){var U=this._events;if(U!==void 0){var z=U[V];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]};function E(V,U){for(var z=new Array(U),Z=0;Z<U;++Z)z[Z]=V[Z];return z}function B(V,U){for(;U+1<V.length;U++)V[U]=V[U+1];V.pop()}function P(V){for(var U=new Array(V.length),z=0;z<U.length;++z)U[z]=V[z].listener||V[z];return U}function M(V,U){return new Promise(function(z,Z){function j(J){V.removeListener(U,K),Z(J)}function K(){typeof V.removeListener=="function"&&V.removeListener("error",j),z([].slice.call(arguments))}k(V,U,K,{once:!0}),U!=="error"&&O(V,j,{once:!0})})}function O(V,U,z){typeof V.on=="function"&&k(V,"error",U,z)}function k(V,U,z,Z){if(typeof V.on=="function")Z.once?V.once(U,z):V.on(U,z);else if(typeof V.addEventListener=="function")V.addEventListener(U,function j(K){Z.once&&V.removeEventListener(U,j),z(K)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof V)}}),"./node_modules/webworkify-webpack/index.js":(function(a,o,l){function u(y){var I={};function S(E){if(I[E])return I[E].exports;var B=I[E]={i:E,l:!1,exports:{}};return y[E].call(B.exports,B,B.exports,S),B.l=!0,B.exports}S.m=y,S.c=I,S.i=function(E){return E},S.d=function(E,B,P){S.o(E,B)||Object.defineProperty(E,B,{configurable:!1,enumerable:!0,get:P})},S.r=function(E){Object.defineProperty(E,"__esModule",{value:!0})},S.n=function(E){var B=E&&E.__esModule?function(){return E.default}:function(){return E};return S.d(B,"a",B),B},S.o=function(E,B){return Object.prototype.hasOwnProperty.call(E,B)},S.p="/",S.oe=function(E){throw E};var T=S(S.s=ENTRY_MODULE);return T.default||T}var c="[\\.|\\-|\\+|\\w|/|@]+",d="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+c+").*?\\)";function h(y){return(y+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function p(y){return!isNaN(1*y)}function g(y,I,S){var T={};T[S]=[];var E=I.toString(),B=E.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!B)return T;for(var P=B[1],M=new RegExp("(\\\\n|\\W)"+h(P)+d,"g"),O;O=M.exec(E);)O[3]!=="dll-reference"&&T[S].push(O[3]);for(M=new RegExp("\\("+h(P)+'\\("(dll-reference\\s('+c+'))"\\)\\)'+d,"g");O=M.exec(E);)y[O[2]]||(T[S].push(O[1]),y[O[2]]=l(O[1]).m),T[O[2]]=T[O[2]]||[],T[O[2]].push(O[4]);for(var k=Object.keys(T),V=0;V<k.length;V++)for(var U=0;U<T[k[V]].length;U++)p(T[k[V]][U])&&(T[k[V]][U]=1*T[k[V]][U]);return T}function x(y){var I=Object.keys(y);return I.reduce(function(S,T){return S||y[T].length>0},!1)}function v(y,I){for(var S={main:[I]},T={main:[]},E={main:{}};x(S);)for(var B=Object.keys(S),P=0;P<B.length;P++){var M=B[P],O=S[M],k=O.pop();if(E[M]=E[M]||{},!(E[M][k]||!y[M][k])){E[M][k]=!0,T[M]=T[M]||[],T[M].push(k);for(var V=g(y,y[M][k],M),U=Object.keys(V),z=0;z<U.length;z++)S[U[z]]=S[U[z]]||[],S[U[z]]=S[U[z]].concat(V[U[z]])}}return T}a.exports=function(y,I){I=I||{};var S={main:l.m},T=I.all?{main:Object.keys(S.main)}:v(S,y),E="";Object.keys(T).filter(function(k){return k!=="main"}).forEach(function(k){for(var V=0;T[k][V];)V++;T[k].push(V),S[k][V]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",E=E+"var "+k+" = ("+u.toString().replace("ENTRY_MODULE",JSON.stringify(V))+")({"+T[k].map(function(U){return""+JSON.stringify(U)+": "+S[k][U].toString()}).join(",")+`});
|
|
52
52
|
`}),E=E+"new (("+u.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+T.main.map(function(k){return""+JSON.stringify(k)+": "+S.main[k].toString()}).join(",")+"}))(self);";var B=new window.Blob([E],{type:"text/javascript"});if(I.bare)return B;var P=window.URL||window.webkitURL||window.mozURL||window.msURL,M=P.createObjectURL(B),O=new window.Worker(M);return O.objectURL=M,O}}),"./src/config.js":(function(a,o,l){l.r(o),l.d(o,{defaultConfig:function(){return u},createDefaultConfig:function(){return c}});var u={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function c(){return Object.assign({},u)}}),"./src/core/features.js":(function(a,o,l){l.r(o);var u=l("./src/io/io-controller.js"),c=l("./src/config.js"),d=(function(){function h(){}return h.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},h.supportNetworkStreamIO=function(){var p=new u.default({},(0,c.createDefaultConfig)()),g=p.loaderType;return p.destroy(),g=="fetch-stream-loader"||g=="xhr-moz-chunked-loader"},h.getNetworkLoaderTypeName=function(){var p=new u.default({},(0,c.createDefaultConfig)()),g=p.loaderType;return p.destroy(),g},h.supportNativeMediaPlayback=function(p){h.videoElement==null&&(h.videoElement=window.document.createElement("video"));var g=h.videoElement.canPlayType(p);return g==="probably"||g=="maybe"},h.getFeatureList=function(){var p={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return p.mseFlvPlayback=h.supportMSEH264Playback(),p.networkStreamIO=h.supportNetworkStreamIO(),p.networkLoaderName=h.getNetworkLoaderTypeName(),p.mseLiveFlvPlayback=p.mseFlvPlayback&&p.networkStreamIO,p.nativeMP4H264Playback=h.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),p.nativeWebmVP8Playback=h.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),p.nativeWebmVP9Playback=h.supportNativeMediaPlayback('video/webm; codecs="vp9"'),p},h})();o.default=d}),"./src/core/media-info.js":(function(a,o,l){l.r(o);var u=(function(){function c(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return c.prototype.isComplete=function(){var d=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,h=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&d&&h},c.prototype.isSeekable=function(){return this.hasKeyframesIndex===!0},c.prototype.getNearestKeyframe=function(d){if(this.keyframesIndex==null)return null;var h=this.keyframesIndex,p=this._search(h.times,d);return{index:p,milliseconds:h.times[p],fileposition:h.filepositions[p]}},c.prototype._search=function(d,h){var p=0,g=d.length-1,x=0,v=0,y=g;for(h<d[0]&&(p=0,v=y+1);v<=y;)if(x=v+Math.floor((y-v)/2),x===g||h>=d[x]&&h<d[x+1]){p=x;break}else d[x]<h?v=x+1:y=x-1;return p},c})();o.default=u}),"./src/core/media-segment-info.js":(function(a,o,l){l.r(o),l.d(o,{SampleInfo:function(){return u},MediaSegmentInfo:function(){return c},IDRSampleList:function(){return d},MediaSegmentInfoList:function(){return h}});var u=(function(){function p(g,x,v,y,I){this.dts=g,this.pts=x,this.duration=v,this.originalDts=y,this.isSyncPoint=I,this.fileposition=null}return p})(),c=(function(){function p(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return p.prototype.appendSyncPoint=function(g){g.isSyncPoint=!0,this.syncPoints.push(g)},p})(),d=(function(){function p(){this._list=[]}return p.prototype.clear=function(){this._list=[]},p.prototype.appendArray=function(g){var x=this._list;g.length!==0&&(x.length>0&&g[0].originalDts<x[x.length-1].originalDts&&this.clear(),Array.prototype.push.apply(x,g))},p.prototype.getLastSyncPointBeforeDts=function(g){if(this._list.length==0)return null;var x=this._list,v=0,y=x.length-1,I=0,S=0,T=y;for(g<x[0].dts&&(v=0,S=T+1);S<=T;)if(I=S+Math.floor((T-S)/2),I===y||g>=x[I].dts&&g<x[I+1].dts){v=I;break}else x[I].dts<g?S=I+1:T=I-1;return this._list[v]},p})(),h=(function(){function p(g){this._type=g,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(p.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),p.prototype.isEmpty=function(){return this._list.length===0},p.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},p.prototype._searchNearestSegmentBefore=function(g){var x=this._list;if(x.length===0)return-2;var v=x.length-1,y=0,I=0,S=v,T=0;if(g<x[0].originalBeginDts)return T=-1,T;for(;I<=S;)if(y=I+Math.floor((S-I)/2),y===v||g>x[y].lastSample.originalDts&&g<x[y+1].originalBeginDts){T=y;break}else x[y].originalBeginDts<g?I=y+1:S=y-1;return T},p.prototype._searchNearestSegmentAfter=function(g){return this._searchNearestSegmentBefore(g)+1},p.prototype.append=function(g){var x=this._list,v=g,y=this._lastAppendLocation,I=0;y!==-1&&y<x.length&&v.originalBeginDts>=x[y].lastSample.originalDts&&(y===x.length-1||y<x.length-1&&v.originalBeginDts<x[y+1].originalBeginDts)?I=y+1:x.length>0&&(I=this._searchNearestSegmentBefore(v.originalBeginDts)+1),this._lastAppendLocation=I,this._list.splice(I,0,v)},p.prototype.getLastSegmentBefore=function(g){var x=this._searchNearestSegmentBefore(g);return x>=0?this._list[x]:null},p.prototype.getLastSampleBefore=function(g){var x=this.getLastSegmentBefore(g);return x!=null?x.lastSample:null},p.prototype.getLastSyncPointBefore=function(g){for(var x=this._searchNearestSegmentBefore(g),v=this._list[x].syncPoints;v.length===0&&x>0;)x--,v=this._list[x].syncPoints;return v.length>0?v[v.length-1]:null},p})()}),"./src/core/mse-controller.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./src/utils/logger.js"),h=l("./src/utils/browser.js"),p=l("./src/core/mse-events.js"),g=l("./src/core/media-segment-info.js"),x=l("./src/utils/exception.js"),v=(function(){function y(I){this.TAG="MSEController",this._config=I,this._emitter=new(c()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new g.IDRSampleList}return y.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},y.prototype.on=function(I,S){this._emitter.addListener(I,S)},y.prototype.off=function(I,S){this._emitter.removeListener(I,S)},y.prototype.attachMediaElement=function(I){if(this._mediaSource)throw new x.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var S=this._mediaSource=new window.MediaSource;S.addEventListener("sourceopen",this.e.onSourceOpen),S.addEventListener("sourceended",this.e.onSourceEnded),S.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=I,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),I.src=this._mediaSourceObjectURL},y.prototype.detachMediaElement=function(){if(this._mediaSource){var I=this._mediaSource;for(var S in this._sourceBuffers){var T=this._pendingSegments[S];T.splice(0,T.length),this._pendingSegments[S]=null,this._pendingRemoveRanges[S]=null,this._lastInitSegments[S]=null;var E=this._sourceBuffers[S];if(E){if(I.readyState!=="closed"){try{I.removeSourceBuffer(E)}catch(B){d.default.e(this.TAG,B.message)}E.removeEventListener("error",this.e.onSourceBufferError),E.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[S]=null,this._sourceBuffers[S]=null}}if(I.readyState==="open")try{I.endOfStream()}catch(B){d.default.e(this.TAG,B.message)}I.removeEventListener("sourceopen",this.e.onSourceOpen),I.removeEventListener("sourceended",this.e.onSourceEnded),I.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},y.prototype.appendInitSegment=function(I,S){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(I),this._pendingSegments[I.type].push(I);return}var T=I,E=""+T.container;T.codec&&T.codec.length>0&&(E+=";codecs="+T.codec);var B=!1;if(d.default.v(this.TAG,"Received Initialization Segment, mimeType: "+E),this._lastInitSegments[T.type]=T,E!==this._mimeTypes[T.type]){if(this._mimeTypes[T.type])d.default.v(this.TAG,"Notice: "+T.type+" mimeType changed, origin: "+this._mimeTypes[T.type]+", target: "+E);else{B=!0;try{var P=this._sourceBuffers[T.type]=this._mediaSource.addSourceBuffer(E);P.addEventListener("error",this.e.onSourceBufferError),P.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(M){d.default.e(this.TAG,M.message),this._emitter.emit(p.default.ERROR,{code:M.code,msg:M.message});return}}this._mimeTypes[T.type]=E}S||this._pendingSegments[T.type].push(T),B||this._sourceBuffers[T.type]&&!this._sourceBuffers[T.type].updating&&this._doAppendSegments(),h.default.safari&&T.container==="audio/mpeg"&&T.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=T.mediaDuration/1e3,this._updateMediaSourceDuration())},y.prototype.appendMediaSegment=function(I){var S=I;this._pendingSegments[S.type].push(S),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var T=this._sourceBuffers[S.type];T&&!T.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()},y.prototype.seek=function(I){for(var S in this._sourceBuffers)if(this._sourceBuffers[S]){var T=this._sourceBuffers[S];if(this._mediaSource.readyState==="open")try{T.abort()}catch(k){d.default.e(this.TAG,k.message)}this._idrList.clear();var E=this._pendingSegments[S];if(E.splice(0,E.length),this._mediaSource.readyState!=="closed"){for(var B=0;B<T.buffered.length;B++){var P=T.buffered.start(B),M=T.buffered.end(B);this._pendingRemoveRanges[S].push({start:P,end:M})}if(T.updating||this._doRemoveRanges(),h.default.safari){var O=this._lastInitSegments[S];O&&(this._pendingSegments[S].push(O),T.updating||this._doAppendSegments())}}}},y.prototype.endOfStream=function(){var I=this._mediaSource,S=this._sourceBuffers;if(!I||I.readyState!=="open"){I&&I.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}S.video&&S.video.updating||S.audio&&S.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,I.endOfStream())},y.prototype.getNearestKeyframe=function(I){return this._idrList.getLastSyncPointBeforeDts(I)},y.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var I=this._mediaElement.currentTime;for(var S in this._sourceBuffers){var T=this._sourceBuffers[S];if(T){var E=T.buffered;if(E.length>=1&&I-E.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},y.prototype._doCleanupSourceBuffer=function(){var I=this._mediaElement.currentTime;for(var S in this._sourceBuffers){var T=this._sourceBuffers[S];if(T){for(var E=T.buffered,B=!1,P=0;P<E.length;P++){var M=E.start(P),O=E.end(P);if(M<=I&&I<O+3){if(I-M>=this._config.autoCleanupMaxBackwardDuration){B=!0;var k=I-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[S].push({start:M,end:k})}}else O<I&&(B=!0,this._pendingRemoveRanges[S].push({start:M,end:O}))}B&&!T.updating&&this._doRemoveRanges()}}},y.prototype._updateMediaSourceDuration=function(){var I=this._sourceBuffers;if(!(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")&&!(I.video&&I.video.updating||I.audio&&I.audio.updating)){var S=this._mediaSource.duration,T=this._pendingMediaDuration;T>0&&(isNaN(S)||T>S)&&(d.default.v(this.TAG,"Update MediaSource duration from "+S+" to "+T),this._mediaSource.duration=T),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},y.prototype._doRemoveRanges=function(){for(var I in this._pendingRemoveRanges)if(!(!this._sourceBuffers[I]||this._sourceBuffers[I].updating))for(var S=this._sourceBuffers[I],T=this._pendingRemoveRanges[I];T.length&&!S.updating;){var E=T.shift();S.remove(E.start,E.end)}},y.prototype._doAppendSegments=function(){var I=this._pendingSegments;for(var S in I)if(!(!this._sourceBuffers[S]||this._sourceBuffers[S].updating)&&I[S].length>0){var T=I[S].shift();if(T.timestampOffset){var E=this._sourceBuffers[S].timestampOffset,B=T.timestampOffset/1e3,P=Math.abs(E-B);P>.1&&(d.default.v(this.TAG,"Update MPEG audio timestampOffset from "+E+" to "+B),this._sourceBuffers[S].timestampOffset=B),delete T.timestampOffset}if(!T.data||T.data.byteLength===0)continue;try{this._sourceBuffers[S].appendBuffer(T.data),this._isBufferFull=!1,S==="video"&&T.hasOwnProperty("info")&&this._idrList.appendArray(T.info.syncPoints)}catch(M){this._pendingSegments[S].unshift(T),M.code===22?(this._isBufferFull||this._emitter.emit(p.default.BUFFER_FULL),this._isBufferFull=!0):(d.default.e(this.TAG,M.message),this._emitter.emit(p.default.ERROR,{code:M.code,msg:M.message}))}}},y.prototype._onSourceOpen=function(){if(d.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var I=this._pendingSourceBufferInit;I.length;){var S=I.shift();this.appendInitSegment(S,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(p.default.SOURCE_OPEN)},y.prototype._onSourceEnded=function(){d.default.v(this.TAG,"MediaSource onSourceEnded")},y.prototype._onSourceClose=function(){d.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},y.prototype._hasPendingSegments=function(){var I=this._pendingSegments;return I.video.length>0||I.audio.length>0},y.prototype._hasPendingRemoveRanges=function(){var I=this._pendingRemoveRanges;return I.video.length>0||I.audio.length>0},y.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(p.default.UPDATE_END)},y.prototype._onSourceBufferError=function(I){d.default.e(this.TAG,"SourceBuffer Error: "+I)},y})();o.default=v}),"./src/core/mse-events.js":(function(a,o,l){l.r(o);var u={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};o.default=u}),"./src/core/transmuxer.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./node_modules/webworkify-webpack/index.js"),h=l.n(d),p=l("./src/utils/logger.js"),g=l("./src/utils/logging-control.js"),x=l("./src/core/transmuxing-controller.js"),v=l("./src/core/transmuxing-events.js"),y=l("./src/core/media-info.js"),I=(function(){function S(T,E){if(this.TAG="Transmuxer",this._emitter=new(c()),E.enableWorker&&typeof Worker<"u")try{this._worker=h()("./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[T,E]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},g.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:g.default.getConfig()})}catch{p.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new x.default(T,E)}else this._controller=new x.default(T,E);if(this._controller){var B=this._controller;B.on(v.default.IO_ERROR,this._onIOError.bind(this)),B.on(v.default.DEMUX_ERROR,this._onDemuxError.bind(this)),B.on(v.default.INIT_SEGMENT,this._onInitSegment.bind(this)),B.on(v.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),B.on(v.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),B.on(v.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),B.on(v.default.MEDIA_INFO,this._onMediaInfo.bind(this)),B.on(v.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),B.on(v.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),B.on(v.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),B.on(v.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return S.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),g.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},S.prototype.on=function(T,E){this._emitter.addListener(T,E)},S.prototype.off=function(T,E){this._emitter.removeListener(T,E)},S.prototype.hasWorker=function(){return this._worker!=null},S.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},S.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},S.prototype.seek=function(T){this._worker?this._worker.postMessage({cmd:"seek",param:T}):this._controller.seek(T)},S.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},S.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},S.prototype._onInitSegment=function(T,E){var B=this;Promise.resolve().then(function(){B._emitter.emit(v.default.INIT_SEGMENT,T,E)})},S.prototype._onMediaSegment=function(T,E){var B=this;Promise.resolve().then(function(){B._emitter.emit(v.default.MEDIA_SEGMENT,T,E)})},S.prototype._onLoadingComplete=function(){var T=this;Promise.resolve().then(function(){T._emitter.emit(v.default.LOADING_COMPLETE)})},S.prototype._onRecoveredEarlyEof=function(){var T=this;Promise.resolve().then(function(){T._emitter.emit(v.default.RECOVERED_EARLY_EOF)})},S.prototype._onMediaInfo=function(T){var E=this;Promise.resolve().then(function(){E._emitter.emit(v.default.MEDIA_INFO,T)})},S.prototype._onMetaDataArrived=function(T){var E=this;Promise.resolve().then(function(){E._emitter.emit(v.default.METADATA_ARRIVED,T)})},S.prototype._onScriptDataArrived=function(T){var E=this;Promise.resolve().then(function(){E._emitter.emit(v.default.SCRIPTDATA_ARRIVED,T)})},S.prototype._onStatisticsInfo=function(T){var E=this;Promise.resolve().then(function(){E._emitter.emit(v.default.STATISTICS_INFO,T)})},S.prototype._onIOError=function(T,E){var B=this;Promise.resolve().then(function(){B._emitter.emit(v.default.IO_ERROR,T,E)})},S.prototype._onDemuxError=function(T,E){var B=this;Promise.resolve().then(function(){B._emitter.emit(v.default.DEMUX_ERROR,T,E)})},S.prototype._onRecommendSeekpoint=function(T){var E=this;Promise.resolve().then(function(){E._emitter.emit(v.default.RECOMMEND_SEEKPOINT,T)})},S.prototype._onLoggingConfigChanged=function(T){this._worker&&this._worker.postMessage({cmd:"logging_config",param:T})},S.prototype._onWorkerMessage=function(T){var E=T.data,B=E.data;if(E.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(E.msg){case v.default.INIT_SEGMENT:case v.default.MEDIA_SEGMENT:this._emitter.emit(E.msg,B.type,B.data);break;case v.default.LOADING_COMPLETE:case v.default.RECOVERED_EARLY_EOF:this._emitter.emit(E.msg);break;case v.default.MEDIA_INFO:Object.setPrototypeOf(B,y.default.prototype),this._emitter.emit(E.msg,B);break;case v.default.METADATA_ARRIVED:case v.default.SCRIPTDATA_ARRIVED:case v.default.STATISTICS_INFO:this._emitter.emit(E.msg,B);break;case v.default.IO_ERROR:case v.default.DEMUX_ERROR:this._emitter.emit(E.msg,B.type,B.info);break;case v.default.RECOMMEND_SEEKPOINT:this._emitter.emit(E.msg,B);break;case"logcat_callback":p.default.emitter.emit("log",B.type,B.logcat);break}},S})();o.default=I}),"./src/core/transmuxing-controller.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./src/utils/logger.js"),h=l("./src/utils/browser.js"),p=l("./src/core/media-info.js"),g=l("./src/demux/flv-demuxer.js"),x=l("./src/remux/mp4-remuxer.js"),v=l("./src/demux/demux-errors.js"),y=l("./src/io/io-controller.js"),I=l("./src/core/transmuxing-events.js"),S=(function(){function T(E,B){this.TAG="TransmuxingController",this._emitter=new(c()),this._config=B,E.segments||(E.segments=[{duration:E.duration,filesize:E.filesize,url:E.url}]),typeof E.cors!="boolean"&&(E.cors=!0),typeof E.withCredentials!="boolean"&&(E.withCredentials=!1),this._mediaDataSource=E,this._currentSegmentIndex=0;var P=0;this._mediaDataSource.segments.forEach(function(M){M.timestampBase=P,P+=M.duration,M.cors=E.cors,M.withCredentials=E.withCredentials,B.referrerPolicy&&(M.referrerPolicy=B.referrerPolicy)}),!isNaN(P)&&this._mediaDataSource.duration!==P&&(this._mediaDataSource.duration=P),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return T.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},T.prototype.on=function(E,B){this._emitter.addListener(E,B)},T.prototype.off=function(E,B){this._emitter.removeListener(E,B)},T.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},T.prototype._loadSegment=function(E,B){this._currentSegmentIndex=E;var P=this._mediaDataSource.segments[E],M=this._ioctl=new y.default(P,this._config,E);M.onError=this._onIOException.bind(this),M.onSeeked=this._onIOSeeked.bind(this),M.onComplete=this._onIOComplete.bind(this),M.onRedirect=this._onIORedirect.bind(this),M.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),B?this._demuxer.bindDataSource(this._ioctl):M.onDataArrival=this._onInitChunkArrival.bind(this),M.open(B)},T.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},T.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},T.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},T.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},T.prototype.seek=function(E){if(!(this._mediaInfo==null||!this._mediaInfo.isSeekable())){var B=this._searchSegmentIndexContains(E);if(B===this._currentSegmentIndex){var P=this._mediaInfo.segments[B];if(P==null)this._pendingSeekTime=E;else{var M=P.getNearestKeyframe(E);this._remuxer.seek(M.milliseconds),this._ioctl.seek(M.fileposition),this._pendingResolveSeekPoint=M.milliseconds}}else{var O=this._mediaInfo.segments[B];if(O==null)this._pendingSeekTime=E,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(B);else{var M=O.getNearestKeyframe(E);this._internalAbort(),this._remuxer.seek(E),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[B].timestampBase,this._loadSegment(B,M.fileposition),this._pendingResolveSeekPoint=M.milliseconds,this._reportSegmentMediaInfo(B)}}this._enableStatisticsReporter()}},T.prototype._searchSegmentIndexContains=function(E){for(var B=this._mediaDataSource.segments,P=B.length-1,M=0;M<B.length;M++)if(E<B[M].timestampBase){P=M-1;break}return P},T.prototype._onInitChunkArrival=function(E,B){var P=this,M=null,O=0;if(B>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,O=this._demuxer.parseChunks(E,B);else if((M=g.default.probe(E)).match){this._demuxer=new g.default(M,this._config),this._remuxer||(this._remuxer=new x.default(this._config));var k=this._mediaDataSource;k.duration!=null&&!isNaN(k.duration)&&(this._demuxer.overridedDuration=k.duration),typeof k.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=k.hasAudio),typeof k.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=k.hasVideo),this._demuxer.timestampBase=k.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),O=this._demuxer.parseChunks(E,B)}else M=null,d.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){P._internalAbort()}),this._emitter.emit(I.default.DEMUX_ERROR,v.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),O=0;return O},T.prototype._onMediaInfo=function(E){var B=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},E),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,p.default.prototype));var P=Object.assign({},E);Object.setPrototypeOf(P,p.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=P,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var M=B._pendingSeekTime;B._pendingSeekTime=null,B.seek(M)})},T.prototype._onMetaDataArrived=function(E){this._emitter.emit(I.default.METADATA_ARRIVED,E)},T.prototype._onScriptDataArrived=function(E){this._emitter.emit(I.default.SCRIPTDATA_ARRIVED,E)},T.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},T.prototype._onIOComplete=function(E){var B=E,P=B+1;P<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(P)):(this._remuxer.flushStashedSamples(),this._emitter.emit(I.default.LOADING_COMPLETE),this._disableStatisticsReporter())},T.prototype._onIORedirect=function(E){var B=this._ioctl.extraData;this._mediaDataSource.segments[B].redirectedURL=E},T.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(I.default.RECOVERED_EARLY_EOF)},T.prototype._onIOException=function(E,B){d.default.e(this.TAG,"IOException: type = "+E+", code = "+B.code+", msg = "+B.msg),this._emitter.emit(I.default.IO_ERROR,E,B),this._disableStatisticsReporter()},T.prototype._onDemuxException=function(E,B){d.default.e(this.TAG,"DemuxException: type = "+E+", info = "+B),this._emitter.emit(I.default.DEMUX_ERROR,E,B)},T.prototype._onRemuxerInitSegmentArrival=function(E,B){this._emitter.emit(I.default.INIT_SEGMENT,E,B)},T.prototype._onRemuxerMediaSegmentArrival=function(E,B){if(this._pendingSeekTime==null&&(this._emitter.emit(I.default.MEDIA_SEGMENT,E,B),this._pendingResolveSeekPoint!=null&&E==="video")){var P=B.info.syncPoints,M=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,h.default.safari&&P.length>0&&P[0].originalDts===M&&(M=P[0].pts),this._emitter.emit(I.default.RECOMMEND_SEEKPOINT,M)}},T.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},T.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},T.prototype._reportSegmentMediaInfo=function(E){var B=this._mediaInfo.segments[E],P=Object.assign({},B);P.duration=this._mediaInfo.duration,P.segmentCount=this._mediaInfo.segmentCount,delete P.segments,delete P.keyframesIndex,this._emitter.emit(I.default.MEDIA_INFO,P)},T.prototype._reportStatisticsInfo=function(){var E={};E.url=this._ioctl.currentURL,E.hasRedirect=this._ioctl.hasRedirect,E.hasRedirect&&(E.redirectedURL=this._ioctl.currentRedirectedURL),E.speed=this._ioctl.currentSpeed,E.loaderType=this._ioctl.loaderType,E.currentSegmentIndex=this._currentSegmentIndex,E.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(I.default.STATISTICS_INFO,E)},T})();o.default=S}),"./src/core/transmuxing-events.js":(function(a,o,l){l.r(o);var u={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};o.default=u}),"./src/core/transmuxing-worker.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logging-control.js"),c=l("./src/utils/polyfill.js"),d=l("./src/core/transmuxing-controller.js"),h=l("./src/core/transmuxing-events.js"),p=function(g){var x=null,v=U.bind(this);c.default.install(),g.addEventListener("message",function(z){switch(z.data.cmd){case"init":x=new d.default(z.data.param[0],z.data.param[1]),x.on(h.default.IO_ERROR,O.bind(this)),x.on(h.default.DEMUX_ERROR,k.bind(this)),x.on(h.default.INIT_SEGMENT,y.bind(this)),x.on(h.default.MEDIA_SEGMENT,I.bind(this)),x.on(h.default.LOADING_COMPLETE,S.bind(this)),x.on(h.default.RECOVERED_EARLY_EOF,T.bind(this)),x.on(h.default.MEDIA_INFO,E.bind(this)),x.on(h.default.METADATA_ARRIVED,B.bind(this)),x.on(h.default.SCRIPTDATA_ARRIVED,P.bind(this)),x.on(h.default.STATISTICS_INFO,M.bind(this)),x.on(h.default.RECOMMEND_SEEKPOINT,V.bind(this));break;case"destroy":x&&(x.destroy(),x=null),g.postMessage({msg:"destroyed"});break;case"start":x.start();break;case"stop":x.stop();break;case"seek":x.seek(z.data.param);break;case"pause":x.pause();break;case"resume":x.resume();break;case"logging_config":{var Z=z.data.param;u.default.applyConfig(Z),Z.enableCallback===!0?u.default.addLogListener(v):u.default.removeLogListener(v);break}}});function y(z,Z){var j={msg:h.default.INIT_SEGMENT,data:{type:z,data:Z}};g.postMessage(j,[Z.data])}function I(z,Z){var j={msg:h.default.MEDIA_SEGMENT,data:{type:z,data:Z}};g.postMessage(j,[Z.data])}function S(){var z={msg:h.default.LOADING_COMPLETE};g.postMessage(z)}function T(){var z={msg:h.default.RECOVERED_EARLY_EOF};g.postMessage(z)}function E(z){var Z={msg:h.default.MEDIA_INFO,data:z};g.postMessage(Z)}function B(z){var Z={msg:h.default.METADATA_ARRIVED,data:z};g.postMessage(Z)}function P(z){var Z={msg:h.default.SCRIPTDATA_ARRIVED,data:z};g.postMessage(Z)}function M(z){var Z={msg:h.default.STATISTICS_INFO,data:z};g.postMessage(Z)}function O(z,Z){g.postMessage({msg:h.default.IO_ERROR,data:{type:z,info:Z}})}function k(z,Z){g.postMessage({msg:h.default.DEMUX_ERROR,data:{type:z,info:Z}})}function V(z){g.postMessage({msg:h.default.RECOMMEND_SEEKPOINT,data:z})}function U(z,Z){g.postMessage({msg:"logcat_callback",data:{type:z,logcat:Z}})}};o.default=p}),"./src/demux/amf-parser.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logger.js"),c=l("./src/utils/utf8-conv.js"),d=l("./src/utils/exception.js"),h=(function(){var g=new ArrayBuffer(2);return new DataView(g).setInt16(0,256,!0),new Int16Array(g)[0]===256})(),p=(function(){function g(){}return g.parseScriptData=function(x,v,y){var I={};try{var S=g.parseValue(x,v,y),T=g.parseValue(x,v+S.size,y-S.size);I[S.data]=T.data}catch(E){u.default.e("AMF",E.toString())}return I},g.parseObject=function(x,v,y){if(y<3)throw new d.IllegalStateException("Data not enough when parse ScriptDataObject");var I=g.parseString(x,v,y),S=g.parseValue(x,v+I.size,y-I.size),T=S.objectEnd;return{data:{name:I.data,value:S.data},size:I.size+S.size,objectEnd:T}},g.parseVariable=function(x,v,y){return g.parseObject(x,v,y)},g.parseString=function(x,v,y){if(y<2)throw new d.IllegalStateException("Data not enough when parse String");var I=new DataView(x,v,y),S=I.getUint16(0,!h),T;return S>0?T=(0,c.default)(new Uint8Array(x,v+2,S)):T="",{data:T,size:2+S}},g.parseLongString=function(x,v,y){if(y<4)throw new d.IllegalStateException("Data not enough when parse LongString");var I=new DataView(x,v,y),S=I.getUint32(0,!h),T;return S>0?T=(0,c.default)(new Uint8Array(x,v+4,S)):T="",{data:T,size:4+S}},g.parseDate=function(x,v,y){if(y<10)throw new d.IllegalStateException("Data size invalid when parse Date");var I=new DataView(x,v,y),S=I.getFloat64(0,!h),T=I.getInt16(8,!h);return S+=T*60*1e3,{data:new Date(S),size:10}},g.parseValue=function(x,v,y){if(y<1)throw new d.IllegalStateException("Data not enough when parse Value");var I=new DataView(x,v,y),S=1,T=I.getUint8(0),E,B=!1;try{switch(T){case 0:E=I.getFloat64(1,!h),S+=8;break;case 1:{var P=I.getUint8(1);E=!!P,S+=1;break}case 2:{var M=g.parseString(x,v+1,y-1);E=M.data,S+=M.size;break}case 3:{E={};var O=0;for((I.getUint32(y-4,!h)&16777215)===9&&(O=3);S<y-4;){var k=g.parseObject(x,v+S,y-S-O);if(k.objectEnd)break;E[k.data.name]=k.data.value,S+=k.size}if(S<=y-3){var V=I.getUint32(S-1,!h)&16777215;V===9&&(S+=3)}break}case 8:{E={},S+=4;var O=0;for((I.getUint32(y-4,!h)&16777215)===9&&(O=3);S<y-8;){var U=g.parseVariable(x,v+S,y-S-O);if(U.objectEnd)break;E[U.data.name]=U.data.value,S+=U.size}if(S<=y-3){var V=I.getUint32(S-1,!h)&16777215;V===9&&(S+=3)}break}case 9:E=void 0,S=1,B=!0;break;case 10:{E=[];var z=I.getUint32(1,!h);S+=4;for(var Z=0;Z<z;Z++){var j=g.parseValue(x,v+S,y-S);E.push(j.data),S+=j.size}break}case 11:{var K=g.parseDate(x,v+1,y-1);E=K.data,S+=K.size;break}case 12:{var J=g.parseString(x,v+1,y-1);E=J.data,S+=J.size;break}default:S=y,u.default.w("AMF","Unsupported AMF value type "+T)}}catch(q){u.default.e("AMF",q.toString())}return{data:E,size:S,objectEnd:B}},g})();o.default=p}),"./src/demux/demux-errors.js":(function(a,o,l){l.r(o);var u={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};o.default=u}),"./src/demux/exp-golomb.js":(function(a,o,l){l.r(o);var u=l("./src/utils/exception.js"),c=(function(){function d(h){this.TAG="ExpGolomb",this._buffer=h,this._buffer_index=0,this._total_bytes=h.byteLength,this._total_bits=h.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return d.prototype.destroy=function(){this._buffer=null},d.prototype._fillCurrentWord=function(){var h=this._total_bytes-this._buffer_index;if(h<=0)throw new u.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var p=Math.min(4,h),g=new Uint8Array(4);g.set(this._buffer.subarray(this._buffer_index,this._buffer_index+p)),this._current_word=new DataView(g.buffer).getUint32(0,!1),this._buffer_index+=p,this._current_word_bits_left=p*8},d.prototype.readBits=function(h){if(h>32)throw new u.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(h<=this._current_word_bits_left){var p=this._current_word>>>32-h;return this._current_word<<=h,this._current_word_bits_left-=h,p}var g=this._current_word_bits_left?this._current_word:0;g=g>>>32-this._current_word_bits_left;var x=h-this._current_word_bits_left;this._fillCurrentWord();var v=Math.min(x,this._current_word_bits_left),y=this._current_word>>>32-v;return this._current_word<<=v,this._current_word_bits_left-=v,g=g<<v|y,g},d.prototype.readBool=function(){return this.readBits(1)===1},d.prototype.readByte=function(){return this.readBits(8)},d.prototype._skipLeadingZero=function(){var h;for(h=0;h<this._current_word_bits_left;h++)if((this._current_word&2147483648>>>h)!==0)return this._current_word<<=h,this._current_word_bits_left-=h,h;return this._fillCurrentWord(),h+this._skipLeadingZero()},d.prototype.readUEG=function(){var h=this._skipLeadingZero();return this.readBits(h+1)-1},d.prototype.readSEG=function(){var h=this.readUEG();return h&1?h+1>>>1:-1*(h>>>1)},d})();o.default=c}),"./src/demux/flv-demuxer.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logger.js"),c=l("./src/demux/amf-parser.js"),d=l("./src/demux/sps-parser.js"),h=l("./src/demux/demux-errors.js"),p=l("./src/core/media-info.js"),g=l("./src/utils/exception.js");function x(y,I){return y[I]<<24|y[I+1]<<16|y[I+2]<<8|y[I+3]}var v=(function(){function y(I,S){this.TAG="FLVDemuxer",this._config=S,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=I.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=I.hasAudioTrack,this._hasVideo=I.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new p.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=(function(){var T=new ArrayBuffer(2);return new DataView(T).setInt16(0,256,!0),new Int16Array(T)[0]===256})()}return y.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},y.probe=function(I){var S=new Uint8Array(I),T={match:!1};if(S[0]!==70||S[1]!==76||S[2]!==86||S[3]!==1)return T;var E=(S[4]&4)>>>2!==0,B=(S[4]&1)!==0,P=x(S,5);return P<9?T:{match:!0,consumed:P,dataOffset:P,hasAudioTrack:E,hasVideoTrack:B}},y.prototype.bindDataSource=function(I){return I.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(y.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(I){this._onTrackMetadata=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(I){this._onMediaInfo=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(I){this._onMetaDataArrived=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(I){this._onScriptDataArrived=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onError",{get:function(){return this._onError},set:function(I){this._onError=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(I){this._onDataAvailable=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(I){this._timestampBase=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"overridedDuration",{get:function(){return this._duration},set:function(I){this._durationOverrided=!0,this._duration=I,this._mediaInfo.duration=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"overridedHasAudio",{set:function(I){this._hasAudioFlagOverrided=!0,this._hasAudio=I,this._mediaInfo.hasAudio=I},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"overridedHasVideo",{set:function(I){this._hasVideoFlagOverrided=!0,this._hasVideo=I,this._mediaInfo.hasVideo=I},enumerable:!1,configurable:!0}),y.prototype.resetMediaInfo=function(){this._mediaInfo=new p.default},y.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1},y.prototype.parseChunks=function(I,S){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new g.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var T=0,E=this._littleEndian;if(S===0)if(I.byteLength>13){var B=y.probe(I);T=B.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,S+T!==this._dataOffset&&u.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");var P=new DataView(I,T),M=P.getUint32(0,!E);M!==0&&u.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),T+=4}for(;T<I.byteLength;){this._dispatch=!0;var P=new DataView(I,T);if(T+11+4>I.byteLength)break;var O=P.getUint8(0),k=P.getUint32(0,!E)&16777215;if(T+11+k+4>I.byteLength)break;if(O!==8&&O!==9&&O!==18){u.default.w(this.TAG,"Unsupported tag type "+O+", skipped"),T+=11+k+4;continue}var V=P.getUint8(4),U=P.getUint8(5),z=P.getUint8(6),Z=P.getUint8(7),j=z|U<<8|V<<16|Z<<24,K=P.getUint32(7,!E)&16777215;K!==0&&u.default.w(this.TAG,"Meet tag which has StreamID != 0!");var J=T+11;switch(O){case 8:this._parseAudioData(I,J,k,j);break;case 9:this._parseVideoData(I,J,k,j,S+T);break;case 18:this._parseScriptData(I,J,k);break}var q=P.getUint32(11+k,!E);q!==11+k&&u.default.w(this.TAG,"Invalid PrevTagSize "+q),T+=11+k+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),T},y.prototype._parseScriptData=function(I,S,T){var E=c.default.parseScriptData(I,S,T);if(E.hasOwnProperty("onMetaData")){if(E.onMetaData==null||typeof E.onMetaData!="object"){u.default.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&u.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=E;var B=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},B)),typeof B.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=B.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof B.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=B.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof B.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=B.audiodatarate),typeof B.videodatarate=="number"&&(this._mediaInfo.videoDataRate=B.videodatarate),typeof B.width=="number"&&(this._mediaInfo.width=B.width),typeof B.height=="number"&&(this._mediaInfo.height=B.height),typeof B.duration=="number"){if(!this._durationOverrided){var P=Math.floor(B.duration*this._timescale);this._duration=P,this._mediaInfo.duration=P}}else this._mediaInfo.duration=0;if(typeof B.framerate=="number"){var M=Math.floor(B.framerate*1e3);if(M>0){var O=M/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=O,this._referenceFrameRate.fps_num=M,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=O}}if(typeof B.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var k=B.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(k),B.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=B,u.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(E).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},E))},y.prototype._parseKeyframesIndex=function(I){for(var S=[],T=[],E=1;E<I.times.length;E++){var B=this._timestampBase+Math.floor(I.times[E]*1e3);S.push(B),T.push(I.filepositions[E])}return{times:S,filepositions:T}},y.prototype._parseAudioData=function(I,S,T,E){if(T<=1){u.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(!(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)){this._littleEndian;var B=new DataView(I,S,T),P=B.getUint8(0),M=P>>>4;if(M!==2&&M!==10){this._onError(h.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+M);return}var O=0,k=(P&12)>>>2;if(k>=0&&k<=4)O=this._flvSoundRateTable[k];else{this._onError(h.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+k);return}var V=P&1,U=this._audioMetadata,z=this._audioTrack;if(U||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),U=this._audioMetadata={},U.type="audio",U.id=z.id,U.timescale=this._timescale,U.duration=this._duration,U.audioSampleRate=O,U.channelCount=V===0?1:2),M===10){var Z=this._parseAACAudioData(I,S+1,T-1);if(Z==null)return;if(Z.packetType===0){U.config&&u.default.w(this.TAG,"Found another AudioSpecificConfig!");var j=Z.data;U.audioSampleRate=j.samplingRate,U.channelCount=j.channelCount,U.codec=j.codec,U.originalCodec=j.originalCodec,U.config=j.config,U.refSampleDuration=1024/U.audioSampleRate*U.timescale,u.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",U);var K=this._mediaInfo;K.audioCodec=U.originalCodec,K.audioSampleRate=U.audioSampleRate,K.audioChannelCount=U.channelCount,K.hasVideo?K.videoCodec!=null&&(K.mimeType='video/x-flv; codecs="'+K.videoCodec+","+K.audioCodec+'"'):K.mimeType='video/x-flv; codecs="'+K.audioCodec+'"',K.isComplete()&&this._onMediaInfo(K)}else if(Z.packetType===1){var J=this._timestampBase+E,q={unit:Z.data,length:Z.data.byteLength,dts:J,pts:J};z.samples.push(q),z.length+=Z.data.length}else u.default.e(this.TAG,"Flv: Unsupported AAC data type "+Z.packetType)}else if(M===2){if(!U.codec){var j=this._parseMP3AudioData(I,S+1,T-1,!0);if(j==null)return;U.audioSampleRate=j.samplingRate,U.channelCount=j.channelCount,U.codec=j.codec,U.originalCodec=j.originalCodec,U.refSampleDuration=1152/U.audioSampleRate*U.timescale,u.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",U);var K=this._mediaInfo;K.audioCodec=U.codec,K.audioSampleRate=U.audioSampleRate,K.audioChannelCount=U.channelCount,K.audioDataRate=j.bitRate,K.hasVideo?K.videoCodec!=null&&(K.mimeType='video/x-flv; codecs="'+K.videoCodec+","+K.audioCodec+'"'):K.mimeType='video/x-flv; codecs="'+K.audioCodec+'"',K.isComplete()&&this._onMediaInfo(K)}var ie=this._parseMP3AudioData(I,S+1,T-1,!1);if(ie==null)return;var J=this._timestampBase+E,ne={unit:ie,length:ie.byteLength,dts:J,pts:J};z.samples.push(ne),z.length+=ie.length}}},y.prototype._parseAACAudioData=function(I,S,T){if(T<=1){u.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var E={},B=new Uint8Array(I,S,T);return E.packetType=B[0],B[0]===0?E.data=this._parseAACAudioSpecificConfig(I,S+1,T-1):E.data=B.subarray(1),E},y.prototype._parseAACAudioSpecificConfig=function(I,S,T){var E=new Uint8Array(I,S,T),B=null,P=0,M=0,O=0,k=null;if(P=M=E[0]>>>3,O=(E[0]&7)<<1|E[1]>>>7,O<0||O>=this._mpegSamplingRates.length){this._onError(h.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var V=this._mpegSamplingRates[O],U=(E[1]&120)>>>3;if(U<0||U>=8){this._onError(h.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}P===5&&(k=(E[1]&7)<<1|E[2]>>>7,(E[2]&124)>>>2);var z=self.navigator.userAgent.toLowerCase();return z.indexOf("firefox")!==-1?O>=6?(P=5,B=new Array(4),k=O-3):(P=2,B=new Array(2),k=O):z.indexOf("android")!==-1?(P=2,B=new Array(2),k=O):(P=5,k=O,B=new Array(4),O>=6?k=O-3:U===1&&(P=2,B=new Array(2),k=O)),B[0]=P<<3,B[0]|=(O&15)>>>1,B[1]=(O&15)<<7,B[1]|=(U&15)<<3,P===5&&(B[1]|=(k&15)>>>1,B[2]=(k&1)<<7,B[2]|=8,B[3]=0),{config:B,samplingRate:V,channelCount:U,codec:"mp4a.40."+P,originalCodec:"mp4a.40."+M}},y.prototype._parseMP3AudioData=function(I,S,T,E){if(T<4){u.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}this._littleEndian;var B=new Uint8Array(I,S,T),P=null;if(E){if(B[0]!==255)return;var M=B[1]>>>3&3,O=(B[1]&6)>>1,k=(B[2]&240)>>>4,V=(B[2]&12)>>>2,U=B[3]>>>6&3,z=U!==3?2:1,Z=0,j=0,K="mp3";switch(M){case 0:Z=this._mpegAudioV25SampleRateTable[V];break;case 2:Z=this._mpegAudioV20SampleRateTable[V];break;case 3:Z=this._mpegAudioV10SampleRateTable[V];break}switch(O){case 1:k<this._mpegAudioL3BitRateTable.length&&(j=this._mpegAudioL3BitRateTable[k]);break;case 2:k<this._mpegAudioL2BitRateTable.length&&(j=this._mpegAudioL2BitRateTable[k]);break;case 3:k<this._mpegAudioL1BitRateTable.length&&(j=this._mpegAudioL1BitRateTable[k]);break}P={bitRate:j,samplingRate:Z,channelCount:z,codec:K,originalCodec:K}}else P=B;return P},y.prototype._parseVideoData=function(I,S,T,E,B){if(T<=1){u.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(!(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)){var P=new Uint8Array(I,S,T)[0],M=(P&240)>>>4,O=P&15;if(O!==7){this._onError(h.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+O);return}this._parseAVCVideoPacket(I,S+1,T-1,E,B,M)}},y.prototype._parseAVCVideoPacket=function(I,S,T,E,B,P){if(T<4){u.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var M=this._littleEndian,O=new DataView(I,S,T),k=O.getUint8(0),V=O.getUint32(0,!M)&16777215,U=V<<8>>8;if(k===0)this._parseAVCDecoderConfigurationRecord(I,S+4,T-4);else if(k===1)this._parseAVCVideoData(I,S+4,T-4,E,B,P,U);else if(k!==2){this._onError(h.default.FORMAT_ERROR,"Flv: Invalid video packet type "+k);return}},y.prototype._parseAVCDecoderConfigurationRecord=function(I,S,T){if(T<7){u.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var E=this._videoMetadata,B=this._videoTrack,P=this._littleEndian,M=new DataView(I,S,T);E?typeof E.avcc<"u"&&u.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),E=this._videoMetadata={},E.type="video",E.id=B.id,E.timescale=this._timescale,E.duration=this._duration);var O=M.getUint8(0),k=M.getUint8(1);if(M.getUint8(2),M.getUint8(3),O!==1||k===0){this._onError(h.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(M.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(h.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));return}var V=M.getUint8(5)&31;if(V===0){this._onError(h.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else V>1&&u.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+V);for(var U=6,z=0;z<V;z++){var Z=M.getUint16(U,!P);if(U+=2,Z!==0){var j=new Uint8Array(I,S+U,Z);U+=Z;var K=d.default.parseSPS(j);if(z===0){E.codecWidth=K.codec_size.width,E.codecHeight=K.codec_size.height,E.presentWidth=K.present_size.width,E.presentHeight=K.present_size.height,E.profile=K.profile_string,E.level=K.level_string,E.bitDepth=K.bit_depth,E.chromaFormat=K.chroma_format,E.sarRatio=K.sar_ratio,E.frameRate=K.frame_rate,(K.frame_rate.fixed===!1||K.frame_rate.fps_num===0||K.frame_rate.fps_den===0)&&(E.frameRate=this._referenceFrameRate);var J=E.frameRate.fps_den,q=E.frameRate.fps_num;E.refSampleDuration=E.timescale*(J/q);for(var ie=j.subarray(1,4),ne="avc1.",le=0;le<3;le++){var de=ie[le].toString(16);de.length<2&&(de="0"+de),ne+=de}E.codec=ne;var he=this._mediaInfo;he.width=E.codecWidth,he.height=E.codecHeight,he.fps=E.frameRate.fps,he.profile=E.profile,he.level=E.level,he.refFrames=K.ref_frames,he.chromaFormat=K.chroma_format_string,he.sarNum=E.sarRatio.width,he.sarDen=E.sarRatio.height,he.videoCodec=ne,he.hasAudio?he.audioCodec!=null&&(he.mimeType='video/x-flv; codecs="'+he.videoCodec+","+he.audioCodec+'"'):he.mimeType='video/x-flv; codecs="'+he.videoCodec+'"',he.isComplete()&&this._onMediaInfo(he)}}}var ge=M.getUint8(U);if(ge===0){this._onError(h.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else ge>1&&u.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+ge);U++;for(var z=0;z<ge;z++){var Z=M.getUint16(U,!P);U+=2,Z!==0&&(U+=Z)}E.avcc=new Uint8Array(T),E.avcc.set(new Uint8Array(I,S,T),0),u.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",E)},y.prototype._parseAVCVideoData=function(I,S,T,E,B,P,M){for(var O=this._littleEndian,k=new DataView(I,S,T),V=[],U=0,z=0,Z=this._naluLengthSize,j=this._timestampBase+E,K=P===1;z<T;){if(z+4>=T){u.default.w(this.TAG,"Malformed Nalu near timestamp "+j+", offset = "+z+", dataSize = "+T);break}var J=k.getUint32(z,!O);if(Z===3&&(J>>>=8),J>T-Z){u.default.w(this.TAG,"Malformed Nalus near timestamp "+j+", NaluSize > DataSize!");return}var q=k.getUint8(z+Z)&31;q===5&&(K=!0);var ie=new Uint8Array(I,S+z,Z+J),ne={type:q,data:ie};V.push(ne),U+=ie.byteLength,z+=Z+J}if(V.length){var le=this._videoTrack,de={units:V,length:U,isKeyframe:K,dts:j,cts:M,pts:j+M};K&&(de.fileposition=B),le.samples.push(de),le.length+=U}},y})();o.default=v}),"./src/demux/sps-parser.js":(function(a,o,l){l.r(o);var u=l("./src/demux/exp-golomb.js"),c=(function(){function d(){}return d._ebsp2rbsp=function(h){for(var p=h,g=p.byteLength,x=new Uint8Array(g),v=0,y=0;y<g;y++)y>=2&&p[y]===3&&p[y-1]===0&&p[y-2]===0||(x[v]=p[y],v++);return new Uint8Array(x.buffer,0,v)},d.parseSPS=function(h){var p=d._ebsp2rbsp(h),g=new u.default(p);g.readByte();var x=g.readByte();g.readByte();var v=g.readByte();g.readUEG();var y=d.getProfileString(x),I=d.getLevelString(v),S=1,T=420,E=[0,420,422,444],B=8;if((x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128||x===138||x===144)&&(S=g.readUEG(),S===3&&g.readBits(1),S<=3&&(T=E[S]),B=g.readUEG()+8,g.readUEG(),g.readBits(1),g.readBool()))for(var P=S!==3?8:12,M=0;M<P;M++)g.readBool()&&(M<6?d._skipScalingList(g,16):d._skipScalingList(g,64));g.readUEG();var O=g.readUEG();if(O===0)g.readUEG();else if(O===1){g.readBits(1),g.readSEG(),g.readSEG();for(var k=g.readUEG(),M=0;M<k;M++)g.readSEG()}var V=g.readUEG();g.readBits(1);var U=g.readUEG(),z=g.readUEG(),Z=g.readBits(1);Z===0&&g.readBits(1),g.readBits(1);var j=0,K=0,J=0,q=0,ie=g.readBool();ie&&(j=g.readUEG(),K=g.readUEG(),J=g.readUEG(),q=g.readUEG());var ne=1,le=1,de=0,he=!0,ge=0,ce=0,me=g.readBool();if(me){if(g.readBool()){var te=g.readByte(),fe=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Te=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];te>0&&te<16?(ne=fe[te-1],le=Te[te-1]):te===255&&(ne=g.readByte()<<8|g.readByte(),le=g.readByte()<<8|g.readByte())}if(g.readBool()&&g.readBool(),g.readBool()&&(g.readBits(4),g.readBool()&&g.readBits(24)),g.readBool()&&(g.readUEG(),g.readUEG()),g.readBool()){var Ne=g.readBits(32),Le=g.readBits(32);he=g.readBool(),ge=Le,ce=Ne*2,de=ge/ce}}var Ae=1;(ne!==1||le!==1)&&(Ae=ne/le);var Oe=0,He=0;if(S===0)Oe=1,He=2-Z;else{var Ee=S===3?1:2,je=S===1?2:1;Oe=Ee,He=je*(2-Z)}var lt=(U+1)*16,At=(2-Z)*((z+1)*16);lt-=(j+K)*Oe,At-=(J+q)*He;var gt=Math.ceil(lt*Ae);return g.destroy(),g=null,{profile_string:y,level_string:I,bit_depth:B,ref_frames:V,chroma_format:T,chroma_format_string:d.getChromaFormatString(T),frame_rate:{fixed:he,fps:de,fps_den:ce,fps_num:ge},sar_ratio:{width:ne,height:le},codec_size:{width:lt,height:At},present_size:{width:gt,height:At}}},d._skipScalingList=function(h,p){for(var g=8,x=8,v=0,y=0;y<p;y++)x!==0&&(v=h.readSEG(),x=(g+v+256)%256),g=x===0?g:x},d.getProfileString=function(h){switch(h){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},d.getLevelString=function(h){return(h/10).toFixed(1)},d.getChromaFormatString=function(h){switch(h){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},d})();o.default=c}),"./src/flv.js":(function(a,o,l){l.r(o);var u=l("./src/utils/polyfill.js"),c=l("./src/core/features.js"),d=l("./src/io/loader.js"),h=l("./src/player/flv-player.js"),p=l("./src/player/native-player.js"),g=l("./src/player/player-events.js"),x=l("./src/player/player-errors.js"),v=l("./src/utils/logging-control.js"),y=l("./src/utils/exception.js");u.default.install();function I(B,P){var M=B;if(M==null||typeof M!="object")throw new y.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!M.hasOwnProperty("type"))throw new y.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");return M.type==="flv"?new h.default(M,P):new p.default(M,P)}function S(){return c.default.supportMSEH264Playback()}function T(){return c.default.getFeatureList()}var E={};E.createPlayer=I,E.isSupported=S,E.getFeatureList=T,E.BaseLoader=d.BaseLoader,E.LoaderStatus=d.LoaderStatus,E.LoaderErrors=d.LoaderErrors,E.Events=g.default,E.ErrorTypes=x.ErrorTypes,E.ErrorDetails=x.ErrorDetails,E.FlvPlayer=h.default,E.NativePlayer=p.default,E.LoggingControl=v.default,Object.defineProperty(E,"version",{enumerable:!0,get:function(){return"1.6.2"}}),o.default=E}),"./src/index.js":(function(a,o,l){a.exports=l("./src/flv.js").default}),"./src/io/fetch-stream-loader.js":(function(a,o,l){l.r(o);var u=l("./src/utils/browser.js"),c=l("./src/io/loader.js"),d=l("./src/utils/exception.js"),h=(function(){var g=function(x,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,I){y.__proto__=I}||function(y,I){for(var S in I)Object.prototype.hasOwnProperty.call(I,S)&&(y[S]=I[S])},g(x,v)};return function(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");g(x,v);function y(){this.constructor=x}x.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),p=(function(g){h(x,g);function x(v,y){var I=g.call(this,"fetch-stream-loader")||this;return I.TAG="FetchStreamLoader",I._seekHandler=v,I._config=y,I._needStash=!0,I._requestAbort=!1,I._contentLength=null,I._receivedLength=0,I}return x.isSupported=function(){try{var v=u.default.msedge&&u.default.version.minor>=15048,y=u.default.msedge?v:!0;return self.fetch&&self.ReadableStream&&y}catch{return!1}},x.prototype.destroy=function(){this.isWorking()&&this.abort(),g.prototype.destroy.call(this)},x.prototype.open=function(v,y){var I=this;this._dataSource=v,this._range=y;var S=v.url;this._config.reuseRedirectedURL&&v.redirectedURL!=null&&(S=v.redirectedURL);var T=this._seekHandler.getConfig(S,y),E=new self.Headers;if(typeof T.headers=="object"){var B=T.headers;for(var P in B)B.hasOwnProperty(P)&&E.append(P,B[P])}var M={method:"GET",headers:E,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var P in this._config.headers)E.append(P,this._config.headers[P]);v.cors===!1&&(M.mode="same-origin"),v.withCredentials&&(M.credentials="include"),v.referrerPolicy&&(M.referrerPolicy=v.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,M.signal=this._abortController.signal),this._status=c.LoaderStatus.kConnecting,self.fetch(T.url,M).then(function(O){if(I._requestAbort){I._status=c.LoaderStatus.kIdle,O.body.cancel();return}if(O.ok&&O.status>=200&&O.status<=299){if(O.url!==T.url&&I._onURLRedirect){var k=I._seekHandler.removeURLParameters(O.url);I._onURLRedirect(k)}var V=O.headers.get("Content-Length");return V!=null&&(I._contentLength=parseInt(V),I._contentLength!==0&&I._onContentLengthKnown&&I._onContentLengthKnown(I._contentLength)),I._pump.call(I,O.body.getReader())}else if(I._status=c.LoaderStatus.kError,I._onError)I._onError(c.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:O.status,msg:O.statusText});else throw new d.RuntimeException("FetchStreamLoader: Http code invalid, "+O.status+" "+O.statusText)}).catch(function(O){if(!(I._abortController&&I._abortController.signal.aborted))if(I._status=c.LoaderStatus.kError,I._onError)I._onError(c.LoaderErrors.EXCEPTION,{code:-1,msg:O.message});else throw O})},x.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==c.LoaderStatus.kBuffering||!u.default.chrome)&&this._abortController)try{this._abortController.abort()}catch{}},x.prototype._pump=function(v){var y=this;return v.read().then(function(I){if(I.done)if(y._contentLength!==null&&y._receivedLength<y._contentLength){y._status=c.LoaderStatus.kError;var S=c.LoaderErrors.EARLY_EOF,T={code:-1,msg:"Fetch stream meet Early-EOF"};if(y._onError)y._onError(S,T);else throw new d.RuntimeException(T.msg)}else y._status=c.LoaderStatus.kComplete,y._onComplete&&y._onComplete(y._range.from,y._range.from+y._receivedLength-1);else{if(y._abortController&&y._abortController.signal.aborted){y._status=c.LoaderStatus.kComplete;return}else if(y._requestAbort===!0)return y._status=c.LoaderStatus.kComplete,v.cancel();y._status=c.LoaderStatus.kBuffering;var E=I.value.buffer,B=y._range.from+y._receivedLength;y._receivedLength+=E.byteLength,y._onDataArrival&&y._onDataArrival(E,B,y._receivedLength),y._pump(v)}}).catch(function(I){if(y._abortController&&y._abortController.signal.aborted){y._status=c.LoaderStatus.kComplete;return}if(!(I.code===11&&u.default.msedge)){y._status=c.LoaderStatus.kError;var S=0,T=null;if((I.code===19||I.message==="network error")&&(y._contentLength===null||y._contentLength!==null&&y._receivedLength<y._contentLength)?(S=c.LoaderErrors.EARLY_EOF,T={code:I.code,msg:"Fetch stream meet Early-EOF"}):(S=c.LoaderErrors.EXCEPTION,T={code:I.code,msg:I.message}),y._onError)y._onError(S,T);else throw new d.RuntimeException(T.msg)}})},x})(c.BaseLoader);o.default=p}),"./src/io/io-controller.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logger.js"),c=l("./src/io/speed-sampler.js"),d=l("./src/io/loader.js"),h=l("./src/io/fetch-stream-loader.js"),p=l("./src/io/xhr-moz-chunked-loader.js"),g=l("./src/io/xhr-range-loader.js"),x=l("./src/io/websocket-loader.js"),v=l("./src/io/range-seek-handler.js"),y=l("./src/io/param-seek-handler.js"),I=l("./src/utils/exception.js"),S=(function(){function T(E,B,P){this.TAG="IOController",this._config=B,this._extraData=P,this._stashInitialSize=1024*384,B.stashInitialSize!=null&&B.stashInitialSize>0&&(this._stashInitialSize=B.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,B.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=E,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(E.url),this._refTotalLength=E.filesize?E.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new c.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return T.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},T.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},T.prototype.isPaused=function(){return this._paused},Object.defineProperty(T.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"extraData",{get:function(){return this._extraData},set:function(E){this._extraData=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(E){this._onDataArrival=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(E){this._onSeeked=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onError",{get:function(){return this._onError},set:function(E){this._onError=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onComplete",{get:function(){return this._onComplete},set:function(E){this._onComplete=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(E){this._onRedirect=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(E){this._onRecoveredEarlyEof=E},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasRedirect",{get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"currentSpeed",{get:function(){return this._loaderClass===g.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),T.prototype._selectSeekHandler=function(){var E=this._config;if(E.seekType==="range")this._seekHandler=new v.default(this._config.rangeLoadZeroStart);else if(E.seekType==="param"){var B=E.seekParamStart||"bstart",P=E.seekParamEnd||"bend";this._seekHandler=new y.default(B,P)}else if(E.seekType==="custom"){if(typeof E.customSeekHandler!="function")throw new I.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new E.customSeekHandler}else throw new I.InvalidArgumentException("Invalid seekType in config: "+E.seekType)},T.prototype._selectLoader=function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=x.default;else if(h.default.isSupported())this._loaderClass=h.default;else if(p.default.isSupported())this._loaderClass=p.default;else if(g.default.isSupported())this._loaderClass=g.default;else throw new I.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!")},T.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},T.prototype.open=function(E){this._currentRange={from:0,to:-1},E&&(this._currentRange.from=E),this._speedSampler.reset(),E||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},T.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},T.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},T.prototype.resume=function(){if(this._paused){this._paused=!1;var E=this._resumeFrom;this._resumeFrom=0,this._internalSeek(E,!0)}},T.prototype.seek=function(E){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(E,!0)},T.prototype._internalSeek=function(E,B){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(B),this._loader.destroy(),this._loader=null;var P={from:E,to:-1};this._currentRange={from:P.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,P),this._onSeeked&&this._onSeeked()},T.prototype.updateUrl=function(E){if(!E||typeof E!="string"||E.length===0)throw new I.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=E},T.prototype._expandBuffer=function(E){for(var B=this._stashSize;B+1024*1024*1<E;)B*=2;if(B+=1024*1024*1,B!==this._bufferSize){var P=new ArrayBuffer(B);if(this._stashUsed>0){var M=new Uint8Array(this._stashBuffer,0,this._stashUsed),O=new Uint8Array(P,0,B);O.set(M,0)}this._stashBuffer=P,this._bufferSize=B}},T.prototype._normalizeSpeed=function(E){var B=this._speedNormalizeList,P=B.length-1,M=0,O=0,k=P;if(E<B[0])return B[0];for(;O<=k;){if(M=O+Math.floor((k-O)/2),M===P||E>=B[M]&&E<B[M+1])return B[M];B[M]<E?O=M+1:k=M-1}},T.prototype._adjustStashSize=function(E){var B=0;this._config.isLive||E<512?B=E:E>=512&&E<=1024?B=Math.floor(E*1.5):B=E*2,B>8192&&(B=8192);var P=B*1024+1024*1024*1;this._bufferSize<P&&this._expandBuffer(P),this._stashSize=B*1024},T.prototype._dispatchChunks=function(E,B){return this._currentRange.to=B+E.byteLength-1,this._onDataArrival(E,B)},T.prototype._onURLRedirect=function(E){this._redirectedURL=E,this._onRedirect&&this._onRedirect(E)},T.prototype._onContentLengthKnown=function(E){E&&this._fullRequestFlag&&(this._totalLength=E,this._fullRequestFlag=!1)},T.prototype._onLoaderChunkArrival=function(E,B,P){if(!this._onDataArrival)throw new I.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(E.byteLength);var M=this._speedSampler.lastSecondKBps;if(M!==0){var O=this._normalizeSpeed(M);this._speedNormalized!==O&&(this._speedNormalized=O,this._adjustStashSize(O))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=B),this._stashUsed+E.byteLength<=this._stashSize){var U=new Uint8Array(this._stashBuffer,0,this._stashSize);U.set(new Uint8Array(E),this._stashUsed),this._stashUsed+=E.byteLength}else{var U=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var Z=this._stashBuffer.slice(0,this._stashUsed),k=this._dispatchChunks(Z,this._stashByteStart);if(k<Z.byteLength){if(k>0){var z=new Uint8Array(Z,k);U.set(z,0),this._stashUsed=z.byteLength,this._stashByteStart+=k}}else this._stashUsed=0,this._stashByteStart+=k;this._stashUsed+E.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+E.byteLength),U=new Uint8Array(this._stashBuffer,0,this._bufferSize)),U.set(new Uint8Array(E),this._stashUsed),this._stashUsed+=E.byteLength}else{var k=this._dispatchChunks(E,B);if(k<E.byteLength){var V=E.byteLength-k;V>this._bufferSize&&(this._expandBuffer(V),U=new Uint8Array(this._stashBuffer,0,this._bufferSize)),U.set(new Uint8Array(E,k),0),this._stashUsed+=V,this._stashByteStart=B+k}}}else if(this._stashUsed===0){var k=this._dispatchChunks(E,B);if(k<E.byteLength){var V=E.byteLength-k;V>this._bufferSize&&this._expandBuffer(V);var U=new Uint8Array(this._stashBuffer,0,this._bufferSize);U.set(new Uint8Array(E,k),0),this._stashUsed+=V,this._stashByteStart=B+k}}else{this._stashUsed+E.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+E.byteLength);var U=new Uint8Array(this._stashBuffer,0,this._bufferSize);U.set(new Uint8Array(E),this._stashUsed),this._stashUsed+=E.byteLength;var k=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(k<this._stashUsed&&k>0){var z=new Uint8Array(this._stashBuffer,k);U.set(z,0)}this._stashUsed-=k,this._stashByteStart+=k}}},T.prototype._flushStashBuffer=function(E){if(this._stashUsed>0){var B=this._stashBuffer.slice(0,this._stashUsed),P=this._dispatchChunks(B,this._stashByteStart),M=B.byteLength-P;if(P<B.byteLength)if(E)u.default.w(this.TAG,M+" bytes unconsumed data remain when flush buffer, dropped");else{if(P>0){var O=new Uint8Array(this._stashBuffer,0,this._bufferSize),k=new Uint8Array(B,P);O.set(k,0),this._stashUsed=k.byteLength,this._stashByteStart+=P}return 0}return this._stashUsed=0,this._stashByteStart=0,M}return 0},T.prototype._onLoaderComplete=function(E,B){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},T.prototype._onLoaderError=function(E,B){switch(u.default.e(this.TAG,"Loader error, code = "+B.code+", msg = "+B.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,E=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF),E){case d.LoaderErrors.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var P=this._currentRange.to+1;P<this._totalLength&&(u.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(P,!1));return}E=d.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break}case d.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case d.LoaderErrors.CONNECTING_TIMEOUT:case d.LoaderErrors.HTTP_STATUS_CODE_INVALID:case d.LoaderErrors.EXCEPTION:break}if(this._onError)this._onError(E,B);else throw new I.RuntimeException("IOException: "+B.msg)},T})();o.default=S}),"./src/io/loader.js":(function(a,o,l){l.r(o),l.d(o,{LoaderStatus:function(){return c},LoaderErrors:function(){return d},BaseLoader:function(){return h}});var u=l("./src/utils/exception.js"),c={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},d={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},h=(function(){function p(g){this._type=g||"undefined",this._status=c.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return p.prototype.destroy=function(){this._status=c.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},p.prototype.isWorking=function(){return this._status===c.kConnecting||this._status===c.kBuffering},Object.defineProperty(p.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(g){this._onContentLengthKnown=g},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(g){this._onURLRedirect=g},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(g){this._onDataArrival=g},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onError",{get:function(){return this._onError},set:function(g){this._onError=g},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onComplete",{get:function(){return this._onComplete},set:function(g){this._onComplete=g},enumerable:!1,configurable:!0}),p.prototype.open=function(g,x){throw new u.NotImplementedException("Unimplemented abstract function!")},p.prototype.abort=function(){throw new u.NotImplementedException("Unimplemented abstract function!")},p})()}),"./src/io/param-seek-handler.js":(function(a,o,l){l.r(o);var u=(function(){function c(d,h){this._startName=d,this._endName=h}return c.prototype.getConfig=function(d,h){var p=d;if(h.from!==0||h.to!==-1){var g=!0;p.indexOf("?")===-1&&(p+="?",g=!1),g&&(p+="&"),p+=this._startName+"="+h.from.toString(),h.to!==-1&&(p+="&"+this._endName+"="+h.to.toString())}return{url:p,headers:{}}},c.prototype.removeURLParameters=function(d){var h=d.split("?")[0],p=void 0,g=d.indexOf("?");g!==-1&&(p=d.substring(g+1));var x="";if(p!=null&&p.length>0)for(var v=p.split("&"),y=0;y<v.length;y++){var I=v[y].split("="),S=y>0;I[0]!==this._startName&&I[0]!==this._endName&&(S&&(x+="&"),x+=v[y])}return x.length===0?h:h+"?"+x},c})();o.default=u}),"./src/io/range-seek-handler.js":(function(a,o,l){l.r(o);var u=(function(){function c(d){this._zeroStart=d||!1}return c.prototype.getConfig=function(d,h){var p={};if(h.from!==0||h.to!==-1){var g=void 0;h.to!==-1?g="bytes="+h.from.toString()+"-"+h.to.toString():g="bytes="+h.from.toString()+"-",p.Range=g}else this._zeroStart&&(p.Range="bytes=0-");return{url:d,headers:p}},c.prototype.removeURLParameters=function(d){return d},c})();o.default=u}),"./src/io/speed-sampler.js":(function(a,o,l){l.r(o);var u=(function(){function c(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return c.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},c.prototype.addBytes=function(d){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=d,this._totalBytes+=d):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=d,this._totalBytes+=d):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=d,this._totalBytes+=d,this._lastCheckpoint=this._now())},Object.defineProperty(c.prototype,"currentKBps",{get:function(){this.addBytes(0);var d=(this._now()-this._lastCheckpoint)/1e3;return d==0&&(d=1),this._intervalBytes/d/1024},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"averageKBps",{get:function(){var d=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/d/1024},enumerable:!1,configurable:!0}),c})();o.default=u}),"./src/io/websocket-loader.js":(function(a,o,l){l.r(o);var u=l("./src/io/loader.js"),c=l("./src/utils/exception.js"),d=(function(){var p=function(g,x){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var I in y)Object.prototype.hasOwnProperty.call(y,I)&&(v[I]=y[I])},p(g,x)};return function(g,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");p(g,x);function v(){this.constructor=g}g.prototype=x===null?Object.create(x):(v.prototype=x.prototype,new v)}})(),h=(function(p){d(g,p);function g(){var x=p.call(this,"websocket-loader")||this;return x.TAG="WebSocketLoader",x._needStash=!0,x._ws=null,x._requestAbort=!1,x._receivedLength=0,x}return g.isSupported=function(){try{return typeof self.WebSocket<"u"}catch{return!1}},g.prototype.destroy=function(){this._ws&&this.abort(),p.prototype.destroy.call(this)},g.prototype.open=function(x){try{var v=this._ws=new self.WebSocket(x.url);v.binaryType="arraybuffer",v.onopen=this._onWebSocketOpen.bind(this),v.onclose=this._onWebSocketClose.bind(this),v.onmessage=this._onWebSocketMessage.bind(this),v.onerror=this._onWebSocketError.bind(this),this._status=u.LoaderStatus.kConnecting}catch(I){this._status=u.LoaderStatus.kError;var y={code:I.code,msg:I.message};if(this._onError)this._onError(u.LoaderErrors.EXCEPTION,y);else throw new c.RuntimeException(y.msg)}},g.prototype.abort=function(){var x=this._ws;x&&(x.readyState===0||x.readyState===1)&&(this._requestAbort=!0,x.close()),this._ws=null,this._status=u.LoaderStatus.kComplete},g.prototype._onWebSocketOpen=function(x){this._status=u.LoaderStatus.kBuffering},g.prototype._onWebSocketClose=function(x){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=u.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)},g.prototype._onWebSocketMessage=function(x){var v=this;if(x.data instanceof ArrayBuffer)this._dispatchArrayBuffer(x.data);else if(x.data instanceof Blob){var y=new FileReader;y.onload=function(){v._dispatchArrayBuffer(y.result)},y.readAsArrayBuffer(x.data)}else{this._status=u.LoaderStatus.kError;var I={code:-1,msg:"Unsupported WebSocket message type: "+x.data.constructor.name};if(this._onError)this._onError(u.LoaderErrors.EXCEPTION,I);else throw new c.RuntimeException(I.msg)}},g.prototype._dispatchArrayBuffer=function(x){var v=x,y=this._receivedLength;this._receivedLength+=v.byteLength,this._onDataArrival&&this._onDataArrival(v,y,this._receivedLength)},g.prototype._onWebSocketError=function(x){this._status=u.LoaderStatus.kError;var v={code:x.code,msg:x.message};if(this._onError)this._onError(u.LoaderErrors.EXCEPTION,v);else throw new c.RuntimeException(v.msg)},g})(u.BaseLoader);o.default=h}),"./src/io/xhr-moz-chunked-loader.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logger.js"),c=l("./src/io/loader.js"),d=l("./src/utils/exception.js"),h=(function(){var g=function(x,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,I){y.__proto__=I}||function(y,I){for(var S in I)Object.prototype.hasOwnProperty.call(I,S)&&(y[S]=I[S])},g(x,v)};return function(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");g(x,v);function y(){this.constructor=x}x.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),p=(function(g){h(x,g);function x(v,y){var I=g.call(this,"xhr-moz-chunked-loader")||this;return I.TAG="MozChunkedLoader",I._seekHandler=v,I._config=y,I._needStash=!0,I._xhr=null,I._requestAbort=!1,I._contentLength=null,I._receivedLength=0,I}return x.isSupported=function(){try{var v=new XMLHttpRequest;return v.open("GET","https://example.com",!0),v.responseType="moz-chunked-arraybuffer",v.responseType==="moz-chunked-arraybuffer"}catch(y){return u.default.w("MozChunkedLoader",y.message),!1}},x.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),g.prototype.destroy.call(this)},x.prototype.open=function(v,y){this._dataSource=v,this._range=y;var I=v.url;this._config.reuseRedirectedURL&&v.redirectedURL!=null&&(I=v.redirectedURL);var S=this._seekHandler.getConfig(I,y);this._requestURL=S.url;var T=this._xhr=new XMLHttpRequest;if(T.open("GET",S.url,!0),T.responseType="moz-chunked-arraybuffer",T.onreadystatechange=this._onReadyStateChange.bind(this),T.onprogress=this._onProgress.bind(this),T.onloadend=this._onLoadEnd.bind(this),T.onerror=this._onXhrError.bind(this),v.withCredentials&&(T.withCredentials=!0),typeof S.headers=="object"){var E=S.headers;for(var B in E)E.hasOwnProperty(B)&&T.setRequestHeader(B,E[B])}if(typeof this._config.headers=="object"){var E=this._config.headers;for(var B in E)E.hasOwnProperty(B)&&T.setRequestHeader(B,E[B])}this._status=c.LoaderStatus.kConnecting,T.send()},x.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=c.LoaderStatus.kComplete},x.prototype._onReadyStateChange=function(v){var y=v.target;if(y.readyState===2){if(y.responseURL!=null&&y.responseURL!==this._requestURL&&this._onURLRedirect){var I=this._seekHandler.removeURLParameters(y.responseURL);this._onURLRedirect(I)}if(y.status!==0&&(y.status<200||y.status>299))if(this._status=c.LoaderStatus.kError,this._onError)this._onError(c.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:y.status,msg:y.statusText});else throw new d.RuntimeException("MozChunkedLoader: Http code invalid, "+y.status+" "+y.statusText);else this._status=c.LoaderStatus.kBuffering}},x.prototype._onProgress=function(v){if(this._status!==c.LoaderStatus.kError){this._contentLength===null&&v.total!==null&&v.total!==0&&(this._contentLength=v.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var y=v.target.response,I=this._range.from+this._receivedLength;this._receivedLength+=y.byteLength,this._onDataArrival&&this._onDataArrival(y,I,this._receivedLength)}},x.prototype._onLoadEnd=function(v){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===c.LoaderStatus.kError)return;this._status=c.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)},x.prototype._onXhrError=function(v){this._status=c.LoaderStatus.kError;var y=0,I=null;if(this._contentLength&&v.loaded<this._contentLength?(y=c.LoaderErrors.EARLY_EOF,I={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(y=c.LoaderErrors.EXCEPTION,I={code:-1,msg:v.constructor.name+" "+v.type}),this._onError)this._onError(y,I);else throw new d.RuntimeException(I.msg)},x})(c.BaseLoader);o.default=p}),"./src/io/xhr-range-loader.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logger.js"),c=l("./src/io/speed-sampler.js"),d=l("./src/io/loader.js"),h=l("./src/utils/exception.js"),p=(function(){var x=function(v,y){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,S){I.__proto__=S}||function(I,S){for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(I[T]=S[T])},x(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");x(v,y);function I(){this.constructor=v}v.prototype=y===null?Object.create(y):(I.prototype=y.prototype,new I)}})(),g=(function(x){p(v,x);function v(y,I){var S=x.call(this,"xhr-range-loader")||this;return S.TAG="RangeLoader",S._seekHandler=y,S._config=I,S._needStash=!1,S._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],S._currentChunkSizeKB=384,S._currentSpeedNormalized=0,S._zeroSpeedChunkCount=0,S._xhr=null,S._speedSampler=new c.default,S._requestAbort=!1,S._waitForTotalLength=!1,S._totalLengthReceived=!1,S._currentRequestURL=null,S._currentRedirectedURL=null,S._currentRequestRange=null,S._totalLength=null,S._contentLength=null,S._receivedLength=0,S._lastTimeLoaded=0,S}return v.isSupported=function(){try{var y=new XMLHttpRequest;return y.open("GET","https://example.com",!0),y.responseType="arraybuffer",y.responseType==="arraybuffer"}catch(I){return u.default.w("RangeLoader",I.message),!1}},v.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),x.prototype.destroy.call(this)},Object.defineProperty(v.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),v.prototype.open=function(y,I){this._dataSource=y,this._range=I,this._status=d.LoaderStatus.kConnecting;var S=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(S=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!S?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()},v.prototype._openSubRange=function(){var y=this._currentChunkSizeKB*1024,I=this._range.from+this._receivedLength,S=I+y;this._contentLength!=null&&S-this._range.from>=this._contentLength&&(S=this._range.from+this._contentLength-1),this._currentRequestRange={from:I,to:S},this._internalOpen(this._dataSource,this._currentRequestRange)},v.prototype._internalOpen=function(y,I){this._lastTimeLoaded=0;var S=y.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?S=this._currentRedirectedURL:y.redirectedURL!=null&&(S=y.redirectedURL));var T=this._seekHandler.getConfig(S,I);this._currentRequestURL=T.url;var E=this._xhr=new XMLHttpRequest;if(E.open("GET",T.url,!0),E.responseType="arraybuffer",E.onreadystatechange=this._onReadyStateChange.bind(this),E.onprogress=this._onProgress.bind(this),E.onload=this._onLoad.bind(this),E.onerror=this._onXhrError.bind(this),y.withCredentials&&(E.withCredentials=!0),typeof T.headers=="object"){var B=T.headers;for(var P in B)B.hasOwnProperty(P)&&E.setRequestHeader(P,B[P])}if(typeof this._config.headers=="object"){var B=this._config.headers;for(var P in B)B.hasOwnProperty(P)&&E.setRequestHeader(P,B[P])}E.send()},v.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=d.LoaderStatus.kComplete},v.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},v.prototype._onReadyStateChange=function(y){var I=y.target;if(I.readyState===2){if(I.responseURL!=null){var S=this._seekHandler.removeURLParameters(I.responseURL);I.responseURL!==this._currentRequestURL&&S!==this._currentRedirectedURL&&(this._currentRedirectedURL=S,this._onURLRedirect&&this._onURLRedirect(S))}if(I.status>=200&&I.status<=299){if(this._waitForTotalLength)return;this._status=d.LoaderStatus.kBuffering}else if(this._status=d.LoaderStatus.kError,this._onError)this._onError(d.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:I.status,msg:I.statusText});else throw new h.RuntimeException("RangeLoader: Http code invalid, "+I.status+" "+I.statusText)}},v.prototype._onProgress=function(y){if(this._status!==d.LoaderStatus.kError){if(this._contentLength===null){var I=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,I=!0;var S=y.total;this._internalAbort(),S!=null&S!==0&&(this._totalLength=S)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,I){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var T=y.loaded-this._lastTimeLoaded;this._lastTimeLoaded=y.loaded,this._speedSampler.addBytes(T)}},v.prototype._normalizeSpeed=function(y){var I=this._chunkSizeKBList,S=I.length-1,T=0,E=0,B=S;if(y<I[0])return I[0];for(;E<=B;){if(T=E+Math.floor((B-E)/2),T===S||y>=I[T]&&y<I[T+1])return I[T];I[T]<y?E=T+1:B=T-1}},v.prototype._onLoad=function(y){if(this._status!==d.LoaderStatus.kError){if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var I=this._speedSampler.lastSecondKBps;if(I===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(I=this._speedSampler.currentKBps)),I!==0){var S=this._normalizeSpeed(I);this._currentSpeedNormalized!==S&&(this._currentSpeedNormalized=S,this._currentChunkSizeKB=S)}var T=y.target.response,E=this._range.from+this._receivedLength;this._receivedLength+=T.byteLength;var B=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():B=!0,this._onDataArrival&&this._onDataArrival(T,E,this._receivedLength),B&&(this._status=d.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},v.prototype._onXhrError=function(y){this._status=d.LoaderStatus.kError;var I=0,S=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(I=d.LoaderErrors.EARLY_EOF,S={code:-1,msg:"RangeLoader meet Early-Eof"}):(I=d.LoaderErrors.EXCEPTION,S={code:-1,msg:y.constructor.name+" "+y.type}),this._onError)this._onError(I,S);else throw new h.RuntimeException(S.msg)},v})(d.BaseLoader);o.default=g}),"./src/player/flv-player.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./src/utils/logger.js"),h=l("./src/utils/browser.js"),p=l("./src/player/player-events.js"),g=l("./src/core/transmuxer.js"),x=l("./src/core/transmuxing-events.js"),v=l("./src/core/mse-controller.js"),y=l("./src/core/mse-events.js"),I=l("./src/player/player-errors.js"),S=l("./src/config.js"),T=l("./src/utils/exception.js"),E=(function(){function B(P,M){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(c()),this._config=(0,S.createDefaultConfig)(),typeof M=="object"&&Object.assign(this._config,M),P.type.toLowerCase()!=="flv")throw new T.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");P.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=P,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var O=h.default.chrome&&(h.default.version.major<50||h.default.version.major===50&&h.default.version.build<2661);this._alwaysSeekKeyframe=!!(O||h.default.msedge||h.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return B.prototype.destroy=function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},B.prototype.on=function(P,M){var O=this;P===p.default.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){O._emitter.emit(p.default.MEDIA_INFO,O.mediaInfo)}):P===p.default.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(function(){O._emitter.emit(p.default.STATISTICS_INFO,O.statisticsInfo)}),this._emitter.addListener(P,M)},B.prototype.off=function(P,M){this._emitter.removeListener(P,M)},B.prototype.attachMediaElement=function(P){var M=this;if(this._mediaElement=P,P.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),P.addEventListener("seeking",this.e.onvSeeking),P.addEventListener("canplay",this.e.onvCanPlay),P.addEventListener("stalled",this.e.onvStalled),P.addEventListener("progress",this.e.onvProgress),this._msectl=new v.default(this._config),this._msectl.on(y.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(y.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(y.default.SOURCE_OPEN,function(){M._mseSourceOpened=!0,M._hasPendingLoad&&(M._hasPendingLoad=!1,M.load())}),this._msectl.on(y.default.ERROR,function(O){M._emitter.emit(p.default.ERROR,I.ErrorTypes.MEDIA_ERROR,I.ErrorDetails.MEDIA_MSE_ERROR,O)}),this._msectl.attachMediaElement(P),this._pendingSeekTime!=null)try{P.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch{}},B.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},B.prototype.load=function(){var P=this;if(!this._mediaElement)throw new T.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new T.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new g.default(this._mediaDataSource,this._config),this._transmuxer.on(x.default.INIT_SEGMENT,function(M,O){P._msectl.appendInitSegment(O)}),this._transmuxer.on(x.default.MEDIA_SEGMENT,function(M,O){if(P._msectl.appendMediaSegment(O),P._config.lazyLoad&&!P._config.isLive){var k=P._mediaElement.currentTime;O.info.endDts>=(k+P._config.lazyLoadMaxDuration)*1e3&&P._progressChecker==null&&(d.default.v(P.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),P._suspendTransmuxer())}}),this._transmuxer.on(x.default.LOADING_COMPLETE,function(){P._msectl.endOfStream(),P._emitter.emit(p.default.LOADING_COMPLETE)}),this._transmuxer.on(x.default.RECOVERED_EARLY_EOF,function(){P._emitter.emit(p.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(x.default.IO_ERROR,function(M,O){P._emitter.emit(p.default.ERROR,I.ErrorTypes.NETWORK_ERROR,M,O)}),this._transmuxer.on(x.default.DEMUX_ERROR,function(M,O){P._emitter.emit(p.default.ERROR,I.ErrorTypes.MEDIA_ERROR,M,{code:-1,msg:O})}),this._transmuxer.on(x.default.MEDIA_INFO,function(M){P._mediaInfo=M,P._emitter.emit(p.default.MEDIA_INFO,Object.assign({},M))}),this._transmuxer.on(x.default.METADATA_ARRIVED,function(M){P._emitter.emit(p.default.METADATA_ARRIVED,M)}),this._transmuxer.on(x.default.SCRIPTDATA_ARRIVED,function(M){P._emitter.emit(p.default.SCRIPTDATA_ARRIVED,M)}),this._transmuxer.on(x.default.STATISTICS_INFO,function(M){P._statisticsInfo=P._fillStatisticsInfo(M),P._emitter.emit(p.default.STATISTICS_INFO,Object.assign({},P._statisticsInfo))}),this._transmuxer.on(x.default.RECOMMEND_SEEKPOINT,function(M){P._mediaElement&&!P._config.accurateSeek&&(P._requestSetTime=!0,P._mediaElement.currentTime=M/1e3)}),this._transmuxer.open()}},B.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},B.prototype.play=function(){return this._mediaElement.play()},B.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(B.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(P){this._mediaElement.volume=P},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(P){this._mediaElement.muted=P},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(P){this._mediaElement?this._internalSeek(P):this._pendingSeekTime=P},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"statisticsInfo",{get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),B.prototype._fillStatisticsInfo=function(P){if(P.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return P;var M=!0,O=0,k=0;if(this._mediaElement.getVideoPlaybackQuality){var V=this._mediaElement.getVideoPlaybackQuality();O=V.totalVideoFrames,k=V.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(O=this._mediaElement.webkitDecodedFrameCount,k=this._mediaElement.webkitDroppedFrameCount):M=!1;return M&&(P.decodedFrames=O,P.droppedFrames=k),P},B.prototype._onmseUpdateEnd=function(){if(!(!this._config.lazyLoad||this._config.isLive)){for(var P=this._mediaElement.buffered,M=this._mediaElement.currentTime,O=0,k=0;k<P.length;k++){var V=P.start(k),U=P.end(k);if(V<=M&&M<U){O=U;break}}O>=M+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(d.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},B.prototype._onmseBufferFull=function(){d.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()},B.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},B.prototype._checkProgressAndResume=function(){for(var P=this._mediaElement.currentTime,M=this._mediaElement.buffered,O=!1,k=0;k<M.length;k++){var V=M.start(k),U=M.end(k);if(P>=V&&P<U){P>=U-this._config.lazyLoadRecoverDuration&&(O=!0);break}}O&&(window.clearInterval(this._progressChecker),this._progressChecker=null,O&&(d.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},B.prototype._isTimepointBuffered=function(P){for(var M=this._mediaElement.buffered,O=0;O<M.length;O++){var k=M.start(O),V=M.end(O);if(P>=k&&P<V)return!0}return!1},B.prototype._internalSeek=function(P){var M=this._isTimepointBuffered(P),O=!1,k=0;if(P<1&&this._mediaElement.buffered.length>0){var V=this._mediaElement.buffered.start(0);(V<1&&P<V||h.default.safari)&&(O=!0,k=h.default.safari?.1:V)}if(O)this._requestSetTime=!0,this._mediaElement.currentTime=k;else if(M){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=P;else{var U=this._msectl.getNearestKeyframe(Math.floor(P*1e3));this._requestSetTime=!0,U!=null?this._mediaElement.currentTime=U.dts/1e3:this._mediaElement.currentTime=P}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(P),this._transmuxer.seek(Math.floor(P*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=P)},B.prototype._checkAndApplyUnbufferedSeekpoint=function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var P=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(P)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(P),this._transmuxer.seek(Math.floor(P*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=P))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},B.prototype._checkAndResumeStuckPlayback=function(P){var M=this._mediaElement;if(P||!this._receivedCanPlay||M.readyState<2){var O=M.buffered;O.length>0&&M.currentTime<O.start(0)&&(d.default.w(this.TAG,"Playback seems stuck at "+M.currentTime+", seek to "+O.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=O.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)},B.prototype._onvLoadedMetadata=function(P){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},B.prototype._onvSeeking=function(P){var M=this._mediaElement.currentTime,O=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(M<1&&O.length>0){var k=O.start(0);if(k<1&&M<k||h.default.safari){this._requestSetTime=!0,this._mediaElement.currentTime=h.default.safari?.1:k;return}}if(this._isTimepointBuffered(M)){if(this._alwaysSeekKeyframe){var V=this._msectl.getNearestKeyframe(Math.floor(M*1e3));V!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=V.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:M,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},B.prototype._onvCanPlay=function(P){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},B.prototype._onvStalled=function(P){this._checkAndResumeStuckPlayback(!0)},B.prototype._onvProgress=function(P){this._checkAndResumeStuckPlayback()},B})();o.default=E}),"./src/player/native-player.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./src/player/player-events.js"),h=l("./src/config.js"),p=l("./src/utils/exception.js"),g=(function(){function x(v,y){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(c()),this._config=(0,h.createDefaultConfig)(),typeof y=="object"&&Object.assign(this._config,y),v.type.toLowerCase()==="flv")throw new p.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(v.hasOwnProperty("segments"))throw new p.InvalidArgumentException("NativePlayer("+v.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=v,this._mediaElement=null}return x.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},x.prototype.on=function(v,y){var I=this;v===d.default.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){I._emitter.emit(d.default.MEDIA_INFO,I.mediaInfo)}):v===d.default.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){I._emitter.emit(d.default.STATISTICS_INFO,I.statisticsInfo)}),this._emitter.addListener(v,y)},x.prototype.off=function(v,y){this._emitter.removeListener(v,y)},x.prototype.attachMediaElement=function(v){if(this._mediaElement=v,v.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{v.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch{}},x.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},x.prototype.load=function(){if(!this._mediaElement)throw new p.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},x.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},x.prototype.play=function(){return this._mediaElement.play()},x.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(x.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(v){this._mediaElement.volume=v},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(v){this._mediaElement.muted=v},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(v){this._mediaElement?this._mediaElement.currentTime=v:this._pendingSeekTime=v},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"mediaInfo",{get:function(){var v=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",y={mimeType:v+this._mediaDataSource.type};return this._mediaElement&&(y.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(y.width=this._mediaElement.videoWidth,y.height=this._mediaElement.videoHeight)),y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"statisticsInfo",{get:function(){var v={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return v;var y=!0,I=0,S=0;if(this._mediaElement.getVideoPlaybackQuality){var T=this._mediaElement.getVideoPlaybackQuality();I=T.totalVideoFrames,S=T.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(I=this._mediaElement.webkitDecodedFrameCount,S=this._mediaElement.webkitDroppedFrameCount):y=!1;return y&&(v.decodedFrames=I,v.droppedFrames=S),v},enumerable:!1,configurable:!0}),x.prototype._onvLoadedMetadata=function(v){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(d.default.MEDIA_INFO,this.mediaInfo)},x.prototype._reportStatisticsInfo=function(){this._emitter.emit(d.default.STATISTICS_INFO,this.statisticsInfo)},x})();o.default=g}),"./src/player/player-errors.js":(function(a,o,l){l.r(o),l.d(o,{ErrorTypes:function(){return d},ErrorDetails:function(){return h}});var u=l("./src/io/loader.js"),c=l("./src/demux/demux-errors.js"),d={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},h={NETWORK_EXCEPTION:u.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:u.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:u.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:u.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:c.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:c.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:c.default.CODEC_UNSUPPORTED}}),"./src/player/player-events.js":(function(a,o,l){l.r(o);var u={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};o.default=u}),"./src/remux/aac-silent.js":(function(a,o,l){l.r(o);var u=(function(){function c(){}return c.getSilentFrame=function(d,h){if(d==="mp4a.40.2"){if(h===1)return new Uint8Array([0,200,0,128,35,128]);if(h===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(h===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(h===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(h===5)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(h===6)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(h===1)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(h===2)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(h===3)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},c})();o.default=u}),"./src/remux/mp4-generator.js":(function(a,o,l){l.r(o);var u=(function(){function c(){}return c.init=function(){c.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var d in c.types)c.types.hasOwnProperty(d)&&(c.types[d]=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)]);var h=c.constants={};h.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),h.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),h.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),h.STSC=h.STCO=h.STTS,h.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),h.HDLR_VIDEO=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]),h.HDLR_AUDIO=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]),h.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),h.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},c.box=function(d){for(var h=8,p=null,g=Array.prototype.slice.call(arguments,1),x=g.length,v=0;v<x;v++)h+=g[v].byteLength;p=new Uint8Array(h),p[0]=h>>>24&255,p[1]=h>>>16&255,p[2]=h>>>8&255,p[3]=h&255,p.set(d,4);for(var y=8,v=0;v<x;v++)p.set(g[v],y),y+=g[v].byteLength;return p},c.generateInitSegment=function(d){var h=c.box(c.types.ftyp,c.constants.FTYP),p=c.moov(d),g=new Uint8Array(h.byteLength+p.byteLength);return g.set(h,0),g.set(p,h.byteLength),g},c.moov=function(d){var h=c.mvhd(d.timescale,d.duration),p=c.trak(d),g=c.mvex(d);return c.box(c.types.moov,h,p,g)},c.mvhd=function(d,h){return c.box(c.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,d>>>24&255,d>>>16&255,d>>>8&255,d&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255,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]))},c.trak=function(d){return c.box(c.types.trak,c.tkhd(d),c.mdia(d))},c.tkhd=function(d){var h=d.id,p=d.duration,g=d.presentWidth,x=d.presentHeight;return c.box(c.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,0,0,0,0,p>>>24&255,p>>>16&255,p>>>8&255,p&255,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,g>>>8&255,g&255,0,0,x>>>8&255,x&255,0,0]))},c.mdia=function(d){return c.box(c.types.mdia,c.mdhd(d),c.hdlr(d),c.minf(d))},c.mdhd=function(d){var h=d.timescale,p=d.duration;return c.box(c.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255,85,196,0,0]))},c.hdlr=function(d){var h=null;return d.type==="audio"?h=c.constants.HDLR_AUDIO:h=c.constants.HDLR_VIDEO,c.box(c.types.hdlr,h)},c.minf=function(d){var h=null;return d.type==="audio"?h=c.box(c.types.smhd,c.constants.SMHD):h=c.box(c.types.vmhd,c.constants.VMHD),c.box(c.types.minf,h,c.dinf(),c.stbl(d))},c.dinf=function(){var d=c.box(c.types.dinf,c.box(c.types.dref,c.constants.DREF));return d},c.stbl=function(d){var h=c.box(c.types.stbl,c.stsd(d),c.box(c.types.stts,c.constants.STTS),c.box(c.types.stsc,c.constants.STSC),c.box(c.types.stsz,c.constants.STSZ),c.box(c.types.stco,c.constants.STCO));return h},c.stsd=function(d){return d.type==="audio"?d.codec==="mp3"?c.box(c.types.stsd,c.constants.STSD_PREFIX,c.mp3(d)):c.box(c.types.stsd,c.constants.STSD_PREFIX,c.mp4a(d)):c.box(c.types.stsd,c.constants.STSD_PREFIX,c.avc1(d))},c.mp3=function(d){var h=d.channelCount,p=d.audioSampleRate,g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,h,0,16,0,0,0,0,p>>>8&255,p&255,0,0]);return c.box(c.types[".mp3"],g)},c.mp4a=function(d){var h=d.channelCount,p=d.audioSampleRate,g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,h,0,16,0,0,0,0,p>>>8&255,p&255,0,0]);return c.box(c.types.mp4a,g,c.esds(d))},c.esds=function(d){var h=d.config||[],p=h.length,g=new Uint8Array([0,0,0,0,3,23+p,0,1,0,4,15+p,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([p]).concat(h).concat([6,1,2]));return c.box(c.types.esds,g)},c.avc1=function(d){var h=d.avcc,p=d.codecWidth,g=d.codecHeight,x=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,p>>>8&255,p&255,g>>>8&255,g&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return c.box(c.types.avc1,x,c.box(c.types.avcC,h))},c.mvex=function(d){return c.box(c.types.mvex,c.trex(d))},c.trex=function(d){var h=d.id,p=new Uint8Array([0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return c.box(c.types.trex,p)},c.moof=function(d,h){return c.box(c.types.moof,c.mfhd(d.sequenceNumber),c.traf(d,h))},c.mfhd=function(d){var h=new Uint8Array([0,0,0,0,d>>>24&255,d>>>16&255,d>>>8&255,d&255]);return c.box(c.types.mfhd,h)},c.traf=function(d,h){var p=d.id,g=c.box(c.types.tfhd,new Uint8Array([0,0,0,0,p>>>24&255,p>>>16&255,p>>>8&255,p&255])),x=c.box(c.types.tfdt,new Uint8Array([0,0,0,0,h>>>24&255,h>>>16&255,h>>>8&255,h&255])),v=c.sdtp(d),y=c.trun(d,v.byteLength+16+16+8+16+8+8);return c.box(c.types.traf,g,x,y,v)},c.sdtp=function(d){for(var h=d.samples||[],p=h.length,g=new Uint8Array(4+p),x=0;x<p;x++){var v=h[x].flags;g[x+4]=v.isLeading<<6|v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy}return c.box(c.types.sdtp,g)},c.trun=function(d,h){var p=d.samples||[],g=p.length,x=12+16*g,v=new Uint8Array(x);h+=8+x,v.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255],0);for(var y=0;y<g;y++){var I=p[y].duration,S=p[y].size,T=p[y].flags,E=p[y].cts;v.set([I>>>24&255,I>>>16&255,I>>>8&255,I&255,S>>>24&255,S>>>16&255,S>>>8&255,S&255,T.isLeading<<2|T.dependsOn,T.isDependedOn<<6|T.hasRedundancy<<4|T.isNonSync,0,0,E>>>24&255,E>>>16&255,E>>>8&255,E&255],12+16*y)}return c.box(c.types.trun,v)},c.mdat=function(d){return c.box(c.types.mdat,d)},c})();u.init(),o.default=u}),"./src/remux/mp4-remuxer.js":(function(a,o,l){l.r(o);var u=l("./src/utils/logger.js"),c=l("./src/remux/mp4-generator.js"),d=l("./src/remux/aac-silent.js"),h=l("./src/utils/browser.js"),p=l("./src/core/media-segment-info.js"),g=l("./src/utils/exception.js"),x=(function(){function v(y){this.TAG="MP4Remuxer",this._config=y,this._isLive=y.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new p.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new p.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(h.default.chrome&&(h.default.version.major<50||h.default.version.major===50&&h.default.version.build<2661)),this._fillSilentAfterSeek=h.default.msedge||h.default.msie,this._mp3UseMpegAudio=!h.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return v.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},v.prototype.bindDataSource=function(y){return y.onDataAvailable=this.remux.bind(this),y.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(v.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(y){this._onInitSegment=y},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(y){this._onMediaSegment=y},enumerable:!1,configurable:!0}),v.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},v.prototype.seek=function(y){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},v.prototype.remux=function(y,I){if(!this._onMediaSegment)throw new g.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(y,I),this._remuxVideo(I),this._remuxAudio(y)},v.prototype._onTrackMetadataReceived=function(y,I){var S=null,T="mp4",E=I.codec;if(y==="audio")this._audioMeta=I,I.codec==="mp3"&&this._mp3UseMpegAudio?(T="mpeg",E="",S=new Uint8Array):S=c.default.generateInitSegment(I);else if(y==="video")this._videoMeta=I,S=c.default.generateInitSegment(I);else return;if(!this._onInitSegment)throw new g.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(y,{type:y,data:S.buffer,codec:E,container:y+"/"+T,mediaDuration:I.duration})},v.prototype._calculateDtsBase=function(y,I){this._dtsBaseInited||(y.samples&&y.samples.length&&(this._audioDtsBase=y.samples[0].dts),I.samples&&I.samples.length&&(this._videoDtsBase=I.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},v.prototype.flushStashedSamples=function(){var y=this._videoStashedLastSample,I=this._audioStashedLastSample,S={type:"video",id:1,sequenceNumber:0,samples:[],length:0};y!=null&&(S.samples.push(y),S.length=y.length);var T={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};I!=null&&(T.samples.push(I),T.length=I.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(S,!0),this._remuxAudio(T,!0)},v.prototype._remuxAudio=function(y,I){if(this._audioMeta!=null){var S=y,T=S.samples,E=void 0,B=-1,P=-1,M=this._audioMeta.refSampleDuration,O=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,k=this._dtsBaseInited&&this._audioNextDts===void 0,V=!1;if(!(!T||T.length===0)&&!(T.length===1&&!I)){var U=0,z=null,Z=0;O?(U=0,Z=S.length):(U=8,Z=8+S.length);var j=null;if(T.length>1&&(j=T.pop(),Z-=j.length),this._audioStashedLastSample!=null){var K=this._audioStashedLastSample;this._audioStashedLastSample=null,T.unshift(K),Z+=K.length}j!=null&&(this._audioStashedLastSample=j);var J=T[0].dts-this._dtsBase;if(this._audioNextDts)E=J-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())E=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(V=!0);else{var q=this._audioSegmentInfoList.getLastSampleBefore(J);if(q!=null){var ie=J-(q.originalDts+q.duration);ie<=3&&(ie=0);var ne=q.dts+q.duration+ie;E=J-ne}else E=0}if(V){var le=J-E,de=this._videoSegmentInfoList.getLastSegmentBefore(J);if(de!=null&&de.beginDts<le){var he=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(he){var ge=de.beginDts,ce=le-de.beginDts;u.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+ge+", duration: "+ce),T.unshift({unit:he,dts:ge,pts:ge}),Z+=he.byteLength}}else V=!1}for(var me=[],te=0;te<T.length;te++){var K=T[te],fe=K.unit,Te=K.dts-this._dtsBase,ge=Te,Ne=!1,Le=null,Ae=0;if(!(Te<-.001)){if(this._audioMeta.codec!=="mp3"){var Oe=Te,He=3;if(this._audioNextDts&&(Oe=this._audioNextDts),E=Te-Oe,E<=-He*M){u.default.w(this.TAG,"Dropping 1 audio frame (originalDts: "+Te+" ms ,curRefDts: "+Oe+" ms) due to dtsCorrection: "+E+" ms overlap.");continue}else if(E>=He*M&&this._fillAudioTimestampGap&&!h.default.safari){Ne=!0;var Ee=Math.floor(E/M);u.default.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
53
|
-
`+("originalDts: "+Te+" ms, curRefDts: "+Oe+" ms, ")+("dtsCorrection: "+Math.round(E)+" ms, generate: "+Ee+" frames")),ge=Math.floor(Oe),Ae=Math.floor(Oe+M)-ge;var he=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);he==null&&(u.default.w(this.TAG,"Unable to generate silent frame for "+(this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame")),he=fe),Le=[];for(var je=0;je<Ee;je++){Oe=Oe+M;var lt=Math.floor(Oe),At=Math.floor(Oe+M)-lt,gt={dts:lt,pts:lt,cts:0,unit:he,size:he.byteLength,duration:At,originalDts:Te,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Le.push(gt),Z+=gt.size}this._audioNextDts=Oe+M}else ge=Math.floor(Oe),Ae=Math.floor(Oe+M)-ge,this._audioNextDts=Oe+M}else{if(ge=Te-E,te!==T.length-1){var Vt=T[te+1].dts-this._dtsBase-E;Ae=Vt-ge}else if(j!=null){var Vt=j.dts-this._dtsBase-E;Ae=Vt-ge}else me.length>=1?Ae=me[me.length-1].duration:Ae=Math.floor(M);this._audioNextDts=ge+Ae}B===-1&&(B=ge),me.push({dts:ge,pts:ge,cts:0,unit:K.unit,size:K.unit.byteLength,duration:Ae,originalDts:Te,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Ne&&me.push.apply(me,Le)}}if(me.length===0){S.samples=[],S.length=0;return}O?z=new Uint8Array(Z):(z=new Uint8Array(Z),z[0]=Z>>>24&255,z[1]=Z>>>16&255,z[2]=Z>>>8&255,z[3]=Z&255,z.set(c.default.types.mdat,4));for(var te=0;te<me.length;te++){var fe=me[te].unit;z.set(fe,U),U+=fe.byteLength}var yt=me[me.length-1];P=yt.dts+yt.duration;var Dt=new p.MediaSegmentInfo;Dt.beginDts=B,Dt.endDts=P,Dt.beginPts=B,Dt.endPts=P,Dt.originalBeginDts=me[0].originalDts,Dt.originalEndDts=yt.originalDts+yt.duration,Dt.firstSample=new p.SampleInfo(me[0].dts,me[0].pts,me[0].duration,me[0].originalDts,!1),Dt.lastSample=new p.SampleInfo(yt.dts,yt.pts,yt.duration,yt.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Dt),S.samples=me,S.sequenceNumber++;var Pe=null;O?Pe=new Uint8Array:Pe=c.default.moof(S,B),S.samples=[],S.length=0;var Se={type:"audio",data:this._mergeBoxes(Pe,z).buffer,sampleCount:me.length,info:Dt};O&&k&&(Se.timestampOffset=B),this._onMediaSegment("audio",Se)}}},v.prototype._remuxVideo=function(y,I){if(this._videoMeta!=null){var S=y,T=S.samples,E=void 0,B=-1,P=-1,M=-1,O=-1;if(!(!T||T.length===0)&&!(T.length===1&&!I)){var k=8,V=null,U=8+y.length,z=null;if(T.length>1&&(z=T.pop(),U-=z.length),this._videoStashedLastSample!=null){var Z=this._videoStashedLastSample;this._videoStashedLastSample=null,T.unshift(Z),U+=Z.length}z!=null&&(this._videoStashedLastSample=z);var j=T[0].dts-this._dtsBase;if(this._videoNextDts)E=j-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())E=0;else{var K=this._videoSegmentInfoList.getLastSampleBefore(j);if(K!=null){var J=j-(K.originalDts+K.duration);J<=3&&(J=0);var q=K.dts+K.duration+J;E=j-q}else E=0}for(var ie=new p.MediaSegmentInfo,ne=[],le=0;le<T.length;le++){var Z=T[le],de=Z.dts-this._dtsBase,he=Z.isKeyframe,ge=de-E,ce=Z.cts,me=ge+ce;B===-1&&(B=ge,M=me);var te=0;if(le!==T.length-1){var fe=T[le+1].dts-this._dtsBase-E;te=fe-ge}else if(z!=null){var fe=z.dts-this._dtsBase-E;te=fe-ge}else ne.length>=1?te=ne[ne.length-1].duration:te=Math.floor(this._videoMeta.refSampleDuration);if(he){var Te=new p.SampleInfo(ge,me,te,Z.dts,!0);Te.fileposition=Z.fileposition,ie.appendSyncPoint(Te)}ne.push({dts:ge,pts:me,cts:ce,units:Z.units,size:Z.length,isKeyframe:he,duration:te,originalDts:de,flags:{isLeading:0,dependsOn:he?2:1,isDependedOn:he?1:0,hasRedundancy:0,isNonSync:he?0:1}})}V=new Uint8Array(U),V[0]=U>>>24&255,V[1]=U>>>16&255,V[2]=U>>>8&255,V[3]=U&255,V.set(c.default.types.mdat,4);for(var le=0;le<ne.length;le++)for(var Ne=ne[le].units;Ne.length;){var Le=Ne.shift(),Ae=Le.data;V.set(Ae,k),k+=Ae.byteLength}var Oe=ne[ne.length-1];if(P=Oe.dts+Oe.duration,O=Oe.pts+Oe.duration,this._videoNextDts=P,ie.beginDts=B,ie.endDts=P,ie.beginPts=M,ie.endPts=O,ie.originalBeginDts=ne[0].originalDts,ie.originalEndDts=Oe.originalDts+Oe.duration,ie.firstSample=new p.SampleInfo(ne[0].dts,ne[0].pts,ne[0].duration,ne[0].originalDts,ne[0].isKeyframe),ie.lastSample=new p.SampleInfo(Oe.dts,Oe.pts,Oe.duration,Oe.originalDts,Oe.isKeyframe),this._isLive||this._videoSegmentInfoList.append(ie),S.samples=ne,S.sequenceNumber++,this._forceFirstIDR){var He=ne[0].flags;He.dependsOn=2,He.isNonSync=0}var Ee=c.default.moof(S,B);S.samples=[],S.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Ee,V).buffer,sampleCount:ne.length,info:ie})}}},v.prototype._mergeBoxes=function(y,I){var S=new Uint8Array(y.byteLength+I.byteLength);return S.set(y,0),S.set(I,y.byteLength),S},v})();o.default=x}),"./src/utils/browser.js":(function(a,o,l){l.r(o);var u={};function c(){var d=self.navigator.userAgent.toLowerCase(),h=/(edge)\/([\w.]+)/.exec(d)||/(opr)[\/]([\w.]+)/.exec(d)||/(chrome)[ \/]([\w.]+)/.exec(d)||/(iemobile)[\/]([\w.]+)/.exec(d)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(d)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(d)||/(webkit)[ \/]([\w.]+)/.exec(d)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(d)||/(msie) ([\w.]+)/.exec(d)||d.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(d)||d.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(d)||[],p=/(ipad)/.exec(d)||/(ipod)/.exec(d)||/(windows phone)/.exec(d)||/(iphone)/.exec(d)||/(kindle)/.exec(d)||/(android)/.exec(d)||/(windows)/.exec(d)||/(mac)/.exec(d)||/(linux)/.exec(d)||/(cros)/.exec(d)||[],g={browser:h[5]||h[3]||h[1]||"",version:h[2]||h[4]||"0",majorVersion:h[4]||h[2]||"0",platform:p[0]||""},x={};if(g.browser){x[g.browser]=!0;var v=g.majorVersion.split(".");x.version={major:parseInt(g.majorVersion,10),string:g.version},v.length>1&&(x.version.minor=parseInt(v[1],10)),v.length>2&&(x.version.build=parseInt(v[2],10))}if(g.platform&&(x[g.platform]=!0),(x.chrome||x.opr||x.safari)&&(x.webkit=!0),x.rv||x.iemobile){x.rv&&delete x.rv;var y="msie";g.browser=y,x[y]=!0}if(x.edge){delete x.edge;var I="msedge";g.browser=I,x[I]=!0}if(x.opr){var S="opera";g.browser=S,x[S]=!0}if(x.safari&&x.android){var T="android";g.browser=T,x[T]=!0}x.name=g.browser,x.platform=g.platform;for(var E in u)u.hasOwnProperty(E)&&delete u[E];Object.assign(u,x)}c(),o.default=u}),"./src/utils/exception.js":(function(a,o,l){l.r(o),l.d(o,{RuntimeException:function(){return c},IllegalStateException:function(){return d},InvalidArgumentException:function(){return h},NotImplementedException:function(){return p}});var u=(function(){var g=function(x,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,I){y.__proto__=I}||function(y,I){for(var S in I)Object.prototype.hasOwnProperty.call(I,S)&&(y[S]=I[S])},g(x,v)};return function(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");g(x,v);function y(){this.constructor=x}x.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),c=(function(){function g(x){this._message=x}return Object.defineProperty(g.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),g.prototype.toString=function(){return this.name+": "+this.message},g})(),d=(function(g){u(x,g);function x(v){return g.call(this,v)||this}return Object.defineProperty(x.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),x})(c),h=(function(g){u(x,g);function x(v){return g.call(this,v)||this}return Object.defineProperty(x.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),x})(c),p=(function(g){u(x,g);function x(v){return g.call(this,v)||this}return Object.defineProperty(x.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),x})(c)}),"./src/utils/logger.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=(function(){function h(){}return h.e=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","error",x),h.ENABLE_ERROR},h.i=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","info",x),h.ENABLE_INFO},h.w=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","warn",x),h.ENABLE_WARN},h.d=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","debug",x),h.ENABLE_DEBUG},h.v=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","verbose",x),h.ENABLE_VERBOSE},h})();d.GLOBAL_TAG="flv.js",d.FORCE_GLOBAL_TAG=!1,d.ENABLE_ERROR=!0,d.ENABLE_INFO=!0,d.ENABLE_WARN=!0,d.ENABLE_DEBUG=!0,d.ENABLE_VERBOSE=!0,d.ENABLE_CALLBACK=!1,d.emitter=new(c()),o.default=d}),"./src/utils/logging-control.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./src/utils/logger.js"),h=(function(){function p(){}return Object.defineProperty(p,"forceGlobalTag",{get:function(){return d.default.FORCE_GLOBAL_TAG},set:function(g){d.default.FORCE_GLOBAL_TAG=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"globalTag",{get:function(){return d.default.GLOBAL_TAG},set:function(g){d.default.GLOBAL_TAG=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableAll",{get:function(){return d.default.ENABLE_VERBOSE&&d.default.ENABLE_DEBUG&&d.default.ENABLE_INFO&&d.default.ENABLE_WARN&&d.default.ENABLE_ERROR},set:function(g){d.default.ENABLE_VERBOSE=g,d.default.ENABLE_DEBUG=g,d.default.ENABLE_INFO=g,d.default.ENABLE_WARN=g,d.default.ENABLE_ERROR=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableDebug",{get:function(){return d.default.ENABLE_DEBUG},set:function(g){d.default.ENABLE_DEBUG=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableVerbose",{get:function(){return d.default.ENABLE_VERBOSE},set:function(g){d.default.ENABLE_VERBOSE=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableInfo",{get:function(){return d.default.ENABLE_INFO},set:function(g){d.default.ENABLE_INFO=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableWarn",{get:function(){return d.default.ENABLE_WARN},set:function(g){d.default.ENABLE_WARN=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableError",{get:function(){return d.default.ENABLE_ERROR},set:function(g){d.default.ENABLE_ERROR=g,p._notifyChange()},enumerable:!1,configurable:!0}),p.getConfig=function(){return{globalTag:d.default.GLOBAL_TAG,forceGlobalTag:d.default.FORCE_GLOBAL_TAG,enableVerbose:d.default.ENABLE_VERBOSE,enableDebug:d.default.ENABLE_DEBUG,enableInfo:d.default.ENABLE_INFO,enableWarn:d.default.ENABLE_WARN,enableError:d.default.ENABLE_ERROR,enableCallback:d.default.ENABLE_CALLBACK}},p.applyConfig=function(g){d.default.GLOBAL_TAG=g.globalTag,d.default.FORCE_GLOBAL_TAG=g.forceGlobalTag,d.default.ENABLE_VERBOSE=g.enableVerbose,d.default.ENABLE_DEBUG=g.enableDebug,d.default.ENABLE_INFO=g.enableInfo,d.default.ENABLE_WARN=g.enableWarn,d.default.ENABLE_ERROR=g.enableError,d.default.ENABLE_CALLBACK=g.enableCallback},p._notifyChange=function(){var g=p.emitter;if(g.listenerCount("change")>0){var x=p.getConfig();g.emit("change",x)}},p.registerListener=function(g){p.emitter.addListener("change",g)},p.removeListener=function(g){p.emitter.removeListener("change",g)},p.addLogListener=function(g){d.default.emitter.addListener("log",g),d.default.emitter.listenerCount("log")>0&&(d.default.ENABLE_CALLBACK=!0,p._notifyChange())},p.removeLogListener=function(g){d.default.emitter.removeListener("log",g),d.default.emitter.listenerCount("log")===0&&(d.default.ENABLE_CALLBACK=!1,p._notifyChange())},p})();h.emitter=new(c()),o.default=h}),"./src/utils/polyfill.js":(function(a,o,l){l.r(o);var u=(function(){function c(){}return c.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(d,h){return d.__proto__=h,d},Object.assign=Object.assign||function(d){if(d==null)throw new TypeError("Cannot convert undefined or null to object");for(var h=Object(d),p=1;p<arguments.length;p++){var g=arguments[p];if(g!=null)for(var x in g)g.hasOwnProperty(x)&&(h[x]=g[x])}return h},typeof self.Promise!="function"&&l("./node_modules/es6-promise/dist/es6-promise.js").polyfill()},c})();u.install(),o.default=u}),"./src/utils/utf8-conv.js":(function(a,o,l){l.r(o);function u(d,h,p){var g=d;if(h+p<g.length){for(;p--;)if((g[++h]&192)!==128)return!1;return!0}else return!1}function c(d){for(var h=[],p=d,g=0,x=d.length;g<x;){if(p[g]<128){h.push(String.fromCharCode(p[g])),++g;continue}else if(!(p[g]<192)){if(p[g]<224){if(u(p,g,1)){var v=(p[g]&31)<<6|p[g+1]&63;if(v>=128){h.push(String.fromCharCode(v&65535)),g+=2;continue}}}else if(p[g]<240){if(u(p,g,2)){var v=(p[g]&15)<<12|(p[g+1]&63)<<6|p[g+2]&63;if(v>=2048&&(v&63488)!==55296){h.push(String.fromCharCode(v&65535)),g+=3;continue}}}else if(p[g]<248&&u(p,g,3)){var v=(p[g]&7)<<18|(p[g+1]&63)<<12|(p[g+2]&63)<<6|p[g+3]&63;if(v>65536&&v<1114112){v-=65536,h.push(String.fromCharCode(v>>>10|55296)),h.push(String.fromCharCode(v&1023|56320)),g+=4;continue}}}h.push("�"),++g}return h.join("")}o.default=c})},r={};function n(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a].call(l.exports,l,l.exports,n),l.exports}n.m=t,(function(){n.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return n.d(o,{a:o}),o}})(),(function(){n.d=function(a,o){for(var l in o)n.o(o,l)&&!n.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:o[l]})}})(),(function(){n.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){n.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)}})(),(function(){n.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})}})();var s=n("./src/index.js");return s})()})})(d8e)),d8e.exports}var Nyi=Myi();const c4t=m6(Nyi),d4t="2.0.0",Oyi=i=>{const e=Zt.cloneDeep(i);return e.version!==d4t?{config:{controls:e.controls,loop:e.loop,muted:e.muted,poster:e.poster,autoplay:e.autoplay},version:d4t}:i},Lyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.option),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0}),ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},kyi=["poster","autoplay","controls","loop","muted"],Gyi=Kt({...Kt({name:"ShjFlv"}),props:{option:{},sources:{},useEvents:{}},emits:["on-video-progress","on-video-play","on-video-pause","on-video-ended","on-video-playing","on-video-timeupdate","on-video-error","on-video-volumechange"],setup(i,{expose:e,emit:t}){const r=kr(()=>Oyi(i.option)),n=Wt(),s=Wt("");let a=null;const o=()=>{a&&(a.pause(),a.unload(),a.detachMediaElement(),a.destroy(),a=null),ao.parse({sources:i.sources,callback:({data:y})=>{try{if(ni.parseEvents(i.useEvents,"dataListener",y),s.value=y[0].data[0].src,!s.value)return;if(c4t.isSupported())try{a=c4t.createPlayer({type:"flv",url:s.value,isLive:!1,hasAudio:!0,hasVideo:!0,cors:!0,withCredentials:!1}),a.attachMediaElement(n.value),a.load(),r.value.config.autoplay&&a.play()}catch{}}catch{ni.parseEvents(i.useEvents,"dataListener",null)}}})};I0(()=>{a&&(a.pause(),a.unload(),a.detachMediaElement(),a.destroy(),a=null)});const l=t,u=()=>{l("on-video-progress"),ni.parseEvents(i.useEvents,"on-video-progress")},c=()=>{l("on-video-play"),ni.parseEvents(i.useEvents,"on-video-play")},d=()=>{l("on-video-pause"),ni.parseEvents(i.useEvents,"on-video-pause")},h=()=>{l("on-video-ended"),ni.parseEvents(i.useEvents,"on-video-ended")},p=()=>{l("on-video-playing"),ni.parseEvents(i.useEvents,"on-video-playing")},g=()=>{l("on-video-timeupdate"),ni.parseEvents(i.useEvents,"on-video-timeupdate")},x=()=>{l("on-video-error"),ni.parseEvents(i.useEvents,"on-video-error")},v=()=>{l("on-video-volumechange"),ni.parseEvents(i.useEvents,"on-video-volumechange")};return na(()=>{Ha(()=>{o()})}),Lyi({option:r.value,sources:i.sources},o),e({play:()=>{n.value&&n.value.play()},pause:()=>{n.value&&n.value.pause()},refresh:()=>o(),refreshView:()=>o(),refreshData:()=>o()}),(y,I)=>(wt(),Ir("video",{ref_key:"videoRef",ref:n,class:"zerov-widget",poster:r.value.config.poster,autoplay:r.value.config.autoplay,controls:r.value.config.controls,loop:r.value.config.loop,muted:r.value.config.muted,onProgress:u,onPlay:c,onEnded:h,onPlaying:p,onPause:d,onTimeupdate:g,onError:x,onVolumechange:v},null,40,kyi))}}),h4t=Zi(Gyi),Vyi=i=>i,Wyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},Uyi=["src"],Hyi=Kt({...Kt({name:"ShjIframe"}),props:{option:{},sources:{},useEvents:{}},emits:["on-iframe-event-listener"],setup(i,{expose:e,emit:t}){const r=Wt(),n=kr(()=>Vyi(i.option)),s=Wt(""),a=()=>{ao.parse({sources:i.sources,callback:({data:u})=>{try{ni.parseEvents(i.useEvents,"dataListener",u),s.value=u[0].data[0].url}catch{ni.parseEvents(i.useEvents,"dataListener",null),s.value=""}}})},o=t,l=u=>{u.source===r.value?.contentWindow&&(o("on-iframe-event-listener",u.data),i.useEvents&&Zt.isArray(i.useEvents)&&ni.parseEvents(i.useEvents,"on-iframe-event-listener",u.data))};return na(()=>{Ha(()=>{a()}),window.addEventListener("message",l,!1)}),I0(()=>{window.removeEventListener("message",l,!1)}),Wyi({option:n.value,sources:i.sources},a),e({refresh:()=>a(),refreshView:()=>a(),refreshData:()=>a(),sendChildrenMessages:(u,c)=>{if(r.value?.contentWindow)try{c[0].dataType==="params"?r.value.contentWindow.postMessage(u,s.value):r.value.contentWindow.postMessage(c[0].data,s.value)}catch{}}}),(u,c)=>s.value?(wt(),Ir("iframe",{key:0,ref_key:"iframeRef",ref:r,src:s.value,class:"iframe",sandbox:"allow-scripts allow-same-origin allow-forms"},null,8,Uyi)):wi("",!0)}}),f4t=Zi(zl(Hyi,[["__scopeId","data-v-71d48c51"]])),p4t="2.0.0",Zyi=i=>{const e=Zt.cloneDeep(i);return e.version!==p4t?{carousel:{iframes:e.iframes,pagination:e.pagination,freeMode:e.freeMode,reverseDirection:e.reverseDirection,slidesPerView:e.slidesPerView,speed:e.speed,spaceBetween:e.spaceBetween,autoplay:e.autoplay,pauseOnMouseEnter:e.pauseOnMouseEnter,delay:e.delay,paginationType:e.paginationType,rewind:e.rewind,loop:e.loop,grabCursor:e.grabCursor,effect:e.effect,stopOnLastSlide:e.stopOnLastSlide,roundLengths:e.roundLengths,direction:e.direction},version:p4t}:i},zyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.option),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0}),ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})};var h8e={exports:{}},g4t;function Xyi(){if(g4t)return h8e.exports;g4t=1;var i=h8e.exports={},e,t;function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=r}catch{e=r}try{typeof clearTimeout=="function"?t=clearTimeout:t=n}catch{t=n}})();function s(x){if(e===setTimeout)return setTimeout(x,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(x,0);try{return e(x,0)}catch{try{return e.call(null,x,0)}catch{return e.call(this,x,0)}}}function a(x){if(t===clearTimeout)return clearTimeout(x);if((t===n||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(x);try{return t(x)}catch{try{return t.call(null,x)}catch{return t.call(this,x)}}}var o=[],l=!1,u,c=-1;function d(){!l||!u||(l=!1,u.length?o=u.concat(o):c=-1,o.length&&h())}function h(){if(!l){var x=s(d);l=!0;for(var v=o.length;v;){for(u=o,o=[];++c<v;)u&&u[c].run();c=-1,v=o.length}u=null,l=!1,a(x)}}i.nextTick=function(x){var v=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)v[y-1]=arguments[y];o.push(new p(x,v)),o.length===1&&!l&&s(h)};function p(x,v){this.fun=x,this.array=v}p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function g(){}return i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(x){return[]},i.binding=function(x){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(x){throw new Error("process.chdir is not supported")},i.umask=function(){return 0},h8e.exports}var tue=Xyi();const Yyi=["src"],jyi=Kt({...Kt({name:"ShjIframeCarousel"}),props:{option:{}},setup(i,{expose:e}){a4t();const t=kr(()=>Zyi(i.option)),r=Wt(So()),n=()=>{r.value=So()};return na(()=>{tue.nextTick(()=>{n()})}),zyi({option:t.value,sources:[]},n),e({refresh:()=>n(),refreshView:()=>n(),refreshData:()=>n()}),(s,a)=>{const o=NS("swiper-slide"),l=NS("swiper-container");return wt(),Ni(l,{key:r.value,class:"carousel",direction:t.value.carousel.direction,speed:t.value.carousel.speed,"round-lengths":t.value.carousel.roundLengths,"grab-cursor":t.value.carousel.grabCursor,rewind:t.value.carousel.rewind,loop:t.value.carousel.loop,"slides-per-view":t.value.carousel.slidesPerView,"space-between":t.value.carousel.spaceBetween,autoplay:t.value.carousel.autoplay,delay:t.value.carousel.delay,"stop-on-last-slide":t.value.carousel.stopOnLastSlide,"reverse-direction":t.value.carousel.reverseDirection,"pause-on-mouse-enter":t.value.carousel.pauseOnMouseEnter,"free-mode":t.value.carousel.freeMode,effect:t.value.carousel.effect,pagination:t.value.carousel.pagination,"pagination-type":t.value.carousel.paginationType},{default:po(()=>[(wt(!0),Ir(Zs,null,ol(t.value.carousel.iframes,(u,c)=>(wt(),Ni(o,{key:u},{default:po(()=>[vi("iframe",{src:u.url,class:"iframe-slide",sandbox:"allow-scripts allow-same-origin"},null,8,Yyi)]),_:2},1024))),128))]),_:1},8,["direction","speed","round-lengths","grab-cursor","rewind","loop","slides-per-view","space-between","autoplay","delay","stop-on-last-slide","reverse-direction","pause-on-mouse-enter","free-mode","effect","pagination","pagination-type"])}}}),m4t=Zi(zl(jyi,[["__scopeId","data-v-e31f4b25"]])),x4t="2.0.0",Kyi=i=>{const e=Zt.cloneDeep(i);return e.version!==x4t?{base:{url:e.url,mode:e.mode,positionX:e.positionX,positionY:e.positionY,borderRadius:e.borderRadius},version:x4t}:i},Qyi=Kt({...Kt({name:"ShjImage"}),props:{option:{}},setup(i,{expose:e}){const t=kr(()=>Kyi(i.option));return e({refresh:()=>{},refreshView:()=>{},refreshData:()=>{}}),(r,n)=>(wt(),Ir("div",{class:"image",style:Dn({"--image-url":`url('${t.value.base.url}')`,"--image-border-radius":t.value.base.borderRadius+"px","--image-repeat":t.value.base.mode==="repeat"?"repeat":"no-repeat","--image-size":t.value.base.mode==="repeat"?"auto":t.value.base.mode,"--image-position-x":t.value.base.positionX+"px","--image-position-y":t.value.base.positionY+"px"})},null,4))}}),v4t=Zi(zl(Qyi,[["__scopeId","data-v-3ef4f9e8"]])),y4t="2.0.0",Jyi=i=>{const e=Zt.cloneDeep(i);return e.version!==y4t?{base:{mode:e.mode,positionX:e.positionX,positionY:e.positionY,borderRadius:e.borderRadius},version:y4t}:i},qyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},$yi=Kt({...Kt({name:"ShjImageDynamic"}),props:{option:{},sources:{},useEvents:{}},setup(i,{expose:e}){const t=kr(()=>Jyi(i.option)),r=Wt(""),n=()=>{ao.parse({sources:i.sources,callback:({data:s})=>{try{ni.parseEvents(i.useEvents,"dataListener",s),r.value=s[0].data[0].src}catch{ni.parseEvents(i.useEvents,"dataListener",null),r.value=""}}})};return na(()=>{Ha(()=>{n()})}),qyi({option:t.value,sources:i.sources},n),e({refresh:()=>n(),refreshView:()=>n(),refreshData:()=>n()}),(s,a)=>(wt(),Ir("div",{class:"image",style:Dn({"--image-url":`url('${r.value}')`,"--image-border-radius":t.value.base.borderRadius+"px","--image-repeat":t.value.base.mode==="repeat"?"repeat":"no-repeat","--image-size":t.value.base.mode==="repeat"?"auto":t.value.base.mode,"--image-position-x":t.value.base.positionX+"px","--image-position-y":t.value.base.positionY+"px"})},null,4))}}),C4t=Zi(zl($yi,[["__scopeId","data-v-7b570c4e"]])),ga=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},e3i=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=t3i},t3i=Number.MAX_SAFE_INTEGER||9007199254740991;let $a=(function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i})({}),Hi=(function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i})({}),Et=(function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i})({});var tc={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Wa={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class xG{constructor(e,t=0,r=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class r3i{constructor(e,t,r,n=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new xG(e),this.fast_=new xG(t),this.defaultTTFB_=n,this.ttfb_=new xG(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:s}=this;r.halfLife!==e&&(this.slow_=new xG(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new xG(t,n.getEstimate(),n.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new xG(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,s=r/n;this.fast_.sample(n,s),this.slow_.sample(n,s)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function i3i(i,e,t){return(e=s3i(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function gh(){return gh=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},gh.apply(null,arguments)}function A4t(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function Qd(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?A4t(Object(t),!0).forEach(function(r){i3i(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):A4t(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function n3i(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function s3i(i){var e=n3i(i,"string");return typeof e=="symbol"?e:e+""}let Y8=class{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const r=`[${e}]:`;this.trace=E6,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)}};const E6=function(){},a3i={trace:E6,debug:E6,log:E6,warn:E6,info:E6,error:E6};function f8e(){return gh({},a3i)}function o3i(i,e){const t=self.console[i];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${i}] >`):E6}function b4t(i,e,t){return e[i]?e[i].bind(e):o3i(i,t)}const p8e=f8e();function l3i(i,e,t){const r=f8e();if(typeof console=="object"&&i===!0||typeof i=="object"){const n=["debug","log","info","warn","error"];n.forEach(s=>{r[s]=b4t(s,i,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.5`)}catch{return f8e()}n.forEach(s=>{p8e[s]=b4t(s,i)})}else gh(p8e,r);return r}const Cd=p8e;function T6(i=!0){return typeof self>"u"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function u3i(i){return typeof self<"u"&&i===self.ManagedMediaSource}function I4t(i,e){const t=Object.keys(i),r=Object.keys(e),n=t.length,s=r.length;return!n||!s||n===s&&!t.some(a=>r.indexOf(a)===-1)}function AC(i,e=!1){if(typeof TextDecoder<"u"){const u=new TextDecoder("utf-8").decode(i);if(e){const c=u.indexOf("\0");return c!==-1?u.substring(0,c):u}return u.replace(/\0/g,"")}const t=i.length;let r,n,s,a="",o=0;for(;o<t;){if(r=i[o++],r===0&&e)return a;if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:n=i[o++],a+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=i[o++],s=i[o++],a+=String.fromCharCode((r&15)<<12|(n&63)<<6|(s&63)<<0);break}}return a}const zS={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let r=i[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}};function c3i(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var g8e={exports:{}},_4t;function d3i(){return _4t||(_4t=1,(function(i,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,u,c){if(c=c||{},l=l.trim(),u=u.trim(),!u){if(!c.alwaysNormalize)return l;var d=o.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=o.normalizePath(d.path),o.buildURLFromParts(d)}var h=o.parseURL(u);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return c.alwaysNormalize?(h.path=o.normalizePath(h.path),o.buildURLFromParts(h)):u;var p=o.parseURL(l);if(!p)throw new Error("Error trying to parse base URL.");if(!p.netLoc&&p.path&&p.path[0]!=="/"){var g=n.exec(p.path);p.netLoc=g[1],p.path=g[2]}p.netLoc&&!p.path&&(p.path="/");var x={scheme:p.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(x.netLoc=p.netLoc,h.path[0]!=="/"))if(!h.path)x.path=p.path,h.params||(x.params=p.params,h.query||(x.query=p.query));else{var v=p.path,y=v.substring(0,v.lastIndexOf("/")+1)+h.path;x.path=o.normalizePath(y)}return x.path===null&&(x.path=c.alwaysNormalize?o.normalizePath(h.path):h.path),o.buildURLFromParts(x)},parseURL:function(l){var u=r.exec(l);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(s,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};i.exports=o})()})(g8e)),g8e.exports}var m8e=d3i();class x8e{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Kh={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class D4t{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,f3i(this,"stats")}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=t?.byteRangeEndOffset||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[Kh.AUDIO]:null,[Kh.VIDEO]:null,[Kh.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new x8e),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=m8e.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Kh.AUDIO]=null,e[Kh.VIDEO]=null,e[Kh.AUDIOVIDEO]=null}}function sm(i){return i.sn!=="initSegment"}class v8e extends D4t{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(ga(e)&&ga(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const r=Object.keys(this.levelkeys);if(r.length===1)return this._decryptdata=this.levelkeys[r[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=ga(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),r=t.length;if(r>1||r===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!ga(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return sm(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,n,s,a=!1){const{elementaryStreams:o}=this,l=o[e];if(!l){o[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:s,partial:a};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,r),l.startDTS=Math.min(l.startDTS,n),l.endDTS=Math.max(l.endDTS,s)}}class h3i extends D4t{constructor(e,t,r,n,s){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=n;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,s),s&&(this.fragOffset=s.fragOffset+s.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function S4t(i,e){const t=Object.getPrototypeOf(i);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||S4t(t,e)}}function f3i(i,e){const t=S4t(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}const rue=Math.pow(2,32)-1,p3i=[].push,E4t={video:1,audio:2,id3:3,text:4};function u1(i){return String.fromCharCode.apply(null,i)}function T4t(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function el(i,e){const t=w4t(i,e);return t<0?4294967296+t:t}function R4t(i,e){let t=el(i,e);return t*=Math.pow(2,32),t+=el(i,e+4),t}function w4t(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function y8e(i,e,t){i[e]=t>>24,i[e+1]=t>>16&255,i[e+2]=t>>8&255,i[e+3]=t&255}function g3i(i){const e=i.byteLength;for(let t=0;t<e;){const r=el(i,t);if(r>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=r>1?t+r:e}return!1}function hu(i,e){const t=[];if(!e.length)return t;const r=i.byteLength;for(let n=0;n<r;){const s=el(i,n),a=u1(i.subarray(n+4,n+8)),o=s>1?n+s:r;if(a===e[0])if(e.length===1)t.push(i.subarray(n+8,o));else{const l=hu(i.subarray(n+8,o),e.slice(1));l.length&&p3i.apply(t,l)}n=o}return t}function m3i(i){const e=[],t=i[0];let r=8;const n=el(i,r);r+=4;let s=0,a=0;t===0?(s=el(i,r),a=el(i,r+4),r+=8):(s=R4t(i,r),a=R4t(i,r+8),r+=16),r+=2;let o=i.length+a;const l=T4t(i,r);r+=2;for(let u=0;u<l;u++){let c=r;const d=el(i,c);c+=4;const h=d&2147483647;if((d&2147483648)>>>31===1)return Cd.warn("SIDX has hierarchical references (not supported)"),null;const g=el(i,c);c+=4,e.push({referenceSize:h,subsegmentDuration:g,info:{duration:g/n,start:o,end:o+h-1}}),o+=h,c+=4,r=c}return{earliestPresentationTime:s,timescale:n,version:t,referencesCount:l,references:e}}function F4t(i){const e=[],t=hu(i,["moov","trak"]);for(let n=0;n<t.length;n++){const s=t[n],a=hu(s,["tkhd"])[0];if(a){let o=a[0];const l=el(a,o===0?12:20),u=hu(s,["mdia","mdhd"])[0];if(u){o=u[0];const c=el(u,o===0?12:20),d=hu(s,["mdia","hdlr"])[0];if(d){const h=u1(d.subarray(8,12)),p={soun:Kh.AUDIO,vide:Kh.VIDEO}[h],g=hu(s,["mdia","minf","stbl","stsd"])[0],x=x3i(g);p?(e[l]={timescale:c,type:p,stsd:x},e[p]=Qd({timescale:c,id:l},x)):e[l]={timescale:c,type:h,stsd:x}}}}}return hu(i,["moov","mvex","trex"]).forEach(n=>{const s=el(n,4),a=e[s];a&&(a.default={duration:el(n,12),flags:el(n,20)})}),e}function x3i(i){const e=i.subarray(8),t=e.subarray(86),r=u1(e.subarray(4,8));let n=r,s;const a=r==="enca"||r==="encv";if(a){const u=hu(e,[r])[0].subarray(r==="enca"?28:78);hu(u,["sinf"]).forEach(d=>{const h=hu(d,["schm"])[0];if(h){const p=u1(h.subarray(4,8));if(p==="cbcs"||p==="cenc"){const g=hu(d,["frma"])[0];g&&(n=u1(g))}}})}const o=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const l=hu(t,["avcC"])[0];l&&l.length>3&&(n+="."+nue(l[1])+nue(l[2])+nue(l[3]),s=iue(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const l=hu(e,[r])[0],u=hu(l.subarray(28),["esds"])[0];if(u&&u.length>7){let c=4;if(u[c++]!==3)break;c=C8e(u,c),c+=2;const d=u[c++];if(d&128&&(c+=2),d&64&&(c+=u[c++]),u[c++]!==4)break;c=C8e(u,c);const h=u[c++];if(h===64)n+="."+nue(h);else break;if(c+=12,u[c++]!==5)break;c=C8e(u,c);const p=u[c++];let g=(p&248)>>3;g===31&&(g+=1+((p&7)<<3)+((u[c]&224)>>5)),n+="."+g}break}case"hvc1":case"hev1":{const l=hu(t,["hvcC"])[0];if(l&&l.length>12){const u=l[1],c=["","A","B","C"][u>>6],d=u&31,h=el(l,2),p=(u&32)>>5?"H":"L",g=l[12],x=l.subarray(6,12);n+="."+c+d,n+="."+v3i(h).toString(16).toUpperCase(),n+="."+p+g;let v="";for(let y=x.length;y--;){const I=x[y];(I||v)&&(v="."+I.toString(16).toUpperCase()+v)}n+=v}s=iue(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=iue(n,t)||n;break}case"vp09":{const l=hu(t,["vpcC"])[0];if(l&&l.length>6){const u=l[4],c=l[5],d=l[6]>>4&15;n+="."+XS(u)+"."+XS(c)+"."+XS(d)}break}case"av01":{const l=hu(t,["av1C"])[0];if(l&&l.length>2){const u=l[1]>>>5,c=l[1]&31,d=l[2]>>>7?"H":"M",h=(l[2]&64)>>6,p=(l[2]&32)>>5,g=u===2&&h?p?12:10:h?10:8,x=(l[2]&16)>>4,v=(l[2]&8)>>3,y=(l[2]&4)>>2,I=l[2]&3;n+="."+u+"."+XS(c)+d+"."+XS(g)+"."+x+"."+v+y+I+"."+XS(1)+"."+XS(1)+"."+XS(1)+"."+0,s=iue("dav1",t)}break}}return{codec:n,encrypted:a,supplemental:s}}function iue(i,e){const t=hu(e,["dvvC"]),r=t.length?t[0]:hu(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,s=r[2]<<5&32|r[3]>>3&31;return i+"."+XS(n)+"."+XS(s)}}function v3i(i){let e=0;for(let t=0;t<32;t++)e|=(i>>t&1)<<31-t;return e>>>0}function C8e(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function nue(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function XS(i){return(i<10?"0":"")+i}function y3i(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&hu(i,["moov","trak"]).forEach(n=>{const a=hu(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=hu(a,["enca"]);const l=o.length>0;l||(o=hu(a,["encv"])),o.forEach(u=>{const c=l?u.subarray(28):u.subarray(78);hu(c,["sinf"]).forEach(h=>{const p=B4t(h);if(p){const g=p.subarray(8,24);g.some(x=>x!==0)||(Cd.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${zS.hexDump(g)} -> ${zS.hexDump(t)}`),p.set(t,8))}})})}),i}function B4t(i){const e=hu(i,["schm"])[0];if(e){const t=u1(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return hu(i,["schi","tenc"])[0]}return null}function C3i(i,e,t){const r={},n=hu(i,["moof","traf"]);for(let s=0;s<n.length;s++){const a=n[s],o=hu(a,["tfhd"])[0],l=el(o,4),u=e[l];if(!u)continue;const c=r[l]||(r[l]={start:NaN,duration:0,sampleCount:0,timescale:u.timescale,type:u.type}),d=hu(a,["tfdt"])[0];if(d){const S=d[0];let T=el(d,4);S===1&&(T===rue?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(T*=rue+1,T+=el(d,8))),ga(T)&&(!ga(c.start)||T<c.start)&&(c.start=T)}const h=u.default,p=el(o,0)|h?.flags;let g=h?.duration||0;p&8&&(p&2?g=el(o,12):g=el(o,8));const x=hu(a,["trun"]);let v=c.start||0,y=0,I=g;for(let S=0;S<x.length;S++){const T=x[S],E=el(T,4),B=c.sampleCount;c.sampleCount+=E;const P=T[3]&1,M=T[3]&4,O=T[2]&1,k=T[2]&2,V=T[2]&4,U=T[2]&8;let z=8,Z=E;for(P&&(z+=4),M&&E&&(!(T[z+1]&1)&&c.keyFrameIndex===void 0&&(c.keyFrameIndex=B),z+=4,O?(I=el(T,z),z+=4):I=g,k&&(z+=4),U&&(z+=4),v+=I,y+=I,Z--);Z--;)O?(I=el(T,z),z+=4):I=g,k&&(z+=4),V&&(T[z+1]&1||c.keyFrameIndex===void 0&&(c.keyFrameIndex=c.sampleCount-(Z+1),c.keyFrameStart=v),z+=4),U&&(z+=4),v+=I,y+=I;!y&&g&&(y+=g*E)}c.duration+=y}if(!Object.keys(r).some(s=>r[s].duration)){let s=1/0,a=0;const o=hu(i,["sidx"]);for(let l=0;l<o.length;l++){const u=m3i(o[l]);if(u!=null&&u.references){s=Math.min(s,u.earliestPresentationTime/u.timescale);const c=u.references.reduce((d,h)=>d+h.info.duration||0,0);a=Math.max(a,c+u.earliestPresentationTime/u.timescale)}}a&&ga(a)&&Object.keys(r).forEach(l=>{r[l].duration||(r[l].duration=a*r[l].timescale-r[l].start)})}return r}function A3i(i,e,t){hu(e,["moof","traf"]).forEach(r=>{hu(r,["tfhd"]).forEach(n=>{const s=el(n,4),a=i[s];if(!a)return;const o=a.timescale||9e4;hu(r,["tfdt"]).forEach(l=>{const u=l[0],c=t*o;if(c){let d=el(l,4);if(u===0)d-=c,d=Math.max(d,0),y8e(l,4,d);else{d*=Math.pow(2,32),d+=el(l,8),d-=c,d=Math.max(d,0);const h=Math.floor(d/(rue+1)),p=Math.floor(d%(rue+1));y8e(l,4,h),y8e(l,8,p)}}})})})}function b3i(i){const e={valid:null,remainder:null},t=hu(i,["moof"]);if(t.length<2)return e.remainder=i,e;const r=t[t.length-1];return e.valid=i.slice(0,r.byteOffset-8),e.remainder=i.slice(r.byteOffset-8),e}function ZA(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function P4t(i,e){const t=[],r=e.samples,n=e.timescale,s=e.id;let a=!1;return hu(r,["moof"]).map(l=>{const u=l.byteOffset-8;hu(l,["traf"]).map(d=>{const h=hu(d,["tfdt"]).map(p=>{const g=p[0];let x=el(p,4);return g===1&&(x*=Math.pow(2,32),x+=el(p,8)),x/n})[0];return h!==void 0&&(i=h),hu(d,["tfhd"]).map(p=>{const g=el(p,4),x=el(p,0)&16777215,v=(x&1)!==0,y=(x&2)!==0,I=(x&8)!==0;let S=0;const T=(x&16)!==0;let E=0;const B=(x&32)!==0;let P=8;g===s&&(v&&(P+=8),y&&(P+=4),I&&(S=el(p,P),P+=4),T&&(E=el(p,P),P+=4),B&&(P+=4),e.type==="video"&&(a=sue(e.codec)),hu(d,["trun"]).map(M=>{const O=M[0],k=el(M,0)&16777215,V=(k&1)!==0;let U=0;const z=(k&4)!==0,Z=(k&256)!==0;let j=0;const K=(k&512)!==0;let J=0;const q=(k&1024)!==0,ie=(k&2048)!==0;let ne=0;const le=el(M,4);let de=8;V&&(U=el(M,de),de+=4),z&&(de+=4);let he=U+u;for(let ge=0;ge<le;ge++){if(Z?(j=el(M,de),de+=4):j=S,K?(J=el(M,de),de+=4):J=E,q&&(de+=4),ie&&(O===0?ne=el(M,de):ne=w4t(M,de),de+=4),e.type===Kh.VIDEO){let ce=0;for(;ce<J;){const me=el(r,he);if(he+=4,I3i(a,r[he])){const te=r.subarray(he,he+me);A8e(te,a?2:1,i+ne/n,t)}he+=me,ce+=me+4}}i+=j/n}}))})})}),t}function sue(i){if(!i)return!1;const e=i.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function I3i(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function A8e(i,e,t,r){const n=M4t(i);let s=0;s+=e;let a=0,o=0,l=0;for(;s<n.length;){a=0;do{if(s>=n.length)break;l=n[s++],a+=l}while(l===255);o=0;do{if(s>=n.length)break;l=n[s++],o+=l}while(l===255);const u=n.length-s;let c=s;if(o<u)s+=o;else if(o>u){Cd.error(`Malformed SEI payload. ${o} is too small, only ${u} bytes left to parse.`);break}if(a===4){if(n[c++]===181){const h=T4t(n,c);if(c+=2,h===49){const p=el(n,c);if(c+=4,p===1195456820){const g=n[c++];if(g===3){const x=n[c++],v=31&x,y=64&x,I=y?2+v*3:0,S=new Uint8Array(I);if(y){S[0]=x;for(let T=1;T<I;T++)S[T]=n[c++]}r.push({type:g,payloadType:a,pts:t,bytes:S})}}}}}else if(a===5&&o>16){const d=[];for(let g=0;g<16;g++){const x=n[c++].toString(16);d.push(x.length==1?"0"+x:x),(g===3||g===5||g===7||g===9)&&d.push("-")}const h=o-16,p=new Uint8Array(h);for(let g=0;g<h;g++)p[g]=n[c++];r.push({payloadType:a,pts:t,uuid:d.join(""),userData:AC(p),userDataBytes:p})}}}function M4t(i){const e=i.byteLength,t=[];let r=1;for(;r<e-2;)i[r]===0&&i[r+1]===0&&i[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return i;const n=e-t.length,s=new Uint8Array(n);let a=0;for(r=0;r<n;a++,r++)a===t[0]&&(a++,t.shift()),s[r]=i[a];return s}function _3i(i){const e=i[0];let t="",r="",n=0,s=0,a=0,o=0,l=0,u=0;if(e===0){for(;u1(i.subarray(u,u+1))!=="\0";)t+=u1(i.subarray(u,u+1)),u+=1;for(t+=u1(i.subarray(u,u+1)),u+=1;u1(i.subarray(u,u+1))!=="\0";)r+=u1(i.subarray(u,u+1)),u+=1;r+=u1(i.subarray(u,u+1)),u+=1,n=el(i,12),s=el(i,16),o=el(i,20),l=el(i,24),u=28}else if(e===1){u+=4,n=el(i,u),u+=4;const d=el(i,u);u+=4;const h=el(i,u);for(u+=4,a=2**32*d+h,e3i(a)||(a=Number.MAX_SAFE_INTEGER,Cd.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=el(i,u),u+=4,l=el(i,u),u+=4;u1(i.subarray(u,u+1))!=="\0";)t+=u1(i.subarray(u,u+1)),u+=1;for(t+=u1(i.subarray(u,u+1)),u+=1;u1(i.subarray(u,u+1))!=="\0";)r+=u1(i.subarray(u,u+1)),u+=1;r+=u1(i.subarray(u,u+1)),u+=1}const c=i.subarray(u,i.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:a,presentationTimeDelta:s,eventDuration:o,id:l,payload:c}}function D3i(i,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(i,4),n=0,r=8;n<t;n++)s.set(e[n],r),r+=e[n].byteLength;return s}function S3i(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let r,n;r=0,n=new Uint8Array;let s;r>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const a=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),D3i([112,115,115,104],new Uint8Array([r,0,0,0]),i,s,n,a,t||new Uint8Array)}function E3i(i){const e=[];if(i instanceof ArrayBuffer){const t=i.byteLength;let r=0;for(;r+32<t;){const n=new DataView(i,r),s=T3i(n);e.push(s),r+=s.size}}return e}function T3i(i){const e=i.getUint32(0),t=i.byteOffset,r=i.byteLength;if(r<e)return{offset:t,size:r};if(i.getUint32(4)!==1886614376)return{offset:t,size:e};const s=i.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:t,size:e};const a=i.buffer,o=zS.hexDump(new Uint8Array(a,t+12,16)),l=i.getUint32(28);let u=null,c=null;if(s===0){if(e-32<l||l<22)return{offset:t,size:e};c=new Uint8Array(a,t+32,l)}else if(s===1){if(!l||r<t+32+l*16+16)return{offset:t,size:e};u=[];for(let d=0;d<l;d++)u.push(new Uint8Array(a,t+32+d*16,16))}return{version:s,systemId:o,kids:u,data:c,offset:t,size:e}}const N4t=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),vG={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function O4t(i,e){const t=vG[e];return!!t&&!!t[i.slice(0,4)]}function b8e(i,e,t=!0){return!i.split(",").some(r=>!L4t(r,e,t))}function L4t(i,e,t=!0){var r;const n=T6(t);return(r=n?.isTypeSupported(GK(i,e)))!=null?r:!1}function GK(i,e){return`${e}/mp4;codecs=${i}`}function k4t(i){if(i){const e=i.substring(0,4);return vG.video[e]}return 2}function aue(i){const e=N4t();return i.split(",").reduce((t,r)=>{const s=e&&sue(r)?9:vG.video[r];return s?(s*2+t)/(t?3:2):(vG.audio[r]+t)/(t?2:1)},0)}const I8e={};function R3i(i,e=!0){if(I8e[i])return I8e[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i];for(let n=0;n<t.length;n++){var r;if(L4t(t[n],"audio",e))return I8e[i]=t[n],t[n];if(t[n]==="mp3"&&(r=T6(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return i}const w3i=/flac|opus|mp4a\.40\.34/i;function oue(i,e=!0){return i.replace(w3i,t=>R3i(t.toLowerCase(),e))}function F3i(i,e){const t=[];if(i){const r=i.split(",");for(let n=0;n<r.length;n++)O4t(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function lue(i,e){if(i&&(i.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i)!==-1))return i;if(e){const t=e.split(",");if(t.length>1){if(i){for(let r=t.length;r--;)if(t[r].substring(0,4)===i.substring(0,4))return t[r]}return t[0]}}return e||i}function B3i(i){const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");r.length>2&&r[0]==="avc1"&&(e[t]=`avc1.${parseInt(r[1]).toString(16)}${("000"+parseInt(r[2]).toString(16)).slice(-4)}`)}return e.join(",")}function P3i(i){if(i.startsWith("av01.")){const e=i.split("."),t=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=t[r-4];return e.join(".")}return i}function G4t(i){const e=T6(i)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function V4t(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const W4t={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function U4t(i,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:i}}const H4t={};function M3i(i,e,t,r,n,s){const a=i.audioCodec?i.audioGroups:null,o=s?.audioCodec,l=s?.channels,u=l?parseInt(l):o?1/0:2;let c=null;if(a!=null&&a.length)try{a.length===1&&a[0]?c=e.groups[a[0]].channels:c=a.reduce((d,h)=>{if(h){const p=e.groups[h];if(!p)throw new Error(`Audio track group ${h} not found`);Object.keys(p.channels).forEach(g=>{d[g]=(d[g]||0)+p.channels[g]})}return d},{2:0})}catch{return!0}return i.videoCodec!==void 0&&(i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(r,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(n,8e6))||!!c&&ga(u)&&Object.keys(c).some(d=>parseInt(d)>u)}function Z4t(i,e,t){const r=i.videoCodec,n=i.audioCodec;if(!r&&!n||!t)return Promise.resolve(W4t);const s=[];if(r){const a={width:i.width,height:i.height,bitrate:Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)),framerate:i.frameRate||30},o=i.videoRange;o!=="SDR"&&(a.transferFunction=o.toLowerCase());const l=r.split(","),u=navigator.userAgent;if(l.some(c=>sue(c))&&N4t())return Promise.resolve(U4t(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${u})`),s));s.push.apply(s,l.map(c=>({type:"media-source",video:Qd(Qd({},a),{},{contentType:GK(P3i(c),"video")})})))}return n&&i.audioGroups&&i.audioGroups.forEach(a=>{var o;a&&((o=e.groups[a])==null||o.tracks.forEach(l=>{if(l.groupId===a){const u=l.channels||"",c=parseFloat(u);ga(c)&&c>2&&s.push.apply(s,n.split(",").map(d=>({type:"media-source",audio:{contentType:GK(d,"audio"),channels:""+c}})))}}))}),Promise.all(s.map(a=>{const o=N3i(a);return H4t[o]||(H4t[o]=t.decodingInfo(a))})).then(a=>({supported:!a.some(o=>!o.supported),configurations:s,decodingInfoResults:a})).catch(a=>({supported:!1,configurations:s,decodingInfoResults:[],error:a}))}function N3i(i){const{audio:e,video:t}=i,r=t||e;if(r){const n=V4t(r.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}const _8e=["NONE","TYPE-0","TYPE-1",null];function O3i(i){return _8e.indexOf(i)>-1}const uue=["SDR","PQ","HLG"];function L3i(i){return!!i&&uue.indexOf(i)>-1}var cue={No:"",Yes:"YES",v2:"v2"};function z4t(i){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=i,n=r<e/2;return e&&n?t?cue.v2:cue.Yes:cue.No}class X4t{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class VK{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const r=(t=e.supplemental)==null?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Y4t(this._audioGroups,e)}hasSubtitleGroup(e){return Y4t(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Y4t(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function k3i(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function G3i(i,e){let t=!1,r=[];if(i&&(t=i!=="SDR",r=[i]),e){r=e.allowedVideoRanges||uue.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&k3i(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const V3i=i=>{const e=new WeakSet;return(t,r)=>{if(i&&(r=i(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},hp=(i,e)=>JSON.stringify(i,V3i(e));function W3i(i,e,t,r,n){const s=Object.keys(i),a=r?.channels,o=r?.audioCodec,l=n?.videoCodec,u=a&&parseInt(a)===2;let c=!1,d=!1,h=1/0,p=1/0,g=1/0,x=1/0,v=0,y=[];const{preferHDR:I,allowedVideoRanges:S}=G3i(e,n);for(let M=s.length;M--;){const O=i[s[M]];c||(c=O.channels[2]>0),h=Math.min(h,O.minHeight),p=Math.min(p,O.minFramerate),g=Math.min(g,O.minBitrate),S.filter(V=>O.videoRanges[V]>0).length>0&&(d=!0)}h=ga(h)?h:0,p=ga(p)?p:0;const T=Math.max(1080,h),E=Math.max(30,p);g=ga(g)?g:t,t=Math.max(g,t),d||(e=void 0);const B=s.length>1;return{codecSet:s.reduce((M,O)=>{const k=i[O];if(O===M)return M;if(y=d?S.filter(V=>k.videoRanges[V]>0):[],B){if(k.minBitrate>t)return YS(O,`min bitrate of ${k.minBitrate} > current estimate of ${t}`),M;if(!k.hasDefaultAudio)return YS(O,"no renditions with default or auto-select sound found"),M;if(o&&O.indexOf(o.substring(0,4))%5!==0)return YS(O,`audio codec preference "${o}" not found`),M;if(a&&!u){if(!k.channels[a])return YS(O,`no renditions with ${a} channel sound found (channels options: ${Object.keys(k.channels)})`),M}else if((!o||u)&&c&&k.channels[2]===0)return YS(O,"no renditions with stereo sound found"),M;if(k.minHeight>T)return YS(O,`min resolution of ${k.minHeight} > maximum of ${T}`),M;if(k.minFramerate>E)return YS(O,`min framerate of ${k.minFramerate} > maximum of ${E}`),M;if(!y.some(V=>k.videoRanges[V]>0))return YS(O,`no variants with VIDEO-RANGE of ${hp(y)} found`),M;if(l&&O.indexOf(l.substring(0,4))%5!==0)return YS(O,`video codec preference "${l}" not found`),M;if(k.maxScore<v)return YS(O,`max score of ${k.maxScore} < selected max of ${v}`),M}return M&&(aue(O)>=aue(M)||k.fragmentError>i[M].fragmentError)?M:(x=k.minIndex,v=k.maxScore,O)},void 0),videoRanges:y,preferHDR:I,minFramerate:p,minBitrate:g,minIndex:x}}function YS(i,e){Cd.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function j4t(i){return i.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function U3i(i,e,t,r){return i.slice(t,r+1).reduce((n,s,a)=>{if(!s.codecSet)return n;const o=s.audioGroups;let l=n[s.codecSet];l||(n[s.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,s.bitrate);const u=Math.min(s.height,s.width);return l.minHeight=Math.min(l.minHeight,u),l.minFramerate=Math.min(l.minFramerate,s.frameRate),l.minIndex=Math.min(l.minIndex,a),l.maxScore=Math.max(l.maxScore,s.score),l.fragmentError+=s.fragmentError,l.videoRanges[s.videoRange]=(l.videoRanges[s.videoRange]||0)+1,o&&o.forEach(c=>{if(!c)return;const d=e.groups[c];d&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?d.hasDefault:d.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(d.channels).forEach(h=>{l.channels[h]=(l.channels[h]||0)+d.channels[h]}))}),n},{})}function K4t(i){if(!i)return i;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}=i;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}}function jS(i,e,t){if("attrs"in i){const r=e.indexOf(i);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(fB(i,n,t))return r}return-1}function fB(i,e,t){const{groupId:r,name:n,lang:s,assocLang:a,default:o}=i,l=i.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(s===void 0||H3i(s,e.lang))&&(s===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(l===void 0||e.forced===l)&&(!("characteristics"in i)||Z3i(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function H3i(i,e="--"){return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}function Z3i(i,e=""){const t=i.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function pB(i,e){const{audioCodec:t,channels:r}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function z3i(i,e,t,r,n){const s=e[r],o=e.reduce((h,p,g)=>{const x=p.uri;return(h[x]||(h[x]=[])).push(g),h},{})[s.uri];o.length>1&&(r=Math.max.apply(Math,o));const l=s.videoRange,u=s.frameRate,c=s.codecSet.substring(0,4),d=Q4t(e,r,h=>{if(h.videoRange!==l||h.frameRate!==u||h.codecSet.substring(0,4)!==c)return!1;const p=h.audioGroups,g=t.filter(x=>!p||p.indexOf(x.groupId)!==-1);return jS(i,g,n)>-1});return d>-1?d:Q4t(e,r,h=>{const p=h.audioGroups,g=t.filter(x=>!p||p.indexOf(x.groupId)!==-1);return jS(i,g,n)>-1})}function Q4t(i,e,t){for(let r=e;r>-1;r--)if(t(i[r]))return r;for(let r=e+1;r<i.length;r++)if(t(i[r]))return r;return-1}function due(i,e){var t;return!!i&&i!==((t=e.loadLevelObj)==null?void 0:t.uri)}class X3i extends Y8{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:s,hls:a}=this,{autoLevelEnabled:o,media:l}=a;if(!n||!l)return;const u=performance.now(),c=s?s.stats:n.stats,d=s?s.duration:n.duration,h=u-c.loading.start,p=a.minAutoLevel,g=n.level,x=this._nextAutoLevel;if(c.aborted||c.loaded&&c.loaded===c.total||g<=p){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const v=x>-1&&x!==g,y=!!t||v;if(!y&&(l.paused||!l.playbackRate||!l.readyState))return;const I=a.mainForwardBufferInfo;if(!y&&I===null)return;const S=this.bwEstimator.getEstimateTTFB(),T=Math.abs(l.playbackRate);if(h<=Math.max(S,1e3*(d/(T*2))))return;const E=I?I.len/T:0,B=c.loading.first?c.loading.first-c.loading.start:-1,P=c.loaded&&B>-1,M=this.getBwEstimate(),O=a.levels,k=O[g],V=Math.max(c.loaded,Math.round(d*(n.bitrate||k.averageBitrate)/8));let U=P?h-B:h;U<1&&P&&(U=Math.min(h,c.loaded*8/M));const z=P?c.loaded*1e3/U:0,Z=S/1e3,j=z?(V-c.loaded)/z:V*8/M+Z;if(j<=E)return;const K=z?z*8:M,J=((r=t?.details||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,q=this.hls.config.abrBandWidthUpFactor;let ie=Number.POSITIVE_INFINITY,ne;for(ne=g-1;ne>p;ne--){const ge=O[ne].maxBitrate,ce=!O[ne].details||J;if(ie=this.getTimeToLoadFrag(Z,K,d*ge,ce),ie<Math.min(E,d+Z))break}if(ie>=j||ie>d*10)return;P?this.bwEstimator.sample(h-Math.min(S,B),c.loaded):this.bwEstimator.sampleTTFB(h);const le=O[ne].maxBitrate;this.getBwEstimate()*q>le&&this.resetEstimator(le);const de=this.findBestLevel(le,p,ne,0,E,1,1);de>-1&&(ne=de),this.warn(`Fragment ${n.sn}${s?" part "+s.index:""} of level ${g} is loading too slowly;
|
|
53
|
+
`+("originalDts: "+Te+" ms, curRefDts: "+Oe+" ms, ")+("dtsCorrection: "+Math.round(E)+" ms, generate: "+Ee+" frames")),ge=Math.floor(Oe),Ae=Math.floor(Oe+M)-ge;var he=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);he==null&&(u.default.w(this.TAG,"Unable to generate silent frame for "+(this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame")),he=fe),Le=[];for(var je=0;je<Ee;je++){Oe=Oe+M;var lt=Math.floor(Oe),At=Math.floor(Oe+M)-lt,gt={dts:lt,pts:lt,cts:0,unit:he,size:he.byteLength,duration:At,originalDts:Te,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Le.push(gt),Z+=gt.size}this._audioNextDts=Oe+M}else ge=Math.floor(Oe),Ae=Math.floor(Oe+M)-ge,this._audioNextDts=Oe+M}else{if(ge=Te-E,te!==T.length-1){var Vt=T[te+1].dts-this._dtsBase-E;Ae=Vt-ge}else if(j!=null){var Vt=j.dts-this._dtsBase-E;Ae=Vt-ge}else me.length>=1?Ae=me[me.length-1].duration:Ae=Math.floor(M);this._audioNextDts=ge+Ae}B===-1&&(B=ge),me.push({dts:ge,pts:ge,cts:0,unit:K.unit,size:K.unit.byteLength,duration:Ae,originalDts:Te,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Ne&&me.push.apply(me,Le)}}if(me.length===0){S.samples=[],S.length=0;return}O?z=new Uint8Array(Z):(z=new Uint8Array(Z),z[0]=Z>>>24&255,z[1]=Z>>>16&255,z[2]=Z>>>8&255,z[3]=Z&255,z.set(c.default.types.mdat,4));for(var te=0;te<me.length;te++){var fe=me[te].unit;z.set(fe,U),U+=fe.byteLength}var yt=me[me.length-1];P=yt.dts+yt.duration;var Dt=new p.MediaSegmentInfo;Dt.beginDts=B,Dt.endDts=P,Dt.beginPts=B,Dt.endPts=P,Dt.originalBeginDts=me[0].originalDts,Dt.originalEndDts=yt.originalDts+yt.duration,Dt.firstSample=new p.SampleInfo(me[0].dts,me[0].pts,me[0].duration,me[0].originalDts,!1),Dt.lastSample=new p.SampleInfo(yt.dts,yt.pts,yt.duration,yt.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Dt),S.samples=me,S.sequenceNumber++;var Pe=null;O?Pe=new Uint8Array:Pe=c.default.moof(S,B),S.samples=[],S.length=0;var Se={type:"audio",data:this._mergeBoxes(Pe,z).buffer,sampleCount:me.length,info:Dt};O&&k&&(Se.timestampOffset=B),this._onMediaSegment("audio",Se)}}},v.prototype._remuxVideo=function(y,I){if(this._videoMeta!=null){var S=y,T=S.samples,E=void 0,B=-1,P=-1,M=-1,O=-1;if(!(!T||T.length===0)&&!(T.length===1&&!I)){var k=8,V=null,U=8+y.length,z=null;if(T.length>1&&(z=T.pop(),U-=z.length),this._videoStashedLastSample!=null){var Z=this._videoStashedLastSample;this._videoStashedLastSample=null,T.unshift(Z),U+=Z.length}z!=null&&(this._videoStashedLastSample=z);var j=T[0].dts-this._dtsBase;if(this._videoNextDts)E=j-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())E=0;else{var K=this._videoSegmentInfoList.getLastSampleBefore(j);if(K!=null){var J=j-(K.originalDts+K.duration);J<=3&&(J=0);var q=K.dts+K.duration+J;E=j-q}else E=0}for(var ie=new p.MediaSegmentInfo,ne=[],le=0;le<T.length;le++){var Z=T[le],de=Z.dts-this._dtsBase,he=Z.isKeyframe,ge=de-E,ce=Z.cts,me=ge+ce;B===-1&&(B=ge,M=me);var te=0;if(le!==T.length-1){var fe=T[le+1].dts-this._dtsBase-E;te=fe-ge}else if(z!=null){var fe=z.dts-this._dtsBase-E;te=fe-ge}else ne.length>=1?te=ne[ne.length-1].duration:te=Math.floor(this._videoMeta.refSampleDuration);if(he){var Te=new p.SampleInfo(ge,me,te,Z.dts,!0);Te.fileposition=Z.fileposition,ie.appendSyncPoint(Te)}ne.push({dts:ge,pts:me,cts:ce,units:Z.units,size:Z.length,isKeyframe:he,duration:te,originalDts:de,flags:{isLeading:0,dependsOn:he?2:1,isDependedOn:he?1:0,hasRedundancy:0,isNonSync:he?0:1}})}V=new Uint8Array(U),V[0]=U>>>24&255,V[1]=U>>>16&255,V[2]=U>>>8&255,V[3]=U&255,V.set(c.default.types.mdat,4);for(var le=0;le<ne.length;le++)for(var Ne=ne[le].units;Ne.length;){var Le=Ne.shift(),Ae=Le.data;V.set(Ae,k),k+=Ae.byteLength}var Oe=ne[ne.length-1];if(P=Oe.dts+Oe.duration,O=Oe.pts+Oe.duration,this._videoNextDts=P,ie.beginDts=B,ie.endDts=P,ie.beginPts=M,ie.endPts=O,ie.originalBeginDts=ne[0].originalDts,ie.originalEndDts=Oe.originalDts+Oe.duration,ie.firstSample=new p.SampleInfo(ne[0].dts,ne[0].pts,ne[0].duration,ne[0].originalDts,ne[0].isKeyframe),ie.lastSample=new p.SampleInfo(Oe.dts,Oe.pts,Oe.duration,Oe.originalDts,Oe.isKeyframe),this._isLive||this._videoSegmentInfoList.append(ie),S.samples=ne,S.sequenceNumber++,this._forceFirstIDR){var He=ne[0].flags;He.dependsOn=2,He.isNonSync=0}var Ee=c.default.moof(S,B);S.samples=[],S.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Ee,V).buffer,sampleCount:ne.length,info:ie})}}},v.prototype._mergeBoxes=function(y,I){var S=new Uint8Array(y.byteLength+I.byteLength);return S.set(y,0),S.set(I,y.byteLength),S},v})();o.default=x}),"./src/utils/browser.js":(function(a,o,l){l.r(o);var u={};function c(){var d=self.navigator.userAgent.toLowerCase(),h=/(edge)\/([\w.]+)/.exec(d)||/(opr)[\/]([\w.]+)/.exec(d)||/(chrome)[ \/]([\w.]+)/.exec(d)||/(iemobile)[\/]([\w.]+)/.exec(d)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(d)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(d)||/(webkit)[ \/]([\w.]+)/.exec(d)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(d)||/(msie) ([\w.]+)/.exec(d)||d.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(d)||d.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(d)||[],p=/(ipad)/.exec(d)||/(ipod)/.exec(d)||/(windows phone)/.exec(d)||/(iphone)/.exec(d)||/(kindle)/.exec(d)||/(android)/.exec(d)||/(windows)/.exec(d)||/(mac)/.exec(d)||/(linux)/.exec(d)||/(cros)/.exec(d)||[],g={browser:h[5]||h[3]||h[1]||"",version:h[2]||h[4]||"0",majorVersion:h[4]||h[2]||"0",platform:p[0]||""},x={};if(g.browser){x[g.browser]=!0;var v=g.majorVersion.split(".");x.version={major:parseInt(g.majorVersion,10),string:g.version},v.length>1&&(x.version.minor=parseInt(v[1],10)),v.length>2&&(x.version.build=parseInt(v[2],10))}if(g.platform&&(x[g.platform]=!0),(x.chrome||x.opr||x.safari)&&(x.webkit=!0),x.rv||x.iemobile){x.rv&&delete x.rv;var y="msie";g.browser=y,x[y]=!0}if(x.edge){delete x.edge;var I="msedge";g.browser=I,x[I]=!0}if(x.opr){var S="opera";g.browser=S,x[S]=!0}if(x.safari&&x.android){var T="android";g.browser=T,x[T]=!0}x.name=g.browser,x.platform=g.platform;for(var E in u)u.hasOwnProperty(E)&&delete u[E];Object.assign(u,x)}c(),o.default=u}),"./src/utils/exception.js":(function(a,o,l){l.r(o),l.d(o,{RuntimeException:function(){return c},IllegalStateException:function(){return d},InvalidArgumentException:function(){return h},NotImplementedException:function(){return p}});var u=(function(){var g=function(x,v){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,I){y.__proto__=I}||function(y,I){for(var S in I)Object.prototype.hasOwnProperty.call(I,S)&&(y[S]=I[S])},g(x,v)};return function(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");g(x,v);function y(){this.constructor=x}x.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),c=(function(){function g(x){this._message=x}return Object.defineProperty(g.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),g.prototype.toString=function(){return this.name+": "+this.message},g})(),d=(function(g){u(x,g);function x(v){return g.call(this,v)||this}return Object.defineProperty(x.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),x})(c),h=(function(g){u(x,g);function x(v){return g.call(this,v)||this}return Object.defineProperty(x.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),x})(c),p=(function(g){u(x,g);function x(v){return g.call(this,v)||this}return Object.defineProperty(x.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),x})(c)}),"./src/utils/logger.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=(function(){function h(){}return h.e=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","error",x),h.ENABLE_ERROR},h.i=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","info",x),h.ENABLE_INFO},h.w=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","warn",x),h.ENABLE_WARN},h.d=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","debug",x),h.ENABLE_DEBUG},h.v=function(p,g){(!p||h.FORCE_GLOBAL_TAG)&&(p=h.GLOBAL_TAG);var x="["+p+"] > "+g;h.ENABLE_CALLBACK&&h.emitter.emit("log","verbose",x),h.ENABLE_VERBOSE},h})();d.GLOBAL_TAG="flv.js",d.FORCE_GLOBAL_TAG=!1,d.ENABLE_ERROR=!0,d.ENABLE_INFO=!0,d.ENABLE_WARN=!0,d.ENABLE_DEBUG=!0,d.ENABLE_VERBOSE=!0,d.ENABLE_CALLBACK=!1,d.emitter=new(c()),o.default=d}),"./src/utils/logging-control.js":(function(a,o,l){l.r(o);var u=l("./node_modules/events/events.js"),c=l.n(u),d=l("./src/utils/logger.js"),h=(function(){function p(){}return Object.defineProperty(p,"forceGlobalTag",{get:function(){return d.default.FORCE_GLOBAL_TAG},set:function(g){d.default.FORCE_GLOBAL_TAG=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"globalTag",{get:function(){return d.default.GLOBAL_TAG},set:function(g){d.default.GLOBAL_TAG=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableAll",{get:function(){return d.default.ENABLE_VERBOSE&&d.default.ENABLE_DEBUG&&d.default.ENABLE_INFO&&d.default.ENABLE_WARN&&d.default.ENABLE_ERROR},set:function(g){d.default.ENABLE_VERBOSE=g,d.default.ENABLE_DEBUG=g,d.default.ENABLE_INFO=g,d.default.ENABLE_WARN=g,d.default.ENABLE_ERROR=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableDebug",{get:function(){return d.default.ENABLE_DEBUG},set:function(g){d.default.ENABLE_DEBUG=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableVerbose",{get:function(){return d.default.ENABLE_VERBOSE},set:function(g){d.default.ENABLE_VERBOSE=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableInfo",{get:function(){return d.default.ENABLE_INFO},set:function(g){d.default.ENABLE_INFO=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableWarn",{get:function(){return d.default.ENABLE_WARN},set:function(g){d.default.ENABLE_WARN=g,p._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(p,"enableError",{get:function(){return d.default.ENABLE_ERROR},set:function(g){d.default.ENABLE_ERROR=g,p._notifyChange()},enumerable:!1,configurable:!0}),p.getConfig=function(){return{globalTag:d.default.GLOBAL_TAG,forceGlobalTag:d.default.FORCE_GLOBAL_TAG,enableVerbose:d.default.ENABLE_VERBOSE,enableDebug:d.default.ENABLE_DEBUG,enableInfo:d.default.ENABLE_INFO,enableWarn:d.default.ENABLE_WARN,enableError:d.default.ENABLE_ERROR,enableCallback:d.default.ENABLE_CALLBACK}},p.applyConfig=function(g){d.default.GLOBAL_TAG=g.globalTag,d.default.FORCE_GLOBAL_TAG=g.forceGlobalTag,d.default.ENABLE_VERBOSE=g.enableVerbose,d.default.ENABLE_DEBUG=g.enableDebug,d.default.ENABLE_INFO=g.enableInfo,d.default.ENABLE_WARN=g.enableWarn,d.default.ENABLE_ERROR=g.enableError,d.default.ENABLE_CALLBACK=g.enableCallback},p._notifyChange=function(){var g=p.emitter;if(g.listenerCount("change")>0){var x=p.getConfig();g.emit("change",x)}},p.registerListener=function(g){p.emitter.addListener("change",g)},p.removeListener=function(g){p.emitter.removeListener("change",g)},p.addLogListener=function(g){d.default.emitter.addListener("log",g),d.default.emitter.listenerCount("log")>0&&(d.default.ENABLE_CALLBACK=!0,p._notifyChange())},p.removeLogListener=function(g){d.default.emitter.removeListener("log",g),d.default.emitter.listenerCount("log")===0&&(d.default.ENABLE_CALLBACK=!1,p._notifyChange())},p})();h.emitter=new(c()),o.default=h}),"./src/utils/polyfill.js":(function(a,o,l){l.r(o);var u=(function(){function c(){}return c.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(d,h){return d.__proto__=h,d},Object.assign=Object.assign||function(d){if(d==null)throw new TypeError("Cannot convert undefined or null to object");for(var h=Object(d),p=1;p<arguments.length;p++){var g=arguments[p];if(g!=null)for(var x in g)g.hasOwnProperty(x)&&(h[x]=g[x])}return h},typeof self.Promise!="function"&&l("./node_modules/es6-promise/dist/es6-promise.js").polyfill()},c})();u.install(),o.default=u}),"./src/utils/utf8-conv.js":(function(a,o,l){l.r(o);function u(d,h,p){var g=d;if(h+p<g.length){for(;p--;)if((g[++h]&192)!==128)return!1;return!0}else return!1}function c(d){for(var h=[],p=d,g=0,x=d.length;g<x;){if(p[g]<128){h.push(String.fromCharCode(p[g])),++g;continue}else if(!(p[g]<192)){if(p[g]<224){if(u(p,g,1)){var v=(p[g]&31)<<6|p[g+1]&63;if(v>=128){h.push(String.fromCharCode(v&65535)),g+=2;continue}}}else if(p[g]<240){if(u(p,g,2)){var v=(p[g]&15)<<12|(p[g+1]&63)<<6|p[g+2]&63;if(v>=2048&&(v&63488)!==55296){h.push(String.fromCharCode(v&65535)),g+=3;continue}}}else if(p[g]<248&&u(p,g,3)){var v=(p[g]&7)<<18|(p[g+1]&63)<<12|(p[g+2]&63)<<6|p[g+3]&63;if(v>65536&&v<1114112){v-=65536,h.push(String.fromCharCode(v>>>10|55296)),h.push(String.fromCharCode(v&1023|56320)),g+=4;continue}}}h.push("�"),++g}return h.join("")}o.default=c})},r={};function n(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a].call(l.exports,l,l.exports,n),l.exports}n.m=t,(function(){n.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return n.d(o,{a:o}),o}})(),(function(){n.d=function(a,o){for(var l in o)n.o(o,l)&&!n.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:o[l]})}})(),(function(){n.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){n.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)}})(),(function(){n.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})}})();var s=n("./src/index.js");return s})()})})(d8e)),d8e.exports}var Nyi=Myi();const c4t=m6(Nyi),d4t="2.0.0",Oyi=i=>{const e=Zt.cloneDeep(i);return e.version!==d4t?{config:{controls:e.controls,loop:e.loop,muted:e.muted,poster:e.poster,autoplay:e.autoplay},version:d4t}:i},Lyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.option),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0}),ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},kyi=["poster","autoplay","controls","loop","muted"],Gyi=Kt({...Kt({name:"ShjFlv"}),props:{option:{},sources:{},useEvents:{}},emits:["on-video-progress","on-video-play","on-video-pause","on-video-ended","on-video-playing","on-video-timeupdate","on-video-error","on-video-volumechange"],setup(i,{expose:e,emit:t}){const r=kr(()=>Oyi(i.option)),n=Wt(),s=Wt("");let a=null;const o=()=>{a&&(a.pause(),a.unload(),a.detachMediaElement(),a.destroy(),a=null),ao.parse({sources:i.sources,callback:({data:y})=>{try{if(ni.parseEvents(i.useEvents,"dataListener",y),s.value=y[0].data[0].src,!s.value)return;if(c4t.isSupported())try{a=c4t.createPlayer({type:"flv",url:s.value,isLive:!1,hasAudio:!0,hasVideo:!0,cors:!0,withCredentials:!1}),a.attachMediaElement(n.value),a.load(),r.value.config.autoplay&&a.play()}catch{}}catch{ni.parseEvents(i.useEvents,"dataListener",null)}}})};I0(()=>{a&&(a.pause(),a.unload(),a.detachMediaElement(),a.destroy(),a=null)});const l=t,u=()=>{l("on-video-progress"),ni.parseEvents(i.useEvents,"on-video-progress")},c=()=>{l("on-video-play"),ni.parseEvents(i.useEvents,"on-video-play")},d=()=>{l("on-video-pause"),ni.parseEvents(i.useEvents,"on-video-pause")},h=()=>{l("on-video-ended"),ni.parseEvents(i.useEvents,"on-video-ended")},p=()=>{l("on-video-playing"),ni.parseEvents(i.useEvents,"on-video-playing")},g=()=>{l("on-video-timeupdate"),ni.parseEvents(i.useEvents,"on-video-timeupdate")},x=()=>{l("on-video-error"),ni.parseEvents(i.useEvents,"on-video-error")},v=()=>{l("on-video-volumechange"),ni.parseEvents(i.useEvents,"on-video-volumechange")};return na(()=>{Ha(()=>{o()})}),Lyi({option:r.value,sources:i.sources},o),e({play:()=>{n.value&&n.value.play()},pause:()=>{n.value&&n.value.pause()},refresh:()=>o(),refreshView:()=>o(),refreshData:()=>o()}),(y,I)=>(wt(),Ir("video",{ref_key:"videoRef",ref:n,class:"zerov-widget",poster:r.value.config.poster,autoplay:r.value.config.autoplay,controls:r.value.config.controls,loop:r.value.config.loop,muted:r.value.config.muted,onProgress:u,onPlay:c,onEnded:h,onPlaying:p,onPause:d,onTimeupdate:g,onError:x,onVolumechange:v},null,40,kyi))}}),h4t=Zi(Gyi),Vyi=i=>i,Wyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},Uyi=["src"],Hyi=Kt({...Kt({name:"ShjIframe"}),props:{option:{},sources:{},useEvents:{}},emits:["on-iframe-event-listener"],setup(i,{expose:e,emit:t}){const r=Wt(),n=kr(()=>Vyi(i.option)),s=Wt(""),a=()=>{ao.parse({sources:i.sources,callback:({data:u})=>{try{ni.parseEvents(i.useEvents,"dataListener",u),s.value=u[0].data[0].url}catch{ni.parseEvents(i.useEvents,"dataListener",null),s.value=""}}})},o=t,l=u=>{u.source===r.value?.contentWindow&&(o("on-iframe-event-listener",u.data),i.useEvents&&Zt.isArray(i.useEvents)&&ni.parseEvents(i.useEvents,"on-iframe-event-listener",u.data))};return na(()=>{Ha(()=>{a()}),window.addEventListener("message",l,!1)}),I0(()=>{window.removeEventListener("message",l,!1)}),Wyi({option:n.value,sources:i.sources},a),e({refresh:()=>a(),refreshView:()=>a(),refreshData:()=>a(),sendChildrenMessages:(u,c)=>{if(r.value?.contentWindow)try{c[0].dataType==="params"?r.value.contentWindow.postMessage(u,s.value):r.value.contentWindow.postMessage(c[0].data,s.value)}catch{}}}),(u,c)=>s.value?(wt(),Ir("iframe",{key:0,ref_key:"iframeRef",ref:r,src:s.value,class:"iframe",sandbox:"allow-scripts allow-same-origin allow-forms"},null,8,Uyi)):wi("",!0)}}),f4t=Zi(zl(Hyi,[["__scopeId","data-v-71d48c51"]])),p4t="2.0.0",Zyi=i=>{const e=Zt.cloneDeep(i);return e.version!==p4t?{carousel:{iframes:e.iframes,pagination:e.pagination,freeMode:e.freeMode,reverseDirection:e.reverseDirection,slidesPerView:e.slidesPerView,speed:e.speed,spaceBetween:e.spaceBetween,autoplay:e.autoplay,pauseOnMouseEnter:e.pauseOnMouseEnter,delay:e.delay,paginationType:e.paginationType,rewind:e.rewind,loop:e.loop,grabCursor:e.grabCursor,effect:e.effect,stopOnLastSlide:e.stopOnLastSlide,roundLengths:e.roundLengths,direction:e.direction},version:p4t}:i},zyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.option),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0}),ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})};var h8e={exports:{}},g4t;function Xyi(){if(g4t)return h8e.exports;g4t=1;var i=h8e.exports={},e,t;function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=r}catch{e=r}try{typeof clearTimeout=="function"?t=clearTimeout:t=n}catch{t=n}})();function s(x){if(e===setTimeout)return setTimeout(x,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(x,0);try{return e(x,0)}catch{try{return e.call(null,x,0)}catch{return e.call(this,x,0)}}}function a(x){if(t===clearTimeout)return clearTimeout(x);if((t===n||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(x);try{return t(x)}catch{try{return t.call(null,x)}catch{return t.call(this,x)}}}var o=[],l=!1,u,c=-1;function d(){!l||!u||(l=!1,u.length?o=u.concat(o):c=-1,o.length&&h())}function h(){if(!l){var x=s(d);l=!0;for(var v=o.length;v;){for(u=o,o=[];++c<v;)u&&u[c].run();c=-1,v=o.length}u=null,l=!1,a(x)}}i.nextTick=function(x){var v=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)v[y-1]=arguments[y];o.push(new p(x,v)),o.length===1&&!l&&s(h)};function p(x,v){this.fun=x,this.array=v}p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function g(){}return i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(x){return[]},i.binding=function(x){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(x){throw new Error("process.chdir is not supported")},i.umask=function(){return 0},h8e.exports}var tue=Xyi();const Yyi=["src"],jyi=Kt({...Kt({name:"ShjIframeCarousel"}),props:{option:{}},setup(i,{expose:e}){a4t();const t=kr(()=>Zyi(i.option)),r=Wt(So()),n=()=>{r.value=So()};return na(()=>{tue.nextTick(()=>{n()})}),zyi({option:t.value,sources:[]},n),e({refresh:()=>n(),refreshView:()=>n(),refreshData:()=>n()}),(s,a)=>{const o=NS("swiper-slide"),l=NS("swiper-container");return wt(),Ni(l,{key:r.value,class:"carousel",direction:t.value.carousel.direction,speed:t.value.carousel.speed,"round-lengths":t.value.carousel.roundLengths,"grab-cursor":t.value.carousel.grabCursor,rewind:t.value.carousel.rewind,loop:t.value.carousel.loop,"slides-per-view":t.value.carousel.slidesPerView,"space-between":t.value.carousel.spaceBetween,autoplay:t.value.carousel.autoplay,delay:t.value.carousel.delay,"stop-on-last-slide":t.value.carousel.stopOnLastSlide,"reverse-direction":t.value.carousel.reverseDirection,"pause-on-mouse-enter":t.value.carousel.pauseOnMouseEnter,"free-mode":t.value.carousel.freeMode,effect:t.value.carousel.effect,pagination:t.value.carousel.pagination,"pagination-type":t.value.carousel.paginationType},{default:po(()=>[(wt(!0),Ir(Zs,null,ol(t.value.carousel.iframes,(u,c)=>(wt(),Ni(o,{key:u},{default:po(()=>[vi("iframe",{src:u.url,class:"iframe-slide",sandbox:"allow-scripts allow-same-origin"},null,8,Yyi)]),_:2},1024))),128))]),_:1},8,["direction","speed","round-lengths","grab-cursor","rewind","loop","slides-per-view","space-between","autoplay","delay","stop-on-last-slide","reverse-direction","pause-on-mouse-enter","free-mode","effect","pagination","pagination-type"])}}}),m4t=Zi(zl(jyi,[["__scopeId","data-v-e31f4b25"]])),x4t="2.0.0",Kyi=i=>{const e=Zt.cloneDeep(i);return e.version!==x4t?{base:{url:e.url,mode:e.mode,positionX:e.positionX??"center",positionY:e.positionY??"center",borderRadius:e.borderRadius??0},version:x4t}:i},Qyi=Kt({...Kt({name:"ShjImage"}),props:{option:{}},setup(i,{expose:e}){const t=kr(()=>Kyi(i.option)),r=n=>typeof n=="number"?`${n}px`:n??"center";return e({refresh:()=>{},refreshView:()=>{},refreshData:()=>{}}),(n,s)=>(wt(),Ir("div",{class:"image",style:Dn({"--image-url":`url('${t.value.base.url}')`,"--image-border-radius":(t.value.base.borderRadius??0)+"px","--image-repeat":t.value.base.mode==="repeat"?"repeat":"no-repeat","--image-size":t.value.base.mode==="repeat"?"auto":t.value.base.mode,"--image-position-x":r(t.value.base.positionX),"--image-position-y":r(t.value.base.positionY)})},null,4))}}),v4t=Zi(zl(Qyi,[["__scopeId","data-v-4863bb72"]])),y4t="2.0.0",Jyi=i=>{const e=Zt.cloneDeep(i);return e.version!==y4t?{base:{mode:e.mode,positionX:e.positionX??"center",positionY:e.positionY??"center",borderRadius:e.borderRadius??0},version:y4t}:i},qyi=(i,e)=>{ci(()=>Zt.cloneDeep(i.sources),(t,r)=>{Zt.isEqual(t,r)||e(i.option)},{deep:!0})},$yi=Kt({...Kt({name:"ShjImageDynamic"}),props:{option:{},sources:{},useEvents:{}},setup(i,{expose:e}){const t=kr(()=>Jyi(i.option)),r=a=>typeof a=="number"?`${a}px`:a??"center",n=Wt(""),s=()=>{ao.parse({sources:i.sources,callback:({data:a})=>{try{ni.parseEvents(i.useEvents,"dataListener",a),n.value=a[0].data[0].src}catch{ni.parseEvents(i.useEvents,"dataListener",null),n.value=""}}})};return na(()=>{Ha(()=>{s()})}),qyi({option:t.value,sources:i.sources},s),e({refresh:()=>s(),refreshView:()=>s(),refreshData:()=>s()}),(a,o)=>(wt(),Ir("div",{class:"image",style:Dn({"--image-url":`url('${n.value}')`,"--image-border-radius":(t.value.base.borderRadius??0)+"px","--image-repeat":t.value.base.mode==="repeat"?"repeat":"no-repeat","--image-size":t.value.base.mode==="repeat"?"auto":t.value.base.mode,"--image-position-x":r(t.value.base.positionX),"--image-position-y":r(t.value.base.positionY)})},null,4))}}),C4t=Zi(zl($yi,[["__scopeId","data-v-2305a074"]])),ga=Number.isFinite||function(i){return typeof i=="number"&&isFinite(i)},e3i=Number.isSafeInteger||function(i){return typeof i=="number"&&Math.abs(i)<=t3i},t3i=Number.MAX_SAFE_INTEGER||9007199254740991;let $a=(function(i){return i.NETWORK_ERROR="networkError",i.MEDIA_ERROR="mediaError",i.KEY_SYSTEM_ERROR="keySystemError",i.MUX_ERROR="muxError",i.OTHER_ERROR="otherError",i})({}),Hi=(function(i){return i.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",i.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",i.KEY_SYSTEM_NO_SESSION="keySystemNoSession",i.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",i.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",i.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",i.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",i.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",i.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",i.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",i.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",i.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",i.MANIFEST_LOAD_ERROR="manifestLoadError",i.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",i.MANIFEST_PARSING_ERROR="manifestParsingError",i.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",i.LEVEL_EMPTY_ERROR="levelEmptyError",i.LEVEL_LOAD_ERROR="levelLoadError",i.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",i.LEVEL_PARSING_ERROR="levelParsingError",i.LEVEL_SWITCH_ERROR="levelSwitchError",i.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",i.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",i.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",i.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",i.FRAG_LOAD_ERROR="fragLoadError",i.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",i.FRAG_DECRYPT_ERROR="fragDecryptError",i.FRAG_PARSING_ERROR="fragParsingError",i.FRAG_GAP="fragGap",i.REMUX_ALLOC_ERROR="remuxAllocError",i.KEY_LOAD_ERROR="keyLoadError",i.KEY_LOAD_TIMEOUT="keyLoadTimeOut",i.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",i.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",i.BUFFER_APPEND_ERROR="bufferAppendError",i.BUFFER_APPENDING_ERROR="bufferAppendingError",i.BUFFER_STALLED_ERROR="bufferStalledError",i.BUFFER_FULL_ERROR="bufferFullError",i.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",i.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",i.ASSET_LIST_LOAD_ERROR="assetListLoadError",i.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",i.ASSET_LIST_PARSING_ERROR="assetListParsingError",i.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",i.INTERNAL_EXCEPTION="internalException",i.INTERNAL_ABORTED="aborted",i.ATTACH_MEDIA_ERROR="attachMediaError",i.UNKNOWN="unknown",i})({}),Et=(function(i){return i.MEDIA_ATTACHING="hlsMediaAttaching",i.MEDIA_ATTACHED="hlsMediaAttached",i.MEDIA_DETACHING="hlsMediaDetaching",i.MEDIA_DETACHED="hlsMediaDetached",i.MEDIA_ENDED="hlsMediaEnded",i.STALL_RESOLVED="hlsStallResolved",i.BUFFER_RESET="hlsBufferReset",i.BUFFER_CODECS="hlsBufferCodecs",i.BUFFER_CREATED="hlsBufferCreated",i.BUFFER_APPENDING="hlsBufferAppending",i.BUFFER_APPENDED="hlsBufferAppended",i.BUFFER_EOS="hlsBufferEos",i.BUFFERED_TO_END="hlsBufferedToEnd",i.BUFFER_FLUSHING="hlsBufferFlushing",i.BUFFER_FLUSHED="hlsBufferFlushed",i.MANIFEST_LOADING="hlsManifestLoading",i.MANIFEST_LOADED="hlsManifestLoaded",i.MANIFEST_PARSED="hlsManifestParsed",i.LEVEL_SWITCHING="hlsLevelSwitching",i.LEVEL_SWITCHED="hlsLevelSwitched",i.LEVEL_LOADING="hlsLevelLoading",i.LEVEL_LOADED="hlsLevelLoaded",i.LEVEL_UPDATED="hlsLevelUpdated",i.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",i.LEVELS_UPDATED="hlsLevelsUpdated",i.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",i.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",i.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",i.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",i.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",i.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",i.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",i.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",i.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",i.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",i.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",i.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",i.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",i.CUES_PARSED="hlsCuesParsed",i.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",i.INIT_PTS_FOUND="hlsInitPtsFound",i.FRAG_LOADING="hlsFragLoading",i.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",i.FRAG_LOADED="hlsFragLoaded",i.FRAG_DECRYPTED="hlsFragDecrypted",i.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",i.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",i.FRAG_PARSING_METADATA="hlsFragParsingMetadata",i.FRAG_PARSED="hlsFragParsed",i.FRAG_BUFFERED="hlsFragBuffered",i.FRAG_CHANGED="hlsFragChanged",i.FPS_DROP="hlsFpsDrop",i.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",i.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",i.ERROR="hlsError",i.DESTROYING="hlsDestroying",i.KEY_LOADING="hlsKeyLoading",i.KEY_LOADED="hlsKeyLoaded",i.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",i.BACK_BUFFER_REACHED="hlsBackBufferReached",i.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",i.ASSET_LIST_LOADING="hlsAssetListLoading",i.ASSET_LIST_LOADED="hlsAssetListLoaded",i.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",i.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",i.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",i.INTERSTITIAL_STARTED="hlsInterstitialStarted",i.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",i.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",i.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",i.INTERSTITIAL_ENDED="hlsInterstitialEnded",i.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",i.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",i.EVENT_CUE_ENTER="hlsEventCueEnter",i})({});var tc={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Wa={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class xG{constructor(e,t=0,r=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class r3i{constructor(e,t,r,n=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new xG(e),this.fast_=new xG(t),this.defaultTTFB_=n,this.ttfb_=new xG(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:s}=this;r.halfLife!==e&&(this.slow_=new xG(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new xG(t,n.getEstimate(),n.getTotalWeight())),s.halfLife!==e&&(this.ttfb_=new xG(e,s.getEstimate(),s.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,s=r/n;this.fast_.sample(n,s),this.slow_.sample(n,s)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function i3i(i,e,t){return(e=s3i(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function gh(){return gh=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},gh.apply(null,arguments)}function A4t(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,r)}return t}function Qd(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?A4t(Object(t),!0).forEach(function(r){i3i(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):A4t(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function n3i(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function s3i(i){var e=n3i(i,"string");return typeof e=="symbol"?e:e+""}let Y8=class{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const r=`[${e}]:`;this.trace=E6,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)}};const E6=function(){},a3i={trace:E6,debug:E6,log:E6,warn:E6,info:E6,error:E6};function f8e(){return gh({},a3i)}function o3i(i,e){const t=self.console[i];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${i}] >`):E6}function b4t(i,e,t){return e[i]?e[i].bind(e):o3i(i,t)}const p8e=f8e();function l3i(i,e,t){const r=f8e();if(typeof console=="object"&&i===!0||typeof i=="object"){const n=["debug","log","info","warn","error"];n.forEach(s=>{r[s]=b4t(s,i,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.5`)}catch{return f8e()}n.forEach(s=>{p8e[s]=b4t(s,i)})}else gh(p8e,r);return r}const Cd=p8e;function T6(i=!0){return typeof self>"u"?void 0:(i||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function u3i(i){return typeof self<"u"&&i===self.ManagedMediaSource}function I4t(i,e){const t=Object.keys(i),r=Object.keys(e),n=t.length,s=r.length;return!n||!s||n===s&&!t.some(a=>r.indexOf(a)===-1)}function AC(i,e=!1){if(typeof TextDecoder<"u"){const u=new TextDecoder("utf-8").decode(i);if(e){const c=u.indexOf("\0");return c!==-1?u.substring(0,c):u}return u.replace(/\0/g,"")}const t=i.length;let r,n,s,a="",o=0;for(;o<t;){if(r=i[o++],r===0&&e)return a;if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:n=i[o++],a+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=i[o++],s=i[o++],a+=String.fromCharCode((r&15)<<12|(n&63)<<6|(s&63)<<0);break}}return a}const zS={hexDump:function(i){let e="";for(let t=0;t<i.length;t++){let r=i[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}};function c3i(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var g8e={exports:{}},_4t;function d3i(){return _4t||(_4t=1,(function(i,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,u,c){if(c=c||{},l=l.trim(),u=u.trim(),!u){if(!c.alwaysNormalize)return l;var d=o.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=o.normalizePath(d.path),o.buildURLFromParts(d)}var h=o.parseURL(u);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return c.alwaysNormalize?(h.path=o.normalizePath(h.path),o.buildURLFromParts(h)):u;var p=o.parseURL(l);if(!p)throw new Error("Error trying to parse base URL.");if(!p.netLoc&&p.path&&p.path[0]!=="/"){var g=n.exec(p.path);p.netLoc=g[1],p.path=g[2]}p.netLoc&&!p.path&&(p.path="/");var x={scheme:p.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(x.netLoc=p.netLoc,h.path[0]!=="/"))if(!h.path)x.path=p.path,h.params||(x.params=p.params,h.query||(x.query=p.query));else{var v=p.path,y=v.substring(0,v.lastIndexOf("/")+1)+h.path;x.path=o.normalizePath(y)}return x.path===null&&(x.path=c.alwaysNormalize?o.normalizePath(h.path):h.path),o.buildURLFromParts(x)},parseURL:function(l){var u=r.exec(l);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(s,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};i.exports=o})()})(g8e)),g8e.exports}var m8e=d3i();class x8e{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Kh={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class D4t{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,f3i(this,"stats")}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=t?.byteRangeEndOffset||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[Kh.AUDIO]:null,[Kh.VIDEO]:null,[Kh.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new x8e),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=m8e.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Kh.AUDIO]=null,e[Kh.VIDEO]=null,e[Kh.AUDIOVIDEO]=null}}function sm(i){return i.sn!=="initSegment"}class v8e extends D4t{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(ga(e)&&ga(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const r=Object.keys(this.levelkeys);if(r.length===1)return this._decryptdata=this.levelkeys[r[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=ga(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),r=t.length;if(r>1||r===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!ga(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return sm(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,n,s,a=!1){const{elementaryStreams:o}=this,l=o[e];if(!l){o[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:s,partial:a};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,r),l.startDTS=Math.min(l.startDTS,n),l.endDTS=Math.max(l.endDTS,s)}}class h3i extends D4t{constructor(e,t,r,n,s){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=n;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,s),s&&(this.fragOffset=s.fragOffset+s.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function S4t(i,e){const t=Object.getPrototypeOf(i);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||S4t(t,e)}}function f3i(i,e){const t=S4t(i,e);t&&(t.enumerable=!0,Object.defineProperty(i,e,t))}const rue=Math.pow(2,32)-1,p3i=[].push,E4t={video:1,audio:2,id3:3,text:4};function u1(i){return String.fromCharCode.apply(null,i)}function T4t(i,e){const t=i[e]<<8|i[e+1];return t<0?65536+t:t}function el(i,e){const t=w4t(i,e);return t<0?4294967296+t:t}function R4t(i,e){let t=el(i,e);return t*=Math.pow(2,32),t+=el(i,e+4),t}function w4t(i,e){return i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3]}function y8e(i,e,t){i[e]=t>>24,i[e+1]=t>>16&255,i[e+2]=t>>8&255,i[e+3]=t&255}function g3i(i){const e=i.byteLength;for(let t=0;t<e;){const r=el(i,t);if(r>8&&i[t+4]===109&&i[t+5]===111&&i[t+6]===111&&i[t+7]===102)return!0;t=r>1?t+r:e}return!1}function hu(i,e){const t=[];if(!e.length)return t;const r=i.byteLength;for(let n=0;n<r;){const s=el(i,n),a=u1(i.subarray(n+4,n+8)),o=s>1?n+s:r;if(a===e[0])if(e.length===1)t.push(i.subarray(n+8,o));else{const l=hu(i.subarray(n+8,o),e.slice(1));l.length&&p3i.apply(t,l)}n=o}return t}function m3i(i){const e=[],t=i[0];let r=8;const n=el(i,r);r+=4;let s=0,a=0;t===0?(s=el(i,r),a=el(i,r+4),r+=8):(s=R4t(i,r),a=R4t(i,r+8),r+=16),r+=2;let o=i.length+a;const l=T4t(i,r);r+=2;for(let u=0;u<l;u++){let c=r;const d=el(i,c);c+=4;const h=d&2147483647;if((d&2147483648)>>>31===1)return Cd.warn("SIDX has hierarchical references (not supported)"),null;const g=el(i,c);c+=4,e.push({referenceSize:h,subsegmentDuration:g,info:{duration:g/n,start:o,end:o+h-1}}),o+=h,c+=4,r=c}return{earliestPresentationTime:s,timescale:n,version:t,referencesCount:l,references:e}}function F4t(i){const e=[],t=hu(i,["moov","trak"]);for(let n=0;n<t.length;n++){const s=t[n],a=hu(s,["tkhd"])[0];if(a){let o=a[0];const l=el(a,o===0?12:20),u=hu(s,["mdia","mdhd"])[0];if(u){o=u[0];const c=el(u,o===0?12:20),d=hu(s,["mdia","hdlr"])[0];if(d){const h=u1(d.subarray(8,12)),p={soun:Kh.AUDIO,vide:Kh.VIDEO}[h],g=hu(s,["mdia","minf","stbl","stsd"])[0],x=x3i(g);p?(e[l]={timescale:c,type:p,stsd:x},e[p]=Qd({timescale:c,id:l},x)):e[l]={timescale:c,type:h,stsd:x}}}}}return hu(i,["moov","mvex","trex"]).forEach(n=>{const s=el(n,4),a=e[s];a&&(a.default={duration:el(n,12),flags:el(n,20)})}),e}function x3i(i){const e=i.subarray(8),t=e.subarray(86),r=u1(e.subarray(4,8));let n=r,s;const a=r==="enca"||r==="encv";if(a){const u=hu(e,[r])[0].subarray(r==="enca"?28:78);hu(u,["sinf"]).forEach(d=>{const h=hu(d,["schm"])[0];if(h){const p=u1(h.subarray(4,8));if(p==="cbcs"||p==="cenc"){const g=hu(d,["frma"])[0];g&&(n=u1(g))}}})}const o=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const l=hu(t,["avcC"])[0];l&&l.length>3&&(n+="."+nue(l[1])+nue(l[2])+nue(l[3]),s=iue(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const l=hu(e,[r])[0],u=hu(l.subarray(28),["esds"])[0];if(u&&u.length>7){let c=4;if(u[c++]!==3)break;c=C8e(u,c),c+=2;const d=u[c++];if(d&128&&(c+=2),d&64&&(c+=u[c++]),u[c++]!==4)break;c=C8e(u,c);const h=u[c++];if(h===64)n+="."+nue(h);else break;if(c+=12,u[c++]!==5)break;c=C8e(u,c);const p=u[c++];let g=(p&248)>>3;g===31&&(g+=1+((p&7)<<3)+((u[c]&224)>>5)),n+="."+g}break}case"hvc1":case"hev1":{const l=hu(t,["hvcC"])[0];if(l&&l.length>12){const u=l[1],c=["","A","B","C"][u>>6],d=u&31,h=el(l,2),p=(u&32)>>5?"H":"L",g=l[12],x=l.subarray(6,12);n+="."+c+d,n+="."+v3i(h).toString(16).toUpperCase(),n+="."+p+g;let v="";for(let y=x.length;y--;){const I=x[y];(I||v)&&(v="."+I.toString(16).toUpperCase()+v)}n+=v}s=iue(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=iue(n,t)||n;break}case"vp09":{const l=hu(t,["vpcC"])[0];if(l&&l.length>6){const u=l[4],c=l[5],d=l[6]>>4&15;n+="."+XS(u)+"."+XS(c)+"."+XS(d)}break}case"av01":{const l=hu(t,["av1C"])[0];if(l&&l.length>2){const u=l[1]>>>5,c=l[1]&31,d=l[2]>>>7?"H":"M",h=(l[2]&64)>>6,p=(l[2]&32)>>5,g=u===2&&h?p?12:10:h?10:8,x=(l[2]&16)>>4,v=(l[2]&8)>>3,y=(l[2]&4)>>2,I=l[2]&3;n+="."+u+"."+XS(c)+d+"."+XS(g)+"."+x+"."+v+y+I+"."+XS(1)+"."+XS(1)+"."+XS(1)+"."+0,s=iue("dav1",t)}break}}return{codec:n,encrypted:a,supplemental:s}}function iue(i,e){const t=hu(e,["dvvC"]),r=t.length?t[0]:hu(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,s=r[2]<<5&32|r[3]>>3&31;return i+"."+XS(n)+"."+XS(s)}}function v3i(i){let e=0;for(let t=0;t<32;t++)e|=(i>>t&1)<<31-t;return e>>>0}function C8e(i,e){const t=e+5;for(;i[e++]&128&&e<t;);return e}function nue(i){return("0"+i.toString(16).toUpperCase()).slice(-2)}function XS(i){return(i<10?"0":"")+i}function y3i(i,e){if(!i||!e)return i;const t=e.keyId;return t&&e.isCommonEncryption&&hu(i,["moov","trak"]).forEach(n=>{const a=hu(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=hu(a,["enca"]);const l=o.length>0;l||(o=hu(a,["encv"])),o.forEach(u=>{const c=l?u.subarray(28):u.subarray(78);hu(c,["sinf"]).forEach(h=>{const p=B4t(h);if(p){const g=p.subarray(8,24);g.some(x=>x!==0)||(Cd.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${zS.hexDump(g)} -> ${zS.hexDump(t)}`),p.set(t,8))}})})}),i}function B4t(i){const e=hu(i,["schm"])[0];if(e){const t=u1(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return hu(i,["schi","tenc"])[0]}return null}function C3i(i,e,t){const r={},n=hu(i,["moof","traf"]);for(let s=0;s<n.length;s++){const a=n[s],o=hu(a,["tfhd"])[0],l=el(o,4),u=e[l];if(!u)continue;const c=r[l]||(r[l]={start:NaN,duration:0,sampleCount:0,timescale:u.timescale,type:u.type}),d=hu(a,["tfdt"])[0];if(d){const S=d[0];let T=el(d,4);S===1&&(T===rue?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(T*=rue+1,T+=el(d,8))),ga(T)&&(!ga(c.start)||T<c.start)&&(c.start=T)}const h=u.default,p=el(o,0)|h?.flags;let g=h?.duration||0;p&8&&(p&2?g=el(o,12):g=el(o,8));const x=hu(a,["trun"]);let v=c.start||0,y=0,I=g;for(let S=0;S<x.length;S++){const T=x[S],E=el(T,4),B=c.sampleCount;c.sampleCount+=E;const P=T[3]&1,M=T[3]&4,O=T[2]&1,k=T[2]&2,V=T[2]&4,U=T[2]&8;let z=8,Z=E;for(P&&(z+=4),M&&E&&(!(T[z+1]&1)&&c.keyFrameIndex===void 0&&(c.keyFrameIndex=B),z+=4,O?(I=el(T,z),z+=4):I=g,k&&(z+=4),U&&(z+=4),v+=I,y+=I,Z--);Z--;)O?(I=el(T,z),z+=4):I=g,k&&(z+=4),V&&(T[z+1]&1||c.keyFrameIndex===void 0&&(c.keyFrameIndex=c.sampleCount-(Z+1),c.keyFrameStart=v),z+=4),U&&(z+=4),v+=I,y+=I;!y&&g&&(y+=g*E)}c.duration+=y}if(!Object.keys(r).some(s=>r[s].duration)){let s=1/0,a=0;const o=hu(i,["sidx"]);for(let l=0;l<o.length;l++){const u=m3i(o[l]);if(u!=null&&u.references){s=Math.min(s,u.earliestPresentationTime/u.timescale);const c=u.references.reduce((d,h)=>d+h.info.duration||0,0);a=Math.max(a,c+u.earliestPresentationTime/u.timescale)}}a&&ga(a)&&Object.keys(r).forEach(l=>{r[l].duration||(r[l].duration=a*r[l].timescale-r[l].start)})}return r}function A3i(i,e,t){hu(e,["moof","traf"]).forEach(r=>{hu(r,["tfhd"]).forEach(n=>{const s=el(n,4),a=i[s];if(!a)return;const o=a.timescale||9e4;hu(r,["tfdt"]).forEach(l=>{const u=l[0],c=t*o;if(c){let d=el(l,4);if(u===0)d-=c,d=Math.max(d,0),y8e(l,4,d);else{d*=Math.pow(2,32),d+=el(l,8),d-=c,d=Math.max(d,0);const h=Math.floor(d/(rue+1)),p=Math.floor(d%(rue+1));y8e(l,4,h),y8e(l,8,p)}}})})})}function b3i(i){const e={valid:null,remainder:null},t=hu(i,["moof"]);if(t.length<2)return e.remainder=i,e;const r=t[t.length-1];return e.valid=i.slice(0,r.byteOffset-8),e.remainder=i.slice(r.byteOffset-8),e}function ZA(i,e){const t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t}function P4t(i,e){const t=[],r=e.samples,n=e.timescale,s=e.id;let a=!1;return hu(r,["moof"]).map(l=>{const u=l.byteOffset-8;hu(l,["traf"]).map(d=>{const h=hu(d,["tfdt"]).map(p=>{const g=p[0];let x=el(p,4);return g===1&&(x*=Math.pow(2,32),x+=el(p,8)),x/n})[0];return h!==void 0&&(i=h),hu(d,["tfhd"]).map(p=>{const g=el(p,4),x=el(p,0)&16777215,v=(x&1)!==0,y=(x&2)!==0,I=(x&8)!==0;let S=0;const T=(x&16)!==0;let E=0;const B=(x&32)!==0;let P=8;g===s&&(v&&(P+=8),y&&(P+=4),I&&(S=el(p,P),P+=4),T&&(E=el(p,P),P+=4),B&&(P+=4),e.type==="video"&&(a=sue(e.codec)),hu(d,["trun"]).map(M=>{const O=M[0],k=el(M,0)&16777215,V=(k&1)!==0;let U=0;const z=(k&4)!==0,Z=(k&256)!==0;let j=0;const K=(k&512)!==0;let J=0;const q=(k&1024)!==0,ie=(k&2048)!==0;let ne=0;const le=el(M,4);let de=8;V&&(U=el(M,de),de+=4),z&&(de+=4);let he=U+u;for(let ge=0;ge<le;ge++){if(Z?(j=el(M,de),de+=4):j=S,K?(J=el(M,de),de+=4):J=E,q&&(de+=4),ie&&(O===0?ne=el(M,de):ne=w4t(M,de),de+=4),e.type===Kh.VIDEO){let ce=0;for(;ce<J;){const me=el(r,he);if(he+=4,I3i(a,r[he])){const te=r.subarray(he,he+me);A8e(te,a?2:1,i+ne/n,t)}he+=me,ce+=me+4}}i+=j/n}}))})})}),t}function sue(i){if(!i)return!1;const e=i.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function I3i(i,e){if(i){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function A8e(i,e,t,r){const n=M4t(i);let s=0;s+=e;let a=0,o=0,l=0;for(;s<n.length;){a=0;do{if(s>=n.length)break;l=n[s++],a+=l}while(l===255);o=0;do{if(s>=n.length)break;l=n[s++],o+=l}while(l===255);const u=n.length-s;let c=s;if(o<u)s+=o;else if(o>u){Cd.error(`Malformed SEI payload. ${o} is too small, only ${u} bytes left to parse.`);break}if(a===4){if(n[c++]===181){const h=T4t(n,c);if(c+=2,h===49){const p=el(n,c);if(c+=4,p===1195456820){const g=n[c++];if(g===3){const x=n[c++],v=31&x,y=64&x,I=y?2+v*3:0,S=new Uint8Array(I);if(y){S[0]=x;for(let T=1;T<I;T++)S[T]=n[c++]}r.push({type:g,payloadType:a,pts:t,bytes:S})}}}}}else if(a===5&&o>16){const d=[];for(let g=0;g<16;g++){const x=n[c++].toString(16);d.push(x.length==1?"0"+x:x),(g===3||g===5||g===7||g===9)&&d.push("-")}const h=o-16,p=new Uint8Array(h);for(let g=0;g<h;g++)p[g]=n[c++];r.push({payloadType:a,pts:t,uuid:d.join(""),userData:AC(p),userDataBytes:p})}}}function M4t(i){const e=i.byteLength,t=[];let r=1;for(;r<e-2;)i[r]===0&&i[r+1]===0&&i[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return i;const n=e-t.length,s=new Uint8Array(n);let a=0;for(r=0;r<n;a++,r++)a===t[0]&&(a++,t.shift()),s[r]=i[a];return s}function _3i(i){const e=i[0];let t="",r="",n=0,s=0,a=0,o=0,l=0,u=0;if(e===0){for(;u1(i.subarray(u,u+1))!=="\0";)t+=u1(i.subarray(u,u+1)),u+=1;for(t+=u1(i.subarray(u,u+1)),u+=1;u1(i.subarray(u,u+1))!=="\0";)r+=u1(i.subarray(u,u+1)),u+=1;r+=u1(i.subarray(u,u+1)),u+=1,n=el(i,12),s=el(i,16),o=el(i,20),l=el(i,24),u=28}else if(e===1){u+=4,n=el(i,u),u+=4;const d=el(i,u);u+=4;const h=el(i,u);for(u+=4,a=2**32*d+h,e3i(a)||(a=Number.MAX_SAFE_INTEGER,Cd.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=el(i,u),u+=4,l=el(i,u),u+=4;u1(i.subarray(u,u+1))!=="\0";)t+=u1(i.subarray(u,u+1)),u+=1;for(t+=u1(i.subarray(u,u+1)),u+=1;u1(i.subarray(u,u+1))!=="\0";)r+=u1(i.subarray(u,u+1)),u+=1;r+=u1(i.subarray(u,u+1)),u+=1}const c=i.subarray(u,i.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:a,presentationTimeDelta:s,eventDuration:o,id:l,payload:c}}function D3i(i,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(i,4),n=0,r=8;n<t;n++)s.set(e[n],r),r+=e[n].byteLength;return s}function S3i(i,e,t){if(i.byteLength!==16)throw new RangeError("Invalid system id");let r,n;r=0,n=new Uint8Array;let s;r>0?(s=new Uint8Array(4),e.length>0&&new DataView(s.buffer).setUint32(0,e.length,!1)):s=new Uint8Array;const a=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),D3i([112,115,115,104],new Uint8Array([r,0,0,0]),i,s,n,a,t||new Uint8Array)}function E3i(i){const e=[];if(i instanceof ArrayBuffer){const t=i.byteLength;let r=0;for(;r+32<t;){const n=new DataView(i,r),s=T3i(n);e.push(s),r+=s.size}}return e}function T3i(i){const e=i.getUint32(0),t=i.byteOffset,r=i.byteLength;if(r<e)return{offset:t,size:r};if(i.getUint32(4)!==1886614376)return{offset:t,size:e};const s=i.getUint32(8)>>>24;if(s!==0&&s!==1)return{offset:t,size:e};const a=i.buffer,o=zS.hexDump(new Uint8Array(a,t+12,16)),l=i.getUint32(28);let u=null,c=null;if(s===0){if(e-32<l||l<22)return{offset:t,size:e};c=new Uint8Array(a,t+32,l)}else if(s===1){if(!l||r<t+32+l*16+16)return{offset:t,size:e};u=[];for(let d=0;d<l;d++)u.push(new Uint8Array(a,t+32+d*16,16))}return{version:s,systemId:o,kids:u,data:c,offset:t,size:e}}const N4t=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),vG={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function O4t(i,e){const t=vG[e];return!!t&&!!t[i.slice(0,4)]}function b8e(i,e,t=!0){return!i.split(",").some(r=>!L4t(r,e,t))}function L4t(i,e,t=!0){var r;const n=T6(t);return(r=n?.isTypeSupported(GK(i,e)))!=null?r:!1}function GK(i,e){return`${e}/mp4;codecs=${i}`}function k4t(i){if(i){const e=i.substring(0,4);return vG.video[e]}return 2}function aue(i){const e=N4t();return i.split(",").reduce((t,r)=>{const s=e&&sue(r)?9:vG.video[r];return s?(s*2+t)/(t?3:2):(vG.audio[r]+t)/(t?2:1)},0)}const I8e={};function R3i(i,e=!0){if(I8e[i])return I8e[i];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[i];for(let n=0;n<t.length;n++){var r;if(L4t(t[n],"audio",e))return I8e[i]=t[n],t[n];if(t[n]==="mp3"&&(r=T6(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return i}const w3i=/flac|opus|mp4a\.40\.34/i;function oue(i,e=!0){return i.replace(w3i,t=>R3i(t.toLowerCase(),e))}function F3i(i,e){const t=[];if(i){const r=i.split(",");for(let n=0;n<r.length;n++)O4t(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function lue(i,e){if(i&&(i.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(i)!==-1))return i;if(e){const t=e.split(",");if(t.length>1){if(i){for(let r=t.length;r--;)if(t[r].substring(0,4)===i.substring(0,4))return t[r]}return t[0]}}return e||i}function B3i(i){const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");r.length>2&&r[0]==="avc1"&&(e[t]=`avc1.${parseInt(r[1]).toString(16)}${("000"+parseInt(r[2]).toString(16)).slice(-4)}`)}return e.join(",")}function P3i(i){if(i.startsWith("av01.")){const e=i.split("."),t=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=t[r-4];return e.join(".")}return i}function G4t(i){const e=T6(i)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function V4t(i){return i.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const W4t={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function U4t(i,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:i}}const H4t={};function M3i(i,e,t,r,n,s){const a=i.audioCodec?i.audioGroups:null,o=s?.audioCodec,l=s?.channels,u=l?parseInt(l):o?1/0:2;let c=null;if(a!=null&&a.length)try{a.length===1&&a[0]?c=e.groups[a[0]].channels:c=a.reduce((d,h)=>{if(h){const p=e.groups[h];if(!p)throw new Error(`Audio track group ${h} not found`);Object.keys(p.channels).forEach(g=>{d[g]=(d[g]||0)+p.channels[g]})}return d},{2:0})}catch{return!0}return i.videoCodec!==void 0&&(i.width>1920&&i.height>1088||i.height>1920&&i.width>1088||i.frameRate>Math.max(r,30)||i.videoRange!=="SDR"&&i.videoRange!==t||i.bitrate>Math.max(n,8e6))||!!c&&ga(u)&&Object.keys(c).some(d=>parseInt(d)>u)}function Z4t(i,e,t){const r=i.videoCodec,n=i.audioCodec;if(!r&&!n||!t)return Promise.resolve(W4t);const s=[];if(r){const a={width:i.width,height:i.height,bitrate:Math.ceil(Math.max(i.bitrate*.9,i.averageBitrate)),framerate:i.frameRate||30},o=i.videoRange;o!=="SDR"&&(a.transferFunction=o.toLowerCase());const l=r.split(","),u=navigator.userAgent;if(l.some(c=>sue(c))&&N4t())return Promise.resolve(U4t(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${u})`),s));s.push.apply(s,l.map(c=>({type:"media-source",video:Qd(Qd({},a),{},{contentType:GK(P3i(c),"video")})})))}return n&&i.audioGroups&&i.audioGroups.forEach(a=>{var o;a&&((o=e.groups[a])==null||o.tracks.forEach(l=>{if(l.groupId===a){const u=l.channels||"",c=parseFloat(u);ga(c)&&c>2&&s.push.apply(s,n.split(",").map(d=>({type:"media-source",audio:{contentType:GK(d,"audio"),channels:""+c}})))}}))}),Promise.all(s.map(a=>{const o=N3i(a);return H4t[o]||(H4t[o]=t.decodingInfo(a))})).then(a=>({supported:!a.some(o=>!o.supported),configurations:s,decodingInfoResults:a})).catch(a=>({supported:!1,configurations:s,decodingInfoResults:[],error:a}))}function N3i(i){const{audio:e,video:t}=i,r=t||e;if(r){const n=V4t(r.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}const _8e=["NONE","TYPE-0","TYPE-1",null];function O3i(i){return _8e.indexOf(i)>-1}const uue=["SDR","PQ","HLG"];function L3i(i){return!!i&&uue.indexOf(i)>-1}var cue={No:"",Yes:"YES",v2:"v2"};function z4t(i){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=i,n=r<e/2;return e&&n?t?cue.v2:cue.Yes:cue.No}class X4t{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class VK{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const r=(t=e.supplemental)==null?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Y4t(this._audioGroups,e)}hasSubtitleGroup(e){return Y4t(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Y4t(i,e){return!e||!i?!1:i.indexOf(e)!==-1}function k3i(){if(typeof matchMedia=="function"){const i=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(i.media!==e.media)return i.matches===!0}return!1}function G3i(i,e){let t=!1,r=[];if(i&&(t=i!=="SDR",r=[i]),e){r=e.allowedVideoRanges||uue.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&k3i(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const V3i=i=>{const e=new WeakSet;return(t,r)=>{if(i&&(r=i(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},hp=(i,e)=>JSON.stringify(i,V3i(e));function W3i(i,e,t,r,n){const s=Object.keys(i),a=r?.channels,o=r?.audioCodec,l=n?.videoCodec,u=a&&parseInt(a)===2;let c=!1,d=!1,h=1/0,p=1/0,g=1/0,x=1/0,v=0,y=[];const{preferHDR:I,allowedVideoRanges:S}=G3i(e,n);for(let M=s.length;M--;){const O=i[s[M]];c||(c=O.channels[2]>0),h=Math.min(h,O.minHeight),p=Math.min(p,O.minFramerate),g=Math.min(g,O.minBitrate),S.filter(V=>O.videoRanges[V]>0).length>0&&(d=!0)}h=ga(h)?h:0,p=ga(p)?p:0;const T=Math.max(1080,h),E=Math.max(30,p);g=ga(g)?g:t,t=Math.max(g,t),d||(e=void 0);const B=s.length>1;return{codecSet:s.reduce((M,O)=>{const k=i[O];if(O===M)return M;if(y=d?S.filter(V=>k.videoRanges[V]>0):[],B){if(k.minBitrate>t)return YS(O,`min bitrate of ${k.minBitrate} > current estimate of ${t}`),M;if(!k.hasDefaultAudio)return YS(O,"no renditions with default or auto-select sound found"),M;if(o&&O.indexOf(o.substring(0,4))%5!==0)return YS(O,`audio codec preference "${o}" not found`),M;if(a&&!u){if(!k.channels[a])return YS(O,`no renditions with ${a} channel sound found (channels options: ${Object.keys(k.channels)})`),M}else if((!o||u)&&c&&k.channels[2]===0)return YS(O,"no renditions with stereo sound found"),M;if(k.minHeight>T)return YS(O,`min resolution of ${k.minHeight} > maximum of ${T}`),M;if(k.minFramerate>E)return YS(O,`min framerate of ${k.minFramerate} > maximum of ${E}`),M;if(!y.some(V=>k.videoRanges[V]>0))return YS(O,`no variants with VIDEO-RANGE of ${hp(y)} found`),M;if(l&&O.indexOf(l.substring(0,4))%5!==0)return YS(O,`video codec preference "${l}" not found`),M;if(k.maxScore<v)return YS(O,`max score of ${k.maxScore} < selected max of ${v}`),M}return M&&(aue(O)>=aue(M)||k.fragmentError>i[M].fragmentError)?M:(x=k.minIndex,v=k.maxScore,O)},void 0),videoRanges:y,preferHDR:I,minFramerate:p,minBitrate:g,minIndex:x}}function YS(i,e){Cd.log(`[abr] start candidates with "${i}" ignored because ${e}`)}function j4t(i){return i.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function U3i(i,e,t,r){return i.slice(t,r+1).reduce((n,s,a)=>{if(!s.codecSet)return n;const o=s.audioGroups;let l=n[s.codecSet];l||(n[s.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:a,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,s.bitrate);const u=Math.min(s.height,s.width);return l.minHeight=Math.min(l.minHeight,u),l.minFramerate=Math.min(l.minFramerate,s.frameRate),l.minIndex=Math.min(l.minIndex,a),l.maxScore=Math.max(l.maxScore,s.score),l.fragmentError+=s.fragmentError,l.videoRanges[s.videoRange]=(l.videoRanges[s.videoRange]||0)+1,o&&o.forEach(c=>{if(!c)return;const d=e.groups[c];d&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?d.hasDefault:d.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(d.channels).forEach(h=>{l.channels[h]=(l.channels[h]||0)+d.channels[h]}))}),n},{})}function K4t(i){if(!i)return i;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}=i;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:s}}function jS(i,e,t){if("attrs"in i){const r=e.indexOf(i);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(fB(i,n,t))return r}return-1}function fB(i,e,t){const{groupId:r,name:n,lang:s,assocLang:a,default:o}=i,l=i.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(s===void 0||H3i(s,e.lang))&&(s===void 0||e.assocLang===a)&&(o===void 0||e.default===o)&&(l===void 0||e.forced===l)&&(!("characteristics"in i)||Z3i(i.characteristics||"",e.characteristics))&&(t===void 0||t(i,e))}function H3i(i,e="--"){return i.length===e.length?i===e:i.startsWith(e)||e.startsWith(i)}function Z3i(i,e=""){const t=i.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function pB(i,e){const{audioCodec:t,channels:r}=i;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function z3i(i,e,t,r,n){const s=e[r],o=e.reduce((h,p,g)=>{const x=p.uri;return(h[x]||(h[x]=[])).push(g),h},{})[s.uri];o.length>1&&(r=Math.max.apply(Math,o));const l=s.videoRange,u=s.frameRate,c=s.codecSet.substring(0,4),d=Q4t(e,r,h=>{if(h.videoRange!==l||h.frameRate!==u||h.codecSet.substring(0,4)!==c)return!1;const p=h.audioGroups,g=t.filter(x=>!p||p.indexOf(x.groupId)!==-1);return jS(i,g,n)>-1});return d>-1?d:Q4t(e,r,h=>{const p=h.audioGroups,g=t.filter(x=>!p||p.indexOf(x.groupId)!==-1);return jS(i,g,n)>-1})}function Q4t(i,e,t){for(let r=e;r>-1;r--)if(t(i[r]))return r;for(let r=e+1;r<i.length;r++)if(t(i[r]))return r;return-1}function due(i,e){var t;return!!i&&i!==((t=e.loadLevelObj)==null?void 0:t.uri)}class X3i extends Y8{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:s,hls:a}=this,{autoLevelEnabled:o,media:l}=a;if(!n||!l)return;const u=performance.now(),c=s?s.stats:n.stats,d=s?s.duration:n.duration,h=u-c.loading.start,p=a.minAutoLevel,g=n.level,x=this._nextAutoLevel;if(c.aborted||c.loaded&&c.loaded===c.total||g<=p){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const v=x>-1&&x!==g,y=!!t||v;if(!y&&(l.paused||!l.playbackRate||!l.readyState))return;const I=a.mainForwardBufferInfo;if(!y&&I===null)return;const S=this.bwEstimator.getEstimateTTFB(),T=Math.abs(l.playbackRate);if(h<=Math.max(S,1e3*(d/(T*2))))return;const E=I?I.len/T:0,B=c.loading.first?c.loading.first-c.loading.start:-1,P=c.loaded&&B>-1,M=this.getBwEstimate(),O=a.levels,k=O[g],V=Math.max(c.loaded,Math.round(d*(n.bitrate||k.averageBitrate)/8));let U=P?h-B:h;U<1&&P&&(U=Math.min(h,c.loaded*8/M));const z=P?c.loaded*1e3/U:0,Z=S/1e3,j=z?(V-c.loaded)/z:V*8/M+Z;if(j<=E)return;const K=z?z*8:M,J=((r=t?.details||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,q=this.hls.config.abrBandWidthUpFactor;let ie=Number.POSITIVE_INFINITY,ne;for(ne=g-1;ne>p;ne--){const ge=O[ne].maxBitrate,ce=!O[ne].details||J;if(ie=this.getTimeToLoadFrag(Z,K,d*ge,ce),ie<Math.min(E,d+Z))break}if(ie>=j||ie>d*10)return;P?this.bwEstimator.sample(h-Math.min(S,B),c.loaded):this.bwEstimator.sampleTTFB(h);const le=O[ne].maxBitrate;this.getBwEstimate()*q>le&&this.resetEstimator(le);const de=this.findBestLevel(le,p,ne,0,E,1,1);de>-1&&(ne=de),this.warn(`Fragment ${n.sn}${s?" part "+s.index:""} of level ${g} is loading too slowly;
|
|
54
54
|
Fragment duration: ${n.duration.toFixed(3)}
|
|
55
55
|
Time to underbuffer: ${E.toFixed(3)} s
|
|
56
56
|
Estimated load time for current fragment: ${j.toFixed(3)} s
|
|
@@ -33865,7 +33865,7 @@ window.scene = `+c+"();",a+=`
|
|
|
33865
33865
|
background: url(${Te.landmark.style.image});
|
|
33866
33866
|
background-size:contain;
|
|
33867
33867
|
">
|
|
33868
|
-
</div>`,unit:Te.landmark.style.unit,rotation:Te.landmark.style.rotation,alwaysFront:Te.landmark.style.alwaysFront,size:Te.landmark.style.size,altitude:Te.landmark.style.altitude}),Oe.addAnimate({key:"altitude",value:[0,1],random:Te.landmark.animate.random,duration:Te.landmark.animate.duration,transform:Te.landmark.animate.transform,delay:Te.landmark.animate.delay,yoyo:Te.landmark.animate.yoyo,repeat:Te.landmark.animate.repeat}),x.value.add(Oe),x.value.animate.start()}catch{}},ne=(fe,Te,Ne)=>{const Le=new fe.PulseLinkLayer({zIndex:Te.zIndex,opacity:Te.opacity,visible:Te.visible,zooms:Te.zooms,depth:Te.depth}),Ae=new fe.GeoJSONSource({data:Ne});if(Le.setSource(Ae),Le.setStyle({unit:Te.style.unit,dash:[4e4,0,4e4,0],lineWidth:Te.style.lineWidth,height:function(Oe,He){return He.distance/3+Te.style.height},smoothSteps:30,speed:function(){return 1e5+Math.random()*Te.style.speed},flowLength:Te.style.flowLength,lineColors:Te.style.lineColors,maxHeightScale:Te.style.maxHeightScale,headColor:Te.style.headColor,trailColor:Te.style.trailColor}),g.value&&M.value&&(g.value.off("click",M.value),M.value=null),g.value){const Oe=He=>{const Ee=Le.queryFeature(He.pixel.toArray());Ee&&(n("amap3d-scene-pulseLinkLayer",Ee),ni.parseEvents(i.useEvents,"amap3d-scene-pulseLinkLayer",Ee))};g.value.on("click",Oe),M.value=Oe}x.value.add(Le),x.value.animate.start()},le=(fe,Te)=>{const Ne={type:"FeatureCollection",features:[]};return fe.forEach(Le=>{const Ae={type:"Feature",id:So(),properties:{type:Te==="Point"?Te:0,...Le},geometry:{type:Te,coordinates:Le.value}};Ne.features.push(Ae)}),Ne},de=fe=>{g.value&&(g.value.setFeatures(fe.config.features),g.value.setPitch(fe.config.pitch),g.value.setRotation(fe.config.rotation),g.value.setStatus({dragEnable:fe.config.dragEnable,zoomEnable:fe.config.zoomEnable,rotateEnable:fe.config.rotateEnable,pitchEnable:fe.config.pitchEnable}),fe.config.plugin.scale.visible?E.value.show():E.value.hide(),fe.config.plugin.toolBar.visible?T.value.show():T.value.hide(),fe.config.plugin.controlBar.visible?S.value.show():S.value.hide())},he=()=>{g.value&&(g.value.clearMap(),x.value.clear(),k(B.value))},ge=fe=>{g.value&&g.value.setMapStyle(fe.config.mapStyle)},ce=fe=>{g.value&&g.value.setZoom(fe.config.zoom,!1,200)},me=fe=>{g.value&&g.value.setCenter(fe.config.center,!1,200)},te=()=>{g.value&&M.value&&(g.value.off("click",M.value),M.value=null),g.value&&(g.value.clearMap(),g.value.destroy(),g.value=null),x.value&&(x.value.clear(),x.value.destroy(),x.value=null)};return na(()=>{setTimeout(()=>{O(r.value)},0)}),tm(()=>{y.value=!0,te()}),{initAMap3d:O,updateAMapStyle:ge,updateAMapConfig:de,updateAMapComponents:he,updateAMapZoom:ce,updateAMapCenter:me,amap3d:g,loading:v,AMapPrototype:B,errorMessage:P}},{initAMap3d:a,updateAMapStyle:o,updateAMapConfig:l,updateAMapComponents:u,updateAMapZoom:c,updateAMapCenter:d,loading:h,errorMessage:p}=s();return ci(()=>r.value.config,()=>{l(r.value)},{deep:!0}),ci(()=>r.value.config.zoom,()=>{c(r.value)},{deep:!0}),ci(()=>r.value.config.center,()=>{d(r.value)},{deep:!0}),ci(()=>r.value.config.floors,Zt.debounce(()=>{a(r.value)},300),{deep:!0}),ci(()=>r.value.config.skyColor,Zt.debounce(()=>{a(r.value)},300),{deep:!0}),ci(()=>r.value.widgets,()=>{u()},{deep:!0}),ci(()=>r.value.config.mapStyle,()=>{o(r.value)},{deep:!0}),ci(()=>r.value.basic,()=>{a(r.value)},{deep:!0}),ci(()=>i.sources,()=>{a(r.value)},{deep:!0}),e({refresh:()=>a(r.value),refreshView:()=>l(r.value),refreshData:()=>a(r.value)}),(g,x)=>(wt(),Ir("div",z8n,[vi("div",{class:ba(["amap-3d-wrap",{show:Br(h)}])},x[0]||(x[0]=[vi("div",{id:"zerov-amap-3d",class:"zerov-amap-container"},null,-1)]),2),Br(h)?wi("",!0):(wt(),Ir("div",X8n,[Br(p)!==""?(wt(),Ir("i",Y8n)):wi("",!0),vi("p",j8n,Go(Br(p)),1)]))]))}}),sSr=Zi(zl(K8n,[["__scopeId","data-v-82692c4f"]])),aSr="2.0.0",Q8n=i=>{const e=Zt.cloneDeep(i)??{};return e.version!==aSr?(e.version=aSr,e):i},J8n=Kt({...Kt({name:"ShjDefault"}),props:{option:{},sources:{},useEvents:{}},setup(i){const e=kr(()=>Q8n(i.option)),t=()=>{try{const r=e.value.background.image,n=e.value.background.color,s=e.value.background.size;return{background:r?`url('${r}')`:n,backgroundSize:s,backgroundPosition:s==="auto"?"0px 0px":"center",backgroundRepeat:s==="auto"?"repeat":"no-repeat"}}catch{return{}}};return(r,n)=>(wt(),Ir("div",{class:"shj-default",style:Dn(t())},null,4))}}),oSr=Zi(zl(J8n,[["__scopeId","data-v-e982c808"]])),q8n=Kt({...Kt({name:"ShjMap2d"}),props:{option:{},sources:{},useEvents:{}},setup(i,{expose:e}){const t=Wt();return e({getEchartsInstance:()=>t.value?.getEchartsInstance(),refresh:()=>t.value?.refresh(),refreshView:()=>t.value?.refreshView(),refreshData:()=>t.value?.refreshData()}),(r,n)=>(wt(),Ni(vR,yn({ref_key:"componentRef",ref:t,option:r.option,sources:r.sources,"use-events":r.useEvents},r.$attrs),null,16,["option","sources","use-events"]))}}),lSr=Zi(q8n);function U9(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function uSr(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var cA={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},SZ={duration:.5,overwrite:!1,delay:0},Htt,O2,Rp,dI=1e8,af=1/dI,Ztt=Math.PI*2,$8n=Ztt/4,e5n=0,cSr=Math.sqrt,t5n=Math.cos,r5n=Math.sin,Sm=function(e){return typeof e=="string"},H0=function(e){return typeof e=="function"},H9=function(e){return typeof e=="number"},ztt=function(e){return typeof e>"u"},R4=function(e){return typeof e=="object"},M3=function(e){return e!==!1},Xtt=function(){return typeof window<"u"},Hxe=function(e){return H0(e)||Sm(e)},dSr=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},jx=Array.isArray,Ytt=/(?:-?\.?\d|\.)+/gi,hSr=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,EZ=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,jtt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fSr=/[+-]=-?[.\d]+/,pSr=/[^,'"\[\]\s]+/gi,i5n=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,l0,w4,Ktt,Qtt,dA={},Zxe={},gSr,mSr=function(e){return(Zxe=RZ(e,dA))&&L3},Jtt=function(e,t){},Pre=function(e,t){return!t&&void 0},xSr=function(e,t){return e&&(dA[e]=t)&&Zxe&&(Zxe[e]=t)||dA},Mre=function(){return 0},n5n={suppressEvents:!0,isStart:!0,kill:!1},zxe={suppressEvents:!0,kill:!1},s5n={suppressEvents:!0},qtt={},nw=[],$tt={},vSr,hA={},ert={},ySr=30,Xxe=[],trt="",rrt=function(e){var t=e[0],r,n;if(R4(t)||H0(t)||(e=[e]),!(r=(t._gsap||{}).harness)){for(n=Xxe.length;n--&&!Xxe[n].targetTest(t););r=Xxe[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new jSr(e[n],r)))||e.splice(n,1);return e},JN=function(e){return e._gsap||rrt(fI(e))[0]._gsap},CSr=function(e,t,r){return(r=e[t])&&H0(r)?e[t]():ztt(r)&&e.getAttribute&&e.getAttribute(t)||r},N3=function(e,t){return(e=e.split(",")).forEach(t)||e},vg=function(e){return Math.round(e*1e5)/1e5||0},Yg=function(e){return Math.round(e*1e7)/1e7||0},TZ=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),r==="+"?e+n:r==="-"?e-n:r==="*"?e*n:e/n},a5n=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},Yxe=function(){var e=nw.length,t=nw.slice(0),r,n;for($tt={},nw.length=0,r=0;r<e;r++)n=t[r],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},irt=function(e){return!!(e._initted||e._startAt||e.add)},ASr=function(e,t,r,n){nw.length&&!O2&&Yxe(),e.render(t,r,!!(O2&&t<0&&irt(e))),nw.length&&!O2&&Yxe()},bSr=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(pSr).length<2?t:Sm(e)?e.trim():e},ISr=function(e){return e},fA=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},o5n=function(e){return function(t,r){for(var n in r)n in t||n==="duration"&&e||n==="ease"||(t[n]=r[n])}},RZ=function(e,t){for(var r in t)e[r]=t[r];return e},_Sr=function i(e,t){for(var r in t)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=R4(t[r])?i(e[r]||(e[r]={}),t[r]):t[r]);return e},jxe=function(e,t){var r={},n;for(n in e)n in t||(r[n]=e[n]);return r},Nre=function(e){var t=e.parent||l0,r=e.keyframes?o5n(jx(e.keyframes)):fA;if(M3(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},l5n=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},DSr=function(e,t,r,n,s){var a=e[n],o;if(s)for(o=t[s];a&&a[s]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},Kxe=function(e,t,r,n){r===void 0&&(r="_first"),n===void 0&&(n="_last");var s=t._prev,a=t._next;s?s._next=a:e[r]===t&&(e[r]=a),a?a._prev=s:e[n]===t&&(e[n]=s),t._next=t._prev=t.parent=null},sw=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},qN=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},u5n=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},nrt=function(e,t,r,n){return e._startAt&&(O2?e._startAt.revert(zxe):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},c5n=function i(e){return!e||e._ts&&i(e.parent)},SSr=function(e){return e._repeat?wZ(e._tTime,e=e.duration()+e._rDelay)*e:0},wZ=function(e,t){var r=Math.floor(e=Yg(e/t));return e&&r===e?r-1:r},Qxe=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Jxe=function(e){return e._end=Yg(e._start+(e._tDur/Math.abs(e._ts||e._rts||af)||0))},qxe=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=Yg(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Jxe(e),r._dirty||qN(r,e)),e},ESr=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=Qxe(e.rawTime(),t),(!t._dur||Lre(0,t.totalDuration(),r)-t._tTime>af)&&t.render(r,!0)),qN(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-af}},F4=function(e,t,r,n){return t.parent&&sw(t),t._start=Yg((H9(r)?r:r||e!==l0?hI(e,r,t):e._time)+t._delay),t._end=Yg(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),DSr(e,t,"_first","_last",e._sort?"_start":0),srt(t)||(e._recent=t),n||ESr(e,t),e._ts<0&&qxe(e,e._tTime),e},TSr=function(e,t){return(dA.ScrollTrigger||Jtt("scrollTrigger",t))&&dA.ScrollTrigger.create(t,e)},RSr=function(e,t,r,n,s){if(prt(e,t,s),!e._initted)return 1;if(!r&&e._pt&&!O2&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&vSr!==gA.frame)return nw.push(e),e._lazy=[s,n],1},d5n=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},srt=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},h5n=function(e,t,r,n){var s=e.ratio,a=t<0||!t&&(!e._start&&d5n(e)&&!(!e._initted&&srt(e))||(e._ts<0||e._dp._ts<0)&&!srt(e))?0:1,o=e._rDelay,l=0,u,c,d;if(o&&e._repeat&&(l=Lre(0,e._tDur,t),c=wZ(l,o),e._yoyo&&c&1&&(a=1-a),c!==wZ(e._tTime,o)&&(s=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==s||O2||n||e._zTime===af||!t&&e._zTime){if(!e._initted&&RSr(e,t,n,r,l))return;for(d=e._zTime,e._zTime=t||(r?af:0),r||(r=t&&!d),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=l,u=e._pt;u;)u.r(a,u.d),u=u._next;t<0&&nrt(e,t,r,!0),e._onUpdate&&!r&&pA(e,"onUpdate"),l&&e._repeat&&!r&&e.parent&&pA(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&sw(e,1),!r&&!O2&&(pA(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},f5n=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},FZ=function(e,t,r,n){var s=e._repeat,a=Yg(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=a/e._dur),e._dur=a,e._tDur=s?s<0?1e10:Yg(a*(s+1)+e._rDelay*s):a,o>0&&!n&&qxe(e,e._tTime=e._tDur*o),e.parent&&Jxe(e),r||qN(e.parent,e),e},wSr=function(e){return e instanceof hy?qN(e):FZ(e,e._dur)},p5n={_start:0,endTime:Mre,totalDuration:Mre},hI=function i(e,t,r){var n=e.labels,s=e._recent||p5n,a=e.duration()>=dI?s.endTime(!1):e._dur,o,l,u;return Sm(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",o=t.indexOf("="),l==="<"||l===">"?(o>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(o<0?s:r).totalDuration()/100:1)):o<0?(t in n||(n[t]=a),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),u&&r&&(l=l/100*(jx(r)?r[0]:r).totalDuration()),o>1?i(e,t.substr(0,o-1),r)+l:a+l)):t==null?a:+t},Ore=function(e,t,r){var n=H9(t[1]),s=(n?2:1)+(e<2?0:1),a=t[s],o,l;if(n&&(a.duration=t[1]),a.parent=r,e){for(o=a,l=r;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=M3(l.vars.inherit)&&l.parent;a.immediateRender=M3(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[s-1]}return new jg(t[0],a,t[s+1])},aw=function(e,t){return e||e===0?t(e):t},Lre=function(e,t,r){return r<e?e:r>t?t:r},Kx=function(e,t){return!Sm(e)||!(t=i5n.exec(e))?"":t[1]},g5n=function(e,t,r){return aw(r,function(n){return Lre(e,t,n)})},art=[].slice,FSr=function(e,t){return e&&R4(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&R4(e[0]))&&!e.nodeType&&e!==w4},m5n=function(e,t,r){return r===void 0&&(r=[]),e.forEach(function(n){var s;return Sm(n)&&!t||FSr(n,1)?(s=r).push.apply(s,fI(n)):r.push(n)})||r},fI=function(e,t,r){return Rp&&!t&&Rp.selector?Rp.selector(e):Sm(e)&&!r&&(Ktt||!PZ())?art.call((t||Qtt).querySelectorAll(e),0):jx(e)?m5n(e,r):FSr(e)?art.call(e,0):e?[e]:[]},ort=function(e){return e=fI(e)[0]||Pre("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return fI(t,r.querySelectorAll?r:r===e?Pre("Invalid scope")||Qtt.createElement("div"):e)}},BSr=function(e){return e.sort(function(){return .5-Math.random()})},PSr=function(e){if(H0(e))return e;var t=R4(e)?e:{each:e},r=$N(t.ease),n=t.from||0,s=parseFloat(t.base)||0,a={},o=n>0&&n<1,l=isNaN(n)||o,u=t.axis,c=n,d=n;return Sm(n)?c=d={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(c=n[0],d=n[1]),function(h,p,g){var x=(g||t).length,v=a[x],y,I,S,T,E,B,P,M,O;if(!v){if(O=t.grid==="auto"?0:(t.grid||[1,dI])[1],!O){for(P=-dI;P<(P=g[O++].getBoundingClientRect().left)&&O<x;);O<x&&O--}for(v=a[x]=[],y=l?Math.min(O,x)*c-.5:n%O,I=O===dI?0:l?x*d/O-.5:n/O|0,P=0,M=dI,B=0;B<x;B++)S=B%O-y,T=I-(B/O|0),v[B]=E=u?Math.abs(u==="y"?T:S):cSr(S*S+T*T),E>P&&(P=E),E<M&&(M=E);n==="random"&&BSr(v),v.max=P-M,v.min=M,v.v=x=(parseFloat(t.amount)||parseFloat(t.each)*(O>x?x-1:u?u==="y"?x/O:O:Math.max(O,x/O))||0)*(n==="edges"?-1:1),v.b=x<0?s-x:s,v.u=Kx(t.amount||t.each)||0,r=r&&x<0?zSr(r):r}return x=(v[h]-v.min)/v.max||0,Yg(v.b+(r?r(x):x)*v.v)+v.u}},lrt=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=Yg(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(H9(r)?0:Kx(r))}},MSr=function(e,t){var r=jx(e),n,s;return!r&&R4(e)&&(n=r=e.radius||dI,e.values?(e=fI(e.values),(s=!H9(e[0]))&&(n*=n)):e=lrt(e.increment)),aw(t,r?H0(e)?function(a){return s=e(a),Math.abs(s-a)<=n?s:a}:function(a){for(var o=parseFloat(s?a.x:a),l=parseFloat(s?a.y:0),u=dI,c=0,d=e.length,h,p;d--;)s?(h=e[d].x-o,p=e[d].y-l,h=h*h+p*p):h=Math.abs(e[d]-o),h<u&&(u=h,c=d);return c=!n||u<=n?e[c]:a,s||c===a||H9(a)?c:c+Kx(a)}:lrt(e))},NSr=function(e,t,r,n){return aw(jx(e)?!t:r===!0?!!(r=0):!n,function(){return jx(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+r*.99))/r)*r*n)/n})},x5n=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduce(function(s,a){return a(s)},n)}},v5n=function(e,t){return function(r){return e(parseFloat(r))+(t||Kx(r))}},y5n=function(e,t,r){return LSr(e,t,0,1,r)},OSr=function(e,t,r){return aw(r,function(n){return e[~~t(n)]})},C5n=function i(e,t,r){var n=t-e;return jx(e)?OSr(e,i(0,e.length),t):aw(r,function(s){return(n+(s-e)%n)%n+e})},A5n=function i(e,t,r){var n=t-e,s=n*2;return jx(e)?OSr(e,i(0,e.length-1),t):aw(r,function(a){return a=(s+(a-e)%s)%s||0,e+(a>n?s-a:a)})},kre=function(e){for(var t=0,r="",n,s,a,o;~(n=e.indexOf("random(",t));)a=e.indexOf(")",n),o=e.charAt(n+7)==="[",s=e.substr(n+7,a-n-7).match(o?pSr:Ytt),r+=e.substr(t,n-t)+NSr(o?s:+s[0],o?0:+s[1],+s[2]||1e-5),t=a+1;return r+e.substr(t,e.length-t)},LSr=function(e,t,r,n,s){var a=t-e,o=n-r;return aw(s,function(l){return r+((l-e)/a*o||0)})},b5n=function i(e,t,r,n){var s=isNaN(e+t)?0:function(p){return(1-p)*e+p*t};if(!s){var a=Sm(e),o={},l,u,c,d,h;if(r===!0&&(n=1)&&(r=null),a)e={p:e},t={p:t};else if(jx(e)&&!jx(t)){for(c=[],d=e.length,h=d-2,u=1;u<d;u++)c.push(i(e[u-1],e[u]));d--,s=function(g){g*=d;var x=Math.min(h,~~g);return c[x](g-x)},r=t}else n||(e=RZ(jx(e)?[]:{},e));if(!c){for(l in t)hrt.call(o,e,l,"get",t[l]);s=function(g){return xrt(g,o)||(a?e.p:e)}}}return aw(r,s)},kSr=function(e,t,r){var n=e.labels,s=dI,a,o,l;for(a in n)o=n[a]-t,o<0==!!r&&o&&s>(o=Math.abs(o))&&(l=a,s=o);return l},pA=function(e,t,r){var n=e.vars,s=n[t],a=Rp,o=e._ctx,l,u,c;if(s)return l=n[t+"Params"],u=n.callbackScope||e,r&&nw.length&&Yxe(),o&&(Rp=o),c=l?s.apply(u,l):s.call(u),Rp=a,c},Gre=function(e){return sw(e),e.scrollTrigger&&e.scrollTrigger.kill(!!O2),e.progress()<1&&pA(e,"onInterrupt"),e},BZ,GSr=[],VSr=function(e){if(e)if(e=!e.name&&e.default||e,Xtt()||e.headless){var t=e.name,r=H0(e),n=t&&!r&&e.init?function(){this._props=[]}:e,s={init:Mre,render:xrt,add:hrt,kill:k5n,modifier:L5n,rawVars:0},a={targetTest:0,get:0,getSetter:mrt,aliases:{},register:0};if(PZ(),e!==n){if(hA[t])return;fA(n,fA(jxe(e,s),a)),RZ(n.prototype,RZ(s,jxe(e,a))),hA[n.prop=t]=n,e.targetTest&&(Xxe.push(n),qtt[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}xSr(t,n),e.register&&e.register(L3,n,O3)}else GSr.push(e)},of=255,Vre={aqua:[0,of,of],lime:[0,of,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,of],navy:[0,0,128],white:[of,of,of],olive:[128,128,0],yellow:[of,of,0],orange:[of,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[of,0,0],pink:[of,192,203],cyan:[0,of,of],transparent:[of,of,of,0]},urt=function(e,t,r){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(r-t)*e*6:e<.5?r:e*3<2?t+(r-t)*(2/3-e)*6:t)*of+.5|0},WSr=function(e,t,r){var n=e?H9(e)?[e>>16,e>>8&of,e&of]:0:Vre.black,s,a,o,l,u,c,d,h,p,g;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Vre[e])n=Vre[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e="#"+s+s+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&of,n&of,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&of,e&of]}else if(e.substr(0,3)==="hsl"){if(n=g=e.match(Ytt),!t)l=+n[0]%360/360,u=+n[1]/100,c=+n[2]/100,a=c<=.5?c*(u+1):c+u-c*u,s=c*2-a,n.length>3&&(n[3]*=1),n[0]=urt(l+1/3,s,a),n[1]=urt(l,s,a),n[2]=urt(l-1/3,s,a);else if(~e.indexOf("="))return n=e.match(hSr),r&&n.length<4&&(n[3]=1),n}else n=e.match(Ytt)||Vre.transparent;n=n.map(Number)}return t&&!g&&(s=n[0]/of,a=n[1]/of,o=n[2]/of,d=Math.max(s,a,o),h=Math.min(s,a,o),c=(d+h)/2,d===h?l=u=0:(p=d-h,u=c>.5?p/(2-d-h):p/(d+h),l=d===s?(a-o)/p+(a<o?6:0):d===a?(o-s)/p+2:(s-a)/p+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(c*100+.5)),r&&n.length<4&&(n[3]=1),n},USr=function(e){var t=[],r=[],n=-1;return e.split(ow).forEach(function(s){var a=s.match(EZ)||[];t.push.apply(t,a),r.push(n+=a.length+1)}),t.c=r,t},HSr=function(e,t,r){var n="",s=(e+n).match(ow),a=t?"hsla(":"rgba(",o=0,l,u,c,d;if(!s)return e;if(s=s.map(function(h){return(h=WSr(h,t,1))&&a+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),r&&(c=USr(e),l=r.c,l.join(n)!==c.c.join(n)))for(u=e.replace(ow,"1").split(EZ),d=u.length-1;o<d;o++)n+=u[o]+(~l.indexOf(o)?s.shift()||a+"0,0,0,0)":(c.length?c:s.length?s:r).shift());if(!u)for(u=e.split(ow),d=u.length-1;o<d;o++)n+=u[o]+s[o];return n+u[d]},ow=(function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Vre)i+="|"+e+"\\b";return new RegExp(i+")","gi")})(),I5n=/hsl[a]?\(/,ZSr=function(e){var t=e.join(" "),r;if(ow.lastIndex=0,ow.test(t))return r=I5n.test(t),e[1]=HSr(e[1],r),e[0]=HSr(e[0],r,USr(e[1])),!0},Wre,gA=(function(){var i=Date.now,e=500,t=33,r=i(),n=r,s=1e3/240,a=s,o=[],l,u,c,d,h,p,g=function x(v){var y=i()-n,I=v===!0,S,T,E,B;if((y>e||y<0)&&(r+=y-t),n+=y,E=n-r,S=E-a,(S>0||I)&&(B=++d.frame,h=E-d.time*1e3,d.time=E=E/1e3,a+=S+(S>=s?4:s-S),T=1),I||(l=u(x)),T)for(p=0;p<o.length;p++)o[p](E,h,B,v)};return d={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(v){return h/(1e3/(v||60))},wake:function(){gSr&&(!Ktt&&Xtt()&&(w4=Ktt=window,Qtt=w4.document||{},dA.gsap=L3,(w4.gsapVersions||(w4.gsapVersions=[])).push(L3.version),mSr(Zxe||w4.GreenSockGlobals||!w4.gsap&&w4||{}),GSr.forEach(VSr)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),u=c||function(v){return setTimeout(v,a-d.time*1e3+1|0)},Wre=1,g(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),Wre=0,u=Mre},lagSmoothing:function(v,y){e=v||1/0,t=Math.min(y||33,e)},fps:function(v){s=1e3/(v||240),a=d.time*1e3+s},add:function(v,y,I){var S=y?function(T,E,B,P){v(T,E,B,P),d.remove(S)}:v;return d.remove(v),o[I?"unshift":"push"](S),PZ(),S},remove:function(v,y){~(y=o.indexOf(v))&&o.splice(y,1)&&p>=y&&p--},_listeners:o},d})(),PZ=function(){return!Wre&&gA.wake()},Wc={},_5n=/^[\d.\-M][\d.\-,\s]/,D5n=/["']/g,S5n=function(e){for(var t={},r=e.substr(1,e.length-3).split(":"),n=r[0],s=1,a=r.length,o,l,u;s<a;s++)l=r[s],o=s!==a-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),t[n]=isNaN(u)?u.replace(D5n,"").trim():+u,n=l.substr(o+1).trim();return t},E5n=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},T5n=function(e){var t=(e+"").split("("),r=Wc[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[S5n(t[1])]:E5n(e).split(",").map(bSr)):Wc._CE&&_5n.test(e)?Wc._CE("",e):r},zSr=function(e){return function(t){return 1-e(1-t)}},XSr=function i(e,t){for(var r=e._first,n;r;)r instanceof hy?i(r,t):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==t&&(r.timeline?i(r.timeline,t):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=t)),r=r._next},$N=function(e,t){return e&&(H0(e)?e:Wc[e]||T5n(e))||t},eO=function(e,t,r,n){r===void 0&&(r=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:r,easeInOut:n},a;return N3(e,function(o){Wc[o]=dA[o]=s,Wc[a=o.toLowerCase()]=r;for(var l in s)Wc[a+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Wc[o+"."+l]=s[l]}),s},YSr=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},crt=function i(e,t,r){var n=t>=1?t:1,s=(r||(e?.3:.45))/(t<1?t:1),a=s/Ztt*(Math.asin(1/n)||0),o=function(c){return c===1?1:n*Math.pow(2,-10*c)*r5n((c-a)*s)+1},l=e==="out"?o:e==="in"?function(u){return 1-o(1-u)}:YSr(o);return s=Ztt/s,l.config=function(u,c){return i(e,u,c)},l},drt=function i(e,t){t===void 0&&(t=1.70158);var r=function(a){return a?--a*a*((t+1)*a+t)+1:0},n=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:YSr(r);return n.config=function(s){return i(e,s)},n};N3("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;eO(i+",Power"+(t-1),e?function(r){return Math.pow(r,t)}:function(r){return r},function(r){return 1-Math.pow(1-r,t)},function(r){return r<.5?Math.pow(r*2,t)/2:1-Math.pow((1-r)*2,t)/2})}),Wc.Linear.easeNone=Wc.none=Wc.Linear.easeIn,eO("Elastic",crt("in"),crt("out"),crt()),(function(i,e){var t=1/e,r=2*t,n=2.5*t,s=function(o){return o<t?i*o*o:o<r?i*Math.pow(o-1.5/e,2)+.75:o<n?i*(o-=2.25/e)*o+.9375:i*Math.pow(o-2.625/e,2)+.984375};eO("Bounce",function(a){return 1-s(1-a)},s)})(7.5625,2.75),eO("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)}),eO("Circ",function(i){return-(cSr(1-i*i)-1)}),eO("Sine",function(i){return i===1?1:-t5n(i*$8n)+1}),eO("Back",drt("in"),drt("out"),drt()),Wc.SteppedEase=Wc.steps=dA.SteppedEase={config:function(e,t){e===void 0&&(e=1);var r=1/e,n=e+(t?0:1),s=t?1:0,a=1-af;return function(o){return((n*Lre(0,a,o)|0)+s)*r}}},SZ.ease=Wc["quad.out"],N3("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return trt+=i+","+i+"Params,"});var jSr=function(e,t){this.id=e5n++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:CSr,this.set=t?t.getSetter:mrt},Ure=(function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,FZ(this,+t.duration,1,1),this.data=t.data,Rp&&(this._ctx=Rp,Rp.data.push(this)),Wre||gA.wake()}var e=i.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,FZ(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,n){if(PZ(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(qxe(this,r),!s._dp||s.parent||ESr(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&F4(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===af||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),ASr(this,r,n)),this},e.time=function(r,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+SSr(this))%(this._dur+this._rDelay)||(r?this._dur:0),n):this._time},e.totalProgress=function(r,n){return arguments.length?this.totalTime(this.totalDuration()*r,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+SSr(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,n){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,n):this._repeat?wZ(this._tTime,s)+1:1},e.timeScale=function(r,n){if(!arguments.length)return this._rts===-af?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Qxe(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-af?0:this._rts,this.totalTime(Lre(-Math.abs(this._delay),this.totalDuration(),s),n!==!1),Jxe(this),u5n(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(PZ(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==af&&(this._tTime-=af)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=r;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&F4(n,this,r-this._delay),this}return this._start},e.endTime=function(r){return this._start+(M3(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var n=this.parent||this._dp;return n?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Qxe(n.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=s5n);var n=O2;return O2=r,irt(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),O2=n,this},e.globalTime=function(r){for(var n=this,s=arguments.length?r:n.rawTime();n;)s=n._start+s/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,wSr(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var n=this._time;return this._rDelay=r,wSr(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,n){return this.totalTime(hI(this,r),M3(n))},e.restart=function(r,n){return this.play().totalTime(r?-this._delay:0,M3(n)),this._dur||(this._zTime=-af),this},e.play=function(r,n){return r!=null&&this.seek(r,n),this.reversed(!1).paused(!1)},e.reverse=function(r,n){return r!=null&&this.seek(r||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(r,n){return r!=null&&this.seek(r,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-af:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-af,this},e.isActive=function(){var r=this.parent||this._dp,n=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=n&&s<this.endTime(!0)-af)},e.eventCallback=function(r,n,s){var a=this.vars;return arguments.length>1?(n?(a[r]=n,s&&(a[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=n)):delete a[r],this):a[r]},e.then=function(r){var n=this;return new Promise(function(s){var a=H0(r)?r:ISr,o=function(){var u=n.then;n.then=null,H0(a)&&(a=a(n))&&(a.then||a===n)&&(n.then=u),s(a),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){Gre(this)},i})();fA(Ure.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-af,_prom:0,_ps:!1,_rts:1});var hy=(function(i){uSr(e,i);function e(r,n){var s;return r===void 0&&(r={}),s=i.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=M3(r.sortChildren),l0&&F4(r.parent||l0,U9(s),n),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&TSr(U9(s),r.scrollTrigger),s}var t=e.prototype;return t.to=function(n,s,a){return Ore(0,arguments,this),this},t.from=function(n,s,a){return Ore(1,arguments,this),this},t.fromTo=function(n,s,a,o){return Ore(2,arguments,this),this},t.set=function(n,s,a){return s.duration=0,s.parent=this,Nre(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new jg(n,s,hI(this,a),1),this},t.call=function(n,s,a){return F4(this,jg.delayedCall(0,n,s),a)},t.staggerTo=function(n,s,a,o,l,u,c){return a.duration=s,a.stagger=a.stagger||o,a.onComplete=u,a.onCompleteParams=c,a.parent=this,new jg(n,a,hI(this,l)),this},t.staggerFrom=function(n,s,a,o,l,u,c){return a.runBackwards=1,Nre(a).immediateRender=M3(a.immediateRender),this.staggerTo(n,s,a,o,l,u,c)},t.staggerFromTo=function(n,s,a,o,l,u,c,d){return o.startAt=a,Nre(o).immediateRender=M3(o.immediateRender),this.staggerTo(n,s,o,l,u,c,d)},t.render=function(n,s,a){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=n<=0?0:Yg(n),d=this._zTime<0!=n<0&&(this._initted||!u),h,p,g,x,v,y,I,S,T,E,B,P;if(this!==l0&&c>l&&n>=0&&(c=l),c!==this._tTime||a||d){if(o!==this._time&&u&&(c+=this._time-o,n+=this._time-o),h=c,T=this._start,S=this._ts,y=!S,d&&(u||(o=this._zTime),(n||!s)&&(this._zTime=n)),this._repeat){if(B=this._yoyo,v=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(v*100+n,s,a);if(h=Yg(c%v),c===l?(x=this._repeat,h=u):(E=Yg(c/v),x=~~E,x&&x===E&&(h=u,x--),h>u&&(h=u)),E=wZ(this._tTime,v),!o&&this._tTime&&E!==x&&this._tTime-E*v-this._dur<=0&&(E=x),B&&x&1&&(h=u-h,P=1),x!==E&&!this._lock){var M=B&&E&1,O=M===(B&&x&1);if(x<E&&(M=!M),o=M?0:c%u?u:c,this._lock=1,this.render(o||(P?0:Yg(x*v)),s,!u)._lock=0,this._tTime=c,!s&&this.parent&&pA(this,"onRepeat"),this.vars.repeatRefresh&&!P&&(this.invalidate()._lock=1),o&&o!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,O&&(this._lock=2,o=M?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!P&&this.invalidate()),this._lock=0,!this._ts&&!y)return this;XSr(this,P)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(I=f5n(this,Yg(o),Yg(h)),I&&(c-=h-(h=I._start))),this._tTime=c,this._time=h,this._act=!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&c&&!s&&!E&&(pA(this,"onStart"),this._tTime!==c))return this;if(h>=o&&n>=0)for(p=this._first;p;){if(g=p._next,(p._act||h>=p._start)&&p._ts&&I!==p){if(p.parent!==this)return this.render(n,s,a);if(p.render(p._ts>0?(h-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(h-p._start)*p._ts,s,a),h!==this._time||!this._ts&&!y){I=0,g&&(c+=this._zTime=-af);break}}p=g}else{p=this._last;for(var k=n<0?n:h;p;){if(g=p._prev,(p._act||k<=p._end)&&p._ts&&I!==p){if(p.parent!==this)return this.render(n,s,a);if(p.render(p._ts>0?(k-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(k-p._start)*p._ts,s,a||O2&&irt(p)),h!==this._time||!this._ts&&!y){I=0,g&&(c+=this._zTime=k?-af:af);break}}p=g}}if(I&&!s&&(this.pause(),I.render(h>=o?0:-af)._zTime=h>=o?1:-1,this._ts))return this._start=T,Jxe(this),this.render(n,s,a);this._onUpdate&&!s&&pA(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(T===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&sw(this,1),!s&&!(n<0&&!o)&&(c||o||!l)&&(pA(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,s){var a=this;if(H9(s)||(s=hI(this,s,n)),!(n instanceof Ure)){if(jx(n))return n.forEach(function(o){return a.add(o,s)}),this;if(Sm(n))return this.addLabel(n,s);if(H0(n))n=jg.delayedCall(0,n);else return this}return this!==n?F4(this,n,s):this},t.getChildren=function(n,s,a,o){n===void 0&&(n=!0),s===void 0&&(s=!0),a===void 0&&(a=!0),o===void 0&&(o=-dI);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof jg?s&&l.push(u):(a&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,s,a)))),u=u._next;return l},t.getById=function(n){for(var s=this.getChildren(1,1,1),a=s.length;a--;)if(s[a].vars.id===n)return s[a]},t.remove=function(n){return Sm(n)?this.removeLabel(n):H0(n)?this.killTweensOf(n):(n.parent===this&&Kxe(this,n),n===this._recent&&(this._recent=this._last),qN(this))},t.totalTime=function(n,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Yg(gA.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,s),this._forcing=0,this):this._tTime},t.addLabel=function(n,s){return this.labels[n]=hI(this,s),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,s,a){var o=jg.delayedCall(0,s||Mre,a);return o.data="isPause",this._hasPause=1,F4(this,o,hI(this,n))},t.removePause=function(n){var s=this._first;for(n=hI(this,n);s;)s._start===n&&s.data==="isPause"&&sw(s),s=s._next},t.killTweensOf=function(n,s,a){for(var o=this.getTweensOf(n,a),l=o.length;l--;)lw!==o[l]&&o[l].kill(n,s);return this},t.getTweensOf=function(n,s){for(var a=[],o=fI(n),l=this._first,u=H9(s),c;l;)l instanceof jg?a5n(l._targets,o)&&(u?(!lw||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&a.push(l):(c=l.getTweensOf(o,s)).length&&a.push.apply(a,c),l=l._next;return a},t.tweenTo=function(n,s){s=s||{};var a=this,o=hI(a,n),l=s,u=l.startAt,c=l.onStart,d=l.onStartParams,h=l.immediateRender,p,g=jg.to(a,fA({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:s.duration||Math.abs((o-(u&&"time"in u?u.time:a._time))/a.timeScale())||af,onStart:function(){if(a.pause(),!p){var v=s.duration||Math.abs((o-(u&&"time"in u?u.time:a._time))/a.timeScale());g._dur!==v&&FZ(g,v,0,1).render(g._time,!0,!0),p=1}c&&c.apply(g,d||[])}},s));return h?g.render(0):g},t.tweenFromTo=function(n,s,a){return this.tweenTo(s,fA({startAt:{time:hI(this,n)}},a))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),kSr(this,hI(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),kSr(this,hI(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+af)},t.shiftChildren=function(n,s,a){a===void 0&&(a=0);for(var o=this._first,l=this.labels,u;o;)o._start>=a&&(o._start+=n,o._end+=n),o=o._next;if(s)for(u in l)l[u]>=a&&(l[u]+=n);return qN(this)},t.invalidate=function(n){var s=this._first;for(this._lock=0;s;)s.invalidate(n),s=s._next;return i.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var s=this._first,a;s;)a=s._next,this.remove(s),s=a;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),qN(this)},t.totalDuration=function(n){var s=0,a=this,o=a._last,l=dI,u,c,d;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-n:n));if(a._dirty){for(d=a.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&a._sort&&o._ts&&!a._lock?(a._lock=1,F4(a,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(s-=c,(!d&&!a._dp||d&&d.smoothChildTiming)&&(a._start+=c/a._ts,a._time-=c,a._tTime-=c),a.shiftChildren(-c,!1,-1/0),l=0),o._end>s&&o._ts&&(s=o._end),o=u;FZ(a,a===l0&&a._time>s?a._time:s,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(n){if(l0._ts&&(ASr(l0,Qxe(n,l0)),vSr=gA.frame),gA.frame>=ySr){ySr+=cA.autoSleep||120;var s=l0._first;if((!s||!s._ts)&&cA.autoSleep&&gA._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||gA.sleep()}}},e})(Ure);fA(hy.prototype,{_lock:0,_hasPause:0,_forcing:0});var R5n=function(e,t,r,n,s,a,o){var l=new O3(this._pt,e,t,0,1,eEr,null,s),u=0,c=0,d,h,p,g,x,v,y,I;for(l.b=r,l.e=n,r+="",n+="",(y=~n.indexOf("random("))&&(n=kre(n)),a&&(I=[r,n],a(I,e,t),r=I[0],n=I[1]),h=r.match(jtt)||[];d=jtt.exec(n);)g=d[0],x=n.substring(u,d.index),p?p=(p+1)%5:x.substr(-5)==="rgba("&&(p=1),g!==h[c++]&&(v=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:x||c===1?x:",",s:v,c:g.charAt(1)==="="?TZ(v,g)-v:parseFloat(g)-v,m:p&&p<4?Math.round:0},u=jtt.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=o,(fSr.test(n)||y)&&(l.e=0),this._pt=l,l},hrt=function(e,t,r,n,s,a,o,l,u,c){H0(n)&&(n=n(s||0,e,a));var d=e[t],h=r!=="get"?r:H0(d)?u?e[t.indexOf("set")||!H0(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():d,p=H0(d)?u?M5n:qSr:grt,g;if(Sm(n)&&(~n.indexOf("random(")&&(n=kre(n)),n.charAt(1)==="="&&(g=TZ(h,n)+(Kx(h)||0),(g||g===0)&&(n=g))),!c||h!==n||frt)return!isNaN(h*n)&&n!==""?(g=new O3(this._pt,e,t,+h||0,n-(h||0),typeof d=="boolean"?O5n:$Sr,0,p),u&&(g.fp=u),o&&g.modifier(o,this,e),this._pt=g):(!d&&!(t in e)&&Jtt(t,n),R5n.call(this,e,t,h,n,p,l||cA.stringFilter,u))},w5n=function(e,t,r,n,s){if(H0(e)&&(e=Hre(e,s,t,r,n)),!R4(e)||e.style&&e.nodeType||jx(e)||dSr(e))return Sm(e)?Hre(e,s,t,r,n):e;var a={},o;for(o in e)a[o]=Hre(e[o],s,t,r,n);return a},KSr=function(e,t,r,n,s,a){var o,l,u,c;if(hA[e]&&(o=new hA[e]).init(s,o.rawVars?t[e]:w5n(t[e],n,s,a,r),r,n,a)!==!1&&(r._pt=l=new O3(r._pt,s,e,0,1,o.render,o,0,o.priority),r!==BZ))for(u=r._ptLookup[r._targets.indexOf(s)],c=o._props.length;c--;)u[o._props[c]]=l;return o},lw,frt,prt=function i(e,t,r){var n=e.vars,s=n.ease,a=n.startAt,o=n.immediateRender,l=n.lazy,u=n.onUpdate,c=n.runBackwards,d=n.yoyoEase,h=n.keyframes,p=n.autoRevert,g=e._dur,x=e._startAt,v=e._targets,y=e.parent,I=y&&y.data==="nested"?y.vars.targets:v,S=e._overwrite==="auto"&&!Htt,T=e.timeline,E,B,P,M,O,k,V,U,z,Z,j,K,J;if(T&&(!h||!s)&&(s="none"),e._ease=$N(s,SZ.ease),e._yEase=d?zSr($N(d===!0?s:d,SZ.ease)):0,d&&e._yoyo&&!e._repeat&&(d=e._yEase,e._yEase=e._ease,e._ease=d),e._from=!T&&!!n.runBackwards,!T||h&&!n.stagger){if(U=v[0]?JN(v[0]).harness:0,K=U&&n[U.prop],E=jxe(n,qtt),x&&(x._zTime<0&&x.progress(1),t<0&&c&&o&&!p?x.render(-1,!0):x.revert(c&&g?zxe:n5n),x._lazy=0),a){if(sw(e._startAt=jg.set(v,fA({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!x&&M3(l),startAt:null,delay:0,onUpdate:u&&function(){return pA(e,"onUpdate")},stagger:0},a))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(O2||!o&&!p)&&e._startAt.revert(zxe),o&&g&&t<=0&&r<=0){t&&(e._zTime=t);return}}else if(c&&g&&!x){if(t&&(o=!1),P=fA({overwrite:!1,data:"isFromStart",lazy:o&&!x&&M3(l),immediateRender:o,stagger:0,parent:y},E),K&&(P[U.prop]=K),sw(e._startAt=jg.set(v,P)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(O2?e._startAt.revert(zxe):e._startAt.render(-1,!0)),e._zTime=t,!o)i(e._startAt,af,af);else if(!t)return}for(e._pt=e._ptCache=0,l=g&&M3(l)||l&&!g,B=0;B<v.length;B++){if(O=v[B],V=O._gsap||rrt(v)[B]._gsap,e._ptLookup[B]=Z={},$tt[V.id]&&nw.length&&Yxe(),j=I===v?B:I.indexOf(O),U&&(z=new U).init(O,K||E,e,j,I)!==!1&&(e._pt=M=new O3(e._pt,O,z.name,0,1,z.render,z,0,z.priority),z._props.forEach(function(q){Z[q]=M}),z.priority&&(k=1)),!U||K)for(P in E)hA[P]&&(z=KSr(P,E,e,j,O,I))?z.priority&&(k=1):Z[P]=M=hrt.call(e,O,P,"get",E[P],j,I,0,n.stringFilter);e._op&&e._op[B]&&e.kill(O,e._op[B]),S&&e._pt&&(lw=e,l0.killTweensOf(O,Z,e.globalTime(t)),J=!e.parent,lw=0),e._pt&&l&&($tt[V.id]=1)}k&&tEr(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!J,h&&t<=0&&T.render(dI,!0,!0)},F5n=function(e,t,r,n,s,a,o,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,d,h,p;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,p=e._targets.length;p--;){if(c=h[p][t],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return frt=1,e.vars[t]="+=0",prt(e,o),frt=0,l?Pre(t+" not eligible for reset"):1;u.push(c)}for(p=u.length;p--;)d=u[p],c=d._pt||d,c.s=(n||n===0)&&!s?n:c.s+(n||0)+a*c.c,c.c=r-c.s,d.e&&(d.e=vg(r)+Kx(d.e)),d.b&&(d.b=c.s+Kx(d.b))},B5n=function(e,t){var r=e[0]?JN(e[0]).harness:0,n=r&&r.aliases,s,a,o,l;if(!n)return t;s=RZ({},t);for(a in n)if(a in s)for(l=n[a].split(","),o=l.length;o--;)s[l[o]]=s[a];return s},P5n=function(e,t,r,n){var s=t.ease||n||"power1.inOut",a,o;if(jx(t))o=r[e]||(r[e]=[]),t.forEach(function(l,u){return o.push({t:u/(t.length-1)*100,v:l,e:s})});else for(a in t)o=r[a]||(r[a]=[]),a==="ease"||o.push({t:parseFloat(e),v:t[a],e:s})},Hre=function(e,t,r,n,s){return H0(e)?e.call(t,r,n,s):Sm(e)&&~e.indexOf("random(")?kre(e):e},QSr=trt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",JSr={};N3(QSr+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return JSr[i]=1});var jg=(function(i){uSr(e,i);function e(r,n,s,a){var o;typeof n=="number"&&(s.duration=n,n=s,s=null),o=i.call(this,a?n:Nre(n))||this;var l=o.vars,u=l.duration,c=l.delay,d=l.immediateRender,h=l.stagger,p=l.overwrite,g=l.keyframes,x=l.defaults,v=l.scrollTrigger,y=l.yoyoEase,I=n.parent||l0,S=(jx(r)||dSr(r)?H9(r[0]):"length"in n)?[r]:fI(r),T,E,B,P,M,O,k,V;if(o._targets=S.length?rrt(S):Pre("GSAP target "+r+" not found. https://gsap.com",!cA.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=p,g||h||Hxe(u)||Hxe(c)){if(n=o.vars,T=o.timeline=new hy({data:"nested",defaults:x||{},targets:I&&I.data==="nested"?I.vars.targets:S}),T.kill(),T.parent=T._dp=U9(o),T._start=0,h||Hxe(u)||Hxe(c)){if(P=S.length,k=h&&PSr(h),R4(h))for(M in h)~QSr.indexOf(M)&&(V||(V={}),V[M]=h[M]);for(E=0;E<P;E++)B=jxe(n,JSr),B.stagger=0,y&&(B.yoyoEase=y),V&&RZ(B,V),O=S[E],B.duration=+Hre(u,U9(o),E,O,S),B.delay=(+Hre(c,U9(o),E,O,S)||0)-o._delay,!h&&P===1&&B.delay&&(o._delay=c=B.delay,o._start+=c,B.delay=0),T.to(O,B,k?k(E,O,S):0),T._ease=Wc.none;T.duration()?u=c=0:o.timeline=0}else if(g){Nre(fA(T.vars.defaults,{ease:"none"})),T._ease=$N(g.ease||n.ease||"none");var U=0,z,Z,j;if(jx(g))g.forEach(function(K){return T.to(S,K,">")}),T.duration();else{B={};for(M in g)M==="ease"||M==="easeEach"||P5n(M,g[M],B,g.easeEach);for(M in B)for(z=B[M].sort(function(K,J){return K.t-J.t}),U=0,E=0;E<z.length;E++)Z=z[E],j={ease:Z.e,duration:(Z.t-(E?z[E-1].t:0))/100*u},j[M]=Z.v,T.to(S,j,U),U+=j.duration;T.duration()<u&&T.to({},{duration:u-T.duration()})}}u||o.duration(u=T.duration())}else o.timeline=0;return p===!0&&!Htt&&(lw=U9(o),l0.killTweensOf(S),lw=0),F4(I,U9(o),s),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(d||!u&&!g&&o._start===Yg(I._time)&&M3(d)&&c5n(U9(o))&&I.data!=="nested")&&(o._tTime=-af,o.render(Math.max(0,-c)||0)),v&&TSr(U9(o),v),o}var t=e.prototype;return t.render=function(n,s,a){var o=this._time,l=this._tDur,u=this._dur,c=n<0,d=n>l-af&&!c?l:n<af?0:n,h,p,g,x,v,y,I,S,T;if(!u)h5n(this,n,s,a);else if(d!==this._tTime||!n||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(h=d,S=this.timeline,this._repeat){if(x=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(x*100+n,s,a);if(h=Yg(d%x),d===l?(g=this._repeat,h=u):(v=Yg(d/x),g=~~v,g&&g===v?(h=u,g--):h>u&&(h=u)),y=this._yoyo&&g&1,y&&(T=this._yEase,h=u-h),v=wZ(this._tTime,x),h===o&&!a&&this._initted&&g===v)return this._tTime=d,this;g!==v&&(S&&this._yEase&&XSr(S,y),this.vars.repeatRefresh&&!y&&!this._lock&&h!==x&&this._initted&&(this._lock=a=1,this.render(Yg(x*g),!0).invalidate()._lock=0))}if(!this._initted){if(RSr(this,c?n:h,a,s,d))return this._tTime=0,this;if(o!==this._time&&!(a&&this.vars.repeatRefresh&&g!==v))return this;if(u!==this._dur)return this.render(n,s,a)}if(this._tTime=d,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=I=(T||this._ease)(h/u),this._from&&(this.ratio=I=1-I),!o&&d&&!s&&!v&&(pA(this,"onStart"),this._tTime!==d))return this;for(p=this._pt;p;)p.r(I,p.d),p=p._next;S&&S.render(n<0?n:S._dur*S._ease(h/this._dur),s,a)||this._startAt&&(this._zTime=n),this._onUpdate&&!s&&(c&&nrt(this,n,s,a),pA(this,"onUpdate")),this._repeat&&g!==v&&this.vars.onRepeat&&!s&&this.parent&&pA(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(c&&!this._onUpdate&&nrt(this,n,!0,!0),(n||!u)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&sw(this,1),!s&&!(c&&!o)&&(d||o||y)&&(pA(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},t.resetTo=function(n,s,a,o,l){Wre||gA.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||prt(this,u),c=this._ease(u/this._dur),F5n(this,n,s,a,o,c,u,l)?this.resetTo(n,s,a,o,1):(qxe(this,0),this.parent||DSr(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,s){if(s===void 0&&(s="all"),!n&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Gre(this):this.scrollTrigger&&this.scrollTrigger.kill(!!O2),this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(n,s,lw&&lw.vars.overwrite!==!0)._first||Gre(this),this.parent&&a!==this.timeline.totalDuration()&&FZ(this,this._dur*this.timeline._tDur/a,0,1),this}var o=this._targets,l=n?fI(n):o,u=this._ptLookup,c=this._pt,d,h,p,g,x,v,y;if((!s||s==="all")&&l5n(o,l))return s==="all"&&(this._pt=0),Gre(this);for(d=this._op=this._op||[],s!=="all"&&(Sm(s)&&(x={},N3(s,function(I){return x[I]=1}),s=x),s=B5n(o,s)),y=o.length;y--;)if(~l.indexOf(o[y])){h=u[y],s==="all"?(d[y]=s,g=h,p={}):(p=d[y]=d[y]||{},g=s);for(x in g)v=h&&h[x],v&&((!("kill"in v.d)||v.d.kill(x)===!0)&&Kxe(this,v,"_pt"),delete h[x]),p!=="all"&&(p[x]=1)}return this._initted&&!this._pt&&c&&Gre(this),this},e.to=function(n,s){return new e(n,s,arguments[2])},e.from=function(n,s){return Ore(1,arguments)},e.delayedCall=function(n,s,a,o){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:s,onReverseComplete:s,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:o})},e.fromTo=function(n,s,a){return Ore(2,arguments)},e.set=function(n,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(n,s)},e.killTweensOf=function(n,s,a){return l0.killTweensOf(n,s,a)},e})(Ure);fA(jg.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),N3("staggerTo,staggerFrom,staggerFromTo",function(i){jg[i]=function(){var e=new hy,t=art.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var grt=function(e,t,r){return e[t]=r},qSr=function(e,t,r){return e[t](r)},M5n=function(e,t,r,n){return e[t](n.fp,r)},N5n=function(e,t,r){return e.setAttribute(t,r)},mrt=function(e,t){return H0(e[t])?qSr:ztt(e[t])&&e.setAttribute?N5n:grt},$Sr=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},O5n=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},eEr=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},xrt=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},L5n=function(e,t,r,n){for(var s=this._pt,a;s;)a=s._next,s.p===n&&s.modifier(e,t,r),s=a},k5n=function(e){for(var t=this._pt,r,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?Kxe(this,t,"_pt"):t.dep||(r=1),t=n;return!r},G5n=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},tEr=function(e){for(var t=e._pt,r,n,s,a;t;){for(r=t._next,n=s;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:a)?t._prev._next=t:s=t,(t._next=n)?n._prev=t:a=t,t=r}e._pt=s},O3=(function(){function i(t,r,n,s,a,o,l,u,c){this.t=r,this.s=s,this.c=a,this.p=n,this.r=o||$Sr,this.d=l||this,this.set=u||grt,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(r,n,s){this.mSet=this.mSet||this.set,this.set=G5n,this.m=r,this.mt=s,this.tween=n},i})();N3(trt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return qtt[i]=1}),dA.TweenMax=dA.TweenLite=jg,dA.TimelineLite=dA.TimelineMax=hy,l0=new hy({sortChildren:!1,defaults:SZ,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),cA.stringFilter=ZSr;var tO=[],$xe={},V5n=[],rEr=0,W5n=0,vrt=function(e){return($xe[e]||V5n).map(function(t){return t()})},yrt=function(){var e=Date.now(),t=[];e-rEr>2&&(vrt("matchMediaInit"),tO.forEach(function(r){var n=r.queries,s=r.conditions,a,o,l,u;for(o in n)a=w4.matchMedia(n[o]).matches,a&&(l=1),a!==s[o]&&(s[o]=a,u=1);u&&(r.revert(),l&&t.push(r))}),vrt("matchMediaRevert"),t.forEach(function(r){return r.onMatch(r,function(n){return r.add(null,n)})}),rEr=e,vrt("matchMedia"))},iEr=(function(){function i(t,r){this.selector=r&&ort(r),this.data=[],this._r=[],this.isReverted=!1,this.id=W5n++,t&&this.add(t)}var e=i.prototype;return e.add=function(r,n,s){H0(r)&&(s=n,n=r,r=H0);var a=this,o=function(){var u=Rp,c=a.selector,d;return u&&u!==a&&u.data.push(a),s&&(a.selector=ort(s)),Rp=a,d=n.apply(a,arguments),H0(d)&&a._r.push(d),Rp=u,a.selector=c,a.isReverted=!1,d};return a.last=o,r===H0?o(a,function(l){return a.add(null,l)}):r?a[r]=o:o},e.ignore=function(r){var n=Rp;Rp=null,r(this),Rp=n},e.getTweens=function(){var r=[];return this.data.forEach(function(n){return n instanceof i?r.push.apply(r,n.getTweens()):n instanceof jg&&!(n.parent&&n.parent.data==="nested")&&r.push(n)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,n){var s=this;if(r?(function(){for(var o=s.getTweens(),l=s.data.length,u;l--;)u=s.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,d){return d.g-c.g||-1/0}).forEach(function(c){return c.t.revert(r)}),l=s.data.length;l--;)u=s.data[l],u instanceof hy?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof jg)&&u.revert&&u.revert(r);s._r.forEach(function(c){return c(r,s)}),s.isReverted=!0})():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),n)for(var a=tO.length;a--;)tO[a].id===this.id&&tO.splice(a,1)},e.revert=function(r){this.kill(r||{})},i})(),U5n=(function(){function i(t){this.contexts=[],this.scope=t,Rp&&Rp.data.push(this)}var e=i.prototype;return e.add=function(r,n,s){R4(r)||(r={matches:r});var a=new iEr(0,s||this.scope),o=a.conditions={},l,u,c;Rp&&!a.selector&&(a.selector=Rp.selector),this.contexts.push(a),n=a.add("onMatch",n),a.queries=r;for(u in r)u==="all"?c=1:(l=w4.matchMedia(r[u]),l&&(tO.indexOf(a)<0&&tO.push(a),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(yrt):l.addEventListener("change",yrt)));return c&&n(a,function(d){return a.add(null,d)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(n){return n.kill(r,!0)})},i})(),eve={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(function(n){return VSr(n)})},timeline:function(e){return new hy(e)},getTweensOf:function(e,t){return l0.getTweensOf(e,t)},getProperty:function(e,t,r,n){Sm(e)&&(e=fI(e)[0]);var s=JN(e||{}).get,a=r?ISr:bSr;return r==="native"&&(r=""),e&&(t?a((hA[t]&&hA[t].get||s)(e,t,r,n)):function(o,l,u){return a((hA[o]&&hA[o].get||s)(e,o,l,u))})},quickSetter:function(e,t,r){if(e=fI(e),e.length>1){var n=e.map(function(c){return L3.quickSetter(c,t,r)}),s=n.length;return function(c){for(var d=s;d--;)n[d](c)}}e=e[0]||{};var a=hA[t],o=JN(e),l=o.harness&&(o.harness.aliases||{})[t]||t,u=a?function(c){var d=new a;BZ._pt=0,d.init(e,r?c+r:c,BZ,0,[e]),d.render(1,d),BZ._pt&&xrt(1,BZ)}:o.set(e,l);return a?u:function(c){return u(e,l,r?c+r:c,o,1)}},quickTo:function(e,t,r){var n,s=L3.to(e,fA((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),r||{})),a=function(l,u,c){return s.resetTo(t,l,u,c)};return a.tween=s,a},isTweening:function(e){return l0.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=$N(e.ease,SZ.ease)),_Sr(SZ,e||{})},config:function(e){return _Sr(cA,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,s=e.defaults,a=e.extendTimeline;(n||"").split(",").forEach(function(o){return o&&!hA[o]&&!dA[o]&&Pre(t+" effect requires "+o+" plugin.")}),ert[t]=function(o,l,u){return r(fI(o),fA(l||{},s),u)},a&&(hy.prototype[t]=function(o,l,u){return this.add(ert[t](o,R4(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){Wc[e]=$N(t)},parseEase:function(e,t){return arguments.length?$N(e,t):Wc},getById:function(e){return l0.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var r=new hy(e),n,s;for(r.smoothChildTiming=M3(e.smoothChildTiming),l0.remove(r),r._dp=0,r._time=r._tTime=l0._time,n=l0._first;n;)s=n._next,(t||!(!n._dur&&n instanceof jg&&n.vars.onComplete===n._targets[0]))&&F4(r,n,n._start-n._delay),n=s;return F4(l0,r,0),r},context:function(e,t){return e?new iEr(e,t):Rp},matchMedia:function(e){return new U5n(e)},matchMediaRefresh:function(){return tO.forEach(function(e){var t=e.conditions,r,n;for(n in t)t[n]&&(t[n]=!1,r=1);r&&e.revert()})||yrt()},addEventListener:function(e,t){var r=$xe[e]||($xe[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=$xe[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:C5n,wrapYoyo:A5n,distribute:PSr,random:NSr,snap:MSr,normalize:y5n,getUnit:Kx,clamp:g5n,splitColor:WSr,toArray:fI,selector:ort,mapRange:LSr,pipe:x5n,unitize:v5n,interpolate:b5n,shuffle:BSr},install:mSr,effects:ert,ticker:gA,updateRoot:hy.updateRoot,plugins:hA,globalTimeline:l0,core:{PropTween:O3,globals:xSr,Tween:jg,Timeline:hy,Animation:Ure,getCache:JN,_removeLinkedListItem:Kxe,reverting:function(){return O2},context:function(e){return e&&Rp&&(Rp.data.push(e),e._ctx=Rp),Rp},suppressOverwrites:function(e){return Htt=e}}};N3("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return eve[i]=jg[i]}),gA.add(hy.updateRoot),BZ=eve.to({},{duration:0});var H5n=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},Z5n=function(e,t){var r=e._targets,n,s,a;for(n in t)for(s=r.length;s--;)a=e._ptLookup[s][n],a&&(a=a.d)&&(a._pt&&(a=H5n(a,n)),a&&a.modifier&&a.modifier(t[n],e,r[s],n))},Crt=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,s,a){a._onInit=function(o){var l,u;if(Sm(s)&&(l={},N3(s,function(c){return l[c]=1}),s=l),t){l={};for(u in s)l[u]=t(s[u]);s=l}Z5n(o,s)}}}},L3=eve.registerPlugin({name:"attr",init:function(e,t,r,n,s){var a,o,l;this.tween=r;for(a in t)l=e.getAttribute(a)||"",o=this.add(e,"setAttribute",(l||0)+"",t[a],n,s,0,0,a),o.op=a,o.b=l,this._props.push(a)},render:function(e,t){for(var r=t._pt;r;)O2?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},Crt("roundProps",lrt),Crt("modifiers"),Crt("snap",MSr))||eve;jg.version=hy.version=L3.version="3.13.0",gSr=1,Xtt()&&PZ(),Wc.Power0,Wc.Power1,Wc.Power2,Wc.Power3,Wc.Power4,Wc.Linear,Wc.Quad,Wc.Cubic,Wc.Quart,Wc.Quint,Wc.Strong,Wc.Elastic,Wc.Back,Wc.SteppedEase,Wc.Bounce,Wc.Sine,Wc.Expo,Wc.Circ;var nEr,uw,MZ,Art,rO,sEr,brt,z5n=function(){return typeof window<"u"},Z9={},iO=180/Math.PI,NZ=Math.PI/180,OZ=Math.atan2,aEr=1e8,Irt=/([A-Z])/g,X5n=/(left|right|width|margin|padding|x)/i,Y5n=/[\s,\(]\S/,B4={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_rt=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},j5n=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},K5n=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Q5n=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},oEr=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},lEr=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},J5n=function(e,t,r){return e.style[t]=r},q5n=function(e,t,r){return e.style.setProperty(t,r)},$5n=function(e,t,r){return e._gsap[t]=r},e9n=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},t9n=function(e,t,r,n,s){var a=e._gsap;a.scaleX=a.scaleY=r,a.renderTransform(s,a)},r9n=function(e,t,r,n,s){var a=e._gsap;a[t]=r,a.renderTransform(s,a)},u0="transform",k3=u0+"Origin",i9n=function i(e,t){var r=this,n=this.target,s=n.style,a=n._gsap;if(e in Z9&&s){if(this.tfm=this.tfm||{},e!=="transform")e=B4[e]||e,~e.indexOf(",")?e.split(",").forEach(function(o){return r.tfm[o]=z9(n,o)}):this.tfm[e]=a.x?a[e]:z9(n,e),e===k3&&(this.tfm.zOrigin=a.zOrigin);else return B4.transform.split(",").forEach(function(o){return i.call(r,o,t)});if(this.props.indexOf(u0)>=0)return;a.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(k3,t,"")),e=u0}(s||t)&&this.props.push(e,t,s[e])},uEr=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},n9n=function(){var e=this.props,t=this.target,r=t.style,n=t._gsap,s,a;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?t[e[s]](e[s+2]):t[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(Irt,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)n[a]=this.tfm[a];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=brt(),(!s||!s.isStart)&&!r[u0]&&(uEr(r),n.zOrigin&&r[k3]&&(r[k3]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},cEr=function(e,t){var r={target:e,props:[],revert:n9n,save:i9n};return e._gsap||L3.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return r.save(n)}),r},dEr,Drt=function(e,t){var r=uw.createElementNS?uw.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):uw.createElement(e);return r&&r.style?r:uw.createElement(e)},pI=function i(e,t,r){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Irt,"-$1").toLowerCase())||n.getPropertyValue(t)||!r&&i(e,LZ(t)||t,1)||""},hEr="O,Moz,ms,Ms,Webkit".split(","),LZ=function(e,t,r){var n=t||rO,s=n.style,a=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(hEr[a]+e in s););return a<0?null:(a===3?"ms":a>=0?hEr[a]:"")+e},Srt=function(){z5n()&&window.document&&(nEr=window,uw=nEr.document,MZ=uw.documentElement,rO=Drt("div")||{style:{}},Drt("div"),u0=LZ(u0),k3=u0+"Origin",rO.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",dEr=!!LZ("perspective"),brt=L3.core.reverting,Art=1)},fEr=function(e){var t=e.ownerSVGElement,r=Drt("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),s;n.style.display="block",r.appendChild(n),MZ.appendChild(r);try{s=n.getBBox()}catch{}return r.removeChild(n),MZ.removeChild(r),s},pEr=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},gEr=function(e){var t,r;try{t=e.getBBox()}catch{t=fEr(e),r=1}return t&&(t.width||t.height)||r||(t=fEr(e)),t&&!t.width&&!t.x&&!t.y?{x:+pEr(e,["x","cx","x1"])||0,y:+pEr(e,["y","cy","y1"])||0,width:0,height:0}:t},mEr=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&gEr(e))},nO=function(e,t){if(t){var r=e.style,n;t in Z9&&t!==k3&&(t=u0),r.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),r.removeProperty(n==="--"?t:t.replace(Irt,"-$1").toLowerCase())):r.removeAttribute(t)}},cw=function(e,t,r,n,s,a){var o=new O3(e._pt,t,r,0,1,a?lEr:oEr);return e._pt=o,o.b=n,o.e=s,e._props.push(r),o},xEr={deg:1,rad:1,turn:1},s9n={grid:1,flex:1},dw=function i(e,t,r,n){var s=parseFloat(r)||0,a=(r+"").trim().substr((s+"").length)||"px",o=rO.style,l=X5n.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),d=100,h=n==="px",p=n==="%",g,x,v,y;if(n===a||!s||xEr[n]||xEr[a])return s;if(a!=="px"&&!h&&(s=i(e,t,r,"px")),y=e.getCTM&&mEr(e),(p||a==="%")&&(Z9[t]||~t.indexOf("adius")))return g=y?e.getBBox()[l?"width":"height"]:e[c],vg(p?s/g*d:s/100*g);if(o[l?"width":"height"]=d+(h?a:n),x=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,y&&(x=(e.ownerSVGElement||{}).parentNode),(!x||x===uw||!x.appendChild)&&(x=uw.body),v=x._gsap,v&&p&&v.width&&l&&v.time===gA.time&&!v.uncache)return vg(s/v.width*d);if(p&&(t==="height"||t==="width")){var I=e.style[t];e.style[t]=d+n,g=e[c],I?e.style[t]=I:nO(e,t)}else(p||a==="%")&&!s9n[pI(x,"display")]&&(o.position=pI(e,"position")),x===e&&(o.position="static"),x.appendChild(rO),g=rO[c],x.removeChild(rO),o.position="absolute";return l&&p&&(v=JN(x),v.time=gA.time,v.width=x[c]),vg(h?g*s/d:g&&s?d/g*s:0)},z9=function(e,t,r,n){var s;return Art||Srt(),t in B4&&t!=="transform"&&(t=B4[t],~t.indexOf(",")&&(t=t.split(",")[0])),Z9[t]&&t!=="transform"?(s=zre(e,n),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:rve(pI(e,k3))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||n||~(s+"").indexOf("calc("))&&(s=tve[t]&&tve[t](e,t,r)||pI(e,t)||CSr(e,t)||(t==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?dw(e,t,s,r)+r:s},a9n=function(e,t,r,n){if(!r||r==="none"){var s=LZ(t,e,1),a=s&&pI(e,s,1);a&&a!==r?(t=s,r=a):t==="borderColor"&&(r=pI(e,"borderTopColor"))}var o=new O3(this._pt,e.style,t,0,1,eEr),l=0,u=0,c,d,h,p,g,x,v,y,I,S,T,E;if(o.b=r,o.e=n,r+="",n+="",n.substring(0,6)==="var(--"&&(n=pI(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(x=e.style[t],e.style[t]=n,n=pI(e,t)||n,x?e.style[t]=x:nO(e,t)),c=[r,n],ZSr(c),r=c[0],n=c[1],h=r.match(EZ)||[],E=n.match(EZ)||[],E.length){for(;d=EZ.exec(n);)v=d[0],I=n.substring(l,d.index),g?g=(g+1)%5:(I.substr(-5)==="rgba("||I.substr(-5)==="hsla(")&&(g=1),v!==(x=h[u++]||"")&&(p=parseFloat(x)||0,T=x.substr((p+"").length),v.charAt(1)==="="&&(v=TZ(p,v)+T),y=parseFloat(v),S=v.substr((y+"").length),l=EZ.lastIndex-S.length,S||(S=S||cA.units[t]||T,l===n.length&&(n+=S,o.e+=S)),T!==S&&(p=dw(e,t,x,S)||0),o._pt={_next:o._pt,p:I||u===1?I:",",s:p,c:y-p,m:g&&g<4||t==="zIndex"?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r=t==="display"&&n==="none"?lEr:oEr;return fSr.test(n)&&(o.e=0),this._pt=o,o},vEr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},o9n=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return(r==="top"||r==="bottom"||n==="left"||n==="right")&&(e=r,r=n,n=e),t[0]=vEr[r]||r,t[1]=vEr[n]||n,t.join(" ")},l9n=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r=t.t,n=r.style,s=t.u,a=r._gsap,o,l,u;if(s==="all"||s===!0)n.cssText="",l=1;else for(s=s.split(","),u=s.length;--u>-1;)o=s[u],Z9[o]&&(l=1,o=o==="transformOrigin"?k3:u0),nO(r,o);l&&(nO(r,u0),a&&(a.svg&&r.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",zre(r,1),a.uncache=1,uEr(n)))}},tve={clearProps:function(e,t,r,n,s){if(s.data!=="isFromStart"){var a=e._pt=new O3(e._pt,t,r,0,0,l9n);return a.u=n,a.pr=-10,a.tween=s,e._props.push(r),1}}},Zre=[1,0,0,1,0,0],yEr={},CEr=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},AEr=function(e){var t=pI(e,u0);return CEr(t)?Zre:t.substr(7).match(hSr).map(vg)},Ert=function(e,t){var r=e._gsap||JN(e),n=e.style,s=AEr(e),a,o,l,u;return r.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Zre:s):(s===Zre&&!e.offsetParent&&e!==MZ&&!r.svg&&(l=n.display,n.display="block",a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,o=e.nextElementSibling,MZ.appendChild(e)),s=AEr(e),l?n.display=l:nO(e,"display"),u&&(o?a.insertBefore(e,o):a?a.appendChild(e):MZ.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Trt=function(e,t,r,n,s,a){var o=e._gsap,l=s||Ert(e,!0),u=o.xOrigin||0,c=o.yOrigin||0,d=o.xOffset||0,h=o.yOffset||0,p=l[0],g=l[1],x=l[2],v=l[3],y=l[4],I=l[5],S=t.split(" "),T=parseFloat(S[0])||0,E=parseFloat(S[1])||0,B,P,M,O;r?l!==Zre&&(P=p*v-g*x)&&(M=T*(v/P)+E*(-x/P)+(x*I-v*y)/P,O=T*(-g/P)+E*(p/P)-(p*I-g*y)/P,T=M,E=O):(B=gEr(e),T=B.x+(~S[0].indexOf("%")?T/100*B.width:T),E=B.y+(~(S[1]||S[0]).indexOf("%")?E/100*B.height:E)),n||n!==!1&&o.smooth?(y=T-u,I=E-c,o.xOffset=d+(y*p+I*x)-y,o.yOffset=h+(y*g+I*v)-I):o.xOffset=o.yOffset=0,o.xOrigin=T,o.yOrigin=E,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!r,e.style[k3]="0px 0px",a&&(cw(a,o,"xOrigin",u,T),cw(a,o,"yOrigin",c,E),cw(a,o,"xOffset",d,o.xOffset),cw(a,o,"yOffset",h,o.yOffset)),e.setAttribute("data-svg-origin",T+" "+E)},zre=function(e,t){var r=e._gsap||new jSr(e);if("x"in r&&!t&&!r.uncache)return r;var n=e.style,s=r.scaleX<0,a="px",o="deg",l=getComputedStyle(e),u=pI(e,k3)||"0",c,d,h,p,g,x,v,y,I,S,T,E,B,P,M,O,k,V,U,z,Z,j,K,J,q,ie,ne,le,de,he,ge,ce;return c=d=h=x=v=y=I=S=T=0,p=g=1,r.svg=!!(e.getCTM&&mEr(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[u0]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[u0]!=="none"?l[u0]:"")),n.scale=n.rotate=n.translate="none"),P=Ert(e,r.svg),r.svg&&(r.uncache?(q=e.getBBox(),u=r.xOrigin-q.x+"px "+(r.yOrigin-q.y)+"px",J=""):J=!t&&e.getAttribute("data-svg-origin"),Trt(e,J||u,!!J||r.originIsAbsolute,r.smooth!==!1,P)),E=r.xOrigin||0,B=r.yOrigin||0,P!==Zre&&(V=P[0],U=P[1],z=P[2],Z=P[3],c=j=P[4],d=K=P[5],P.length===6?(p=Math.sqrt(V*V+U*U),g=Math.sqrt(Z*Z+z*z),x=V||U?OZ(U,V)*iO:0,I=z||Z?OZ(z,Z)*iO+x:0,I&&(g*=Math.abs(Math.cos(I*NZ))),r.svg&&(c-=E-(E*V+B*z),d-=B-(E*U+B*Z))):(ce=P[6],he=P[7],ne=P[8],le=P[9],de=P[10],ge=P[11],c=P[12],d=P[13],h=P[14],M=OZ(ce,de),v=M*iO,M&&(O=Math.cos(-M),k=Math.sin(-M),J=j*O+ne*k,q=K*O+le*k,ie=ce*O+de*k,ne=j*-k+ne*O,le=K*-k+le*O,de=ce*-k+de*O,ge=he*-k+ge*O,j=J,K=q,ce=ie),M=OZ(-z,de),y=M*iO,M&&(O=Math.cos(-M),k=Math.sin(-M),J=V*O-ne*k,q=U*O-le*k,ie=z*O-de*k,ge=Z*k+ge*O,V=J,U=q,z=ie),M=OZ(U,V),x=M*iO,M&&(O=Math.cos(M),k=Math.sin(M),J=V*O+U*k,q=j*O+K*k,U=U*O-V*k,K=K*O-j*k,V=J,j=q),v&&Math.abs(v)+Math.abs(x)>359.9&&(v=x=0,y=180-y),p=vg(Math.sqrt(V*V+U*U+z*z)),g=vg(Math.sqrt(K*K+ce*ce)),M=OZ(j,K),I=Math.abs(M)>2e-4?M*iO:0,T=ge?1/(ge<0?-ge:ge):0),r.svg&&(J=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!CEr(pI(e,u0)),J&&e.setAttribute("transform",J))),Math.abs(I)>90&&Math.abs(I)<270&&(s?(p*=-1,I+=x<=0?180:-180,x+=x<=0?180:-180):(g*=-1,I+=I<=0?180:-180)),t=t||r.uncache,r.x=c-((r.xPercent=c&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+a,r.y=d-((r.yPercent=d&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+a,r.z=h+a,r.scaleX=vg(p),r.scaleY=vg(g),r.rotation=vg(x)+o,r.rotationX=vg(v)+o,r.rotationY=vg(y)+o,r.skewX=I+o,r.skewY=S+o,r.transformPerspective=T+a,(r.zOrigin=parseFloat(u.split(" ")[2])||!t&&r.zOrigin||0)&&(n[k3]=rve(u)),r.xOffset=r.yOffset=0,r.force3D=cA.force3D,r.renderTransform=r.svg?c9n:dEr?bEr:u9n,r.uncache=0,r},rve=function(e){return(e=e.split(" "))[0]+" "+e[1]},Rrt=function(e,t,r){var n=Kx(t);return vg(parseFloat(t)+parseFloat(dw(e,"x",r+"px",n)))+n},u9n=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,bEr(e,t)},sO="0deg",Xre="0px",aO=") ",bEr=function(e,t){var r=t||this,n=r.xPercent,s=r.yPercent,a=r.x,o=r.y,l=r.z,u=r.rotation,c=r.rotationY,d=r.rotationX,h=r.skewX,p=r.skewY,g=r.scaleX,x=r.scaleY,v=r.transformPerspective,y=r.force3D,I=r.target,S=r.zOrigin,T="",E=y==="auto"&&e&&e!==1||y===!0;if(S&&(d!==sO||c!==sO)){var B=parseFloat(c)*NZ,P=Math.sin(B),M=Math.cos(B),O;B=parseFloat(d)*NZ,O=Math.cos(B),a=Rrt(I,a,P*O*-S),o=Rrt(I,o,-Math.sin(B)*-S),l=Rrt(I,l,M*O*-S+S)}v!==Xre&&(T+="perspective("+v+aO),(n||s)&&(T+="translate("+n+"%, "+s+"%) "),(E||a!==Xre||o!==Xre||l!==Xre)&&(T+=l!==Xre||E?"translate3d("+a+", "+o+", "+l+") ":"translate("+a+", "+o+aO),u!==sO&&(T+="rotate("+u+aO),c!==sO&&(T+="rotateY("+c+aO),d!==sO&&(T+="rotateX("+d+aO),(h!==sO||p!==sO)&&(T+="skew("+h+", "+p+aO),(g!==1||x!==1)&&(T+="scale("+g+", "+x+aO),I.style[u0]=T||"translate(0, 0)"},c9n=function(e,t){var r=t||this,n=r.xPercent,s=r.yPercent,a=r.x,o=r.y,l=r.rotation,u=r.skewX,c=r.skewY,d=r.scaleX,h=r.scaleY,p=r.target,g=r.xOrigin,x=r.yOrigin,v=r.xOffset,y=r.yOffset,I=r.forceCSS,S=parseFloat(a),T=parseFloat(o),E,B,P,M,O;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=NZ,u*=NZ,E=Math.cos(l)*d,B=Math.sin(l)*d,P=Math.sin(l-u)*-h,M=Math.cos(l-u)*h,u&&(c*=NZ,O=Math.tan(u-c),O=Math.sqrt(1+O*O),P*=O,M*=O,c&&(O=Math.tan(c),O=Math.sqrt(1+O*O),E*=O,B*=O)),E=vg(E),B=vg(B),P=vg(P),M=vg(M)):(E=d,M=h,B=P=0),(S&&!~(a+"").indexOf("px")||T&&!~(o+"").indexOf("px"))&&(S=dw(p,"x",a,"px"),T=dw(p,"y",o,"px")),(g||x||v||y)&&(S=vg(S+g-(g*E+x*P)+v),T=vg(T+x-(g*B+x*M)+y)),(n||s)&&(O=p.getBBox(),S=vg(S+n/100*O.width),T=vg(T+s/100*O.height)),O="matrix("+E+","+B+","+P+","+M+","+S+","+T+")",p.setAttribute("transform",O),I&&(p.style[u0]=O)},d9n=function(e,t,r,n,s){var a=360,o=Sm(s),l=parseFloat(s)*(o&&~s.indexOf("rad")?iO:1),u=l-n,c=n+u+"deg",d,h;return o&&(d=s.split("_")[1],d==="short"&&(u%=a,u!==u%(a/2)&&(u+=u<0?a:-a)),d==="cw"&&u<0?u=(u+a*aEr)%a-~~(u/a)*a:d==="ccw"&&u>0&&(u=(u-a*aEr)%a-~~(u/a)*a)),e._pt=h=new O3(e._pt,t,r,n,u,j5n),h.e=c,h.u="deg",e._props.push(r),h},IEr=function(e,t){for(var r in t)e[r]=t[r];return e},h9n=function(e,t,r){var n=IEr({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",a=r.style,o,l,u,c,d,h,p,g;n.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),a[u0]=t,o=zre(r,1),nO(r,u0),r.setAttribute("transform",u)):(u=getComputedStyle(r)[u0],a[u0]=t,o=zre(r,1),a[u0]=u);for(l in Z9)u=n[l],c=o[l],u!==c&&s.indexOf(l)<0&&(p=Kx(u),g=Kx(c),d=p!==g?dw(r,l,u,g):parseFloat(u),h=parseFloat(c),e._pt=new O3(e._pt,o,l,d,h-d,_rt),e._pt.u=g||0,e._props.push(l));IEr(o,n)};N3("padding,margin,Width,Radius",function(i,e){var t="Top",r="Right",n="Bottom",s="Left",a=(e<3?[t,r,n,s]:[t+s,t+r,n+r,n+s]).map(function(o){return e<2?i+o:"border"+o+i});tve[e>1?"border"+i:i]=function(o,l,u,c,d){var h,p;if(arguments.length<4)return h=a.map(function(g){return z9(o,g,u)}),p=h.join(" "),p.split(h[0]).length===5?h[0]:p;h=(c+"").split(" "),p={},a.forEach(function(g,x){return p[g]=h[x]=h[x]||h[(x-1)/2|0]}),o.init(l,p,d)}});var _Er={name:"css",register:Srt,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,s){var a=this._props,o=e.style,l=r.vars.startAt,u,c,d,h,p,g,x,v,y,I,S,T,E,B,P,M;Art||Srt(),this.styles=this.styles||cEr(e),M=this.styles.props,this.tween=r;for(x in t)if(x!=="autoRound"&&(c=t[x],!(hA[x]&&KSr(x,t,r,n,e,s)))){if(p=typeof c,g=tve[x],p==="function"&&(c=c.call(r,n,e,s),p=typeof c),p==="string"&&~c.indexOf("random(")&&(c=kre(c)),g)g(this,e,x,c,r)&&(P=1);else if(x.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(x)+"").trim(),c+="",ow.lastIndex=0,ow.test(u)||(v=Kx(u),y=Kx(c)),y?v!==y&&(u=dw(e,x,u,y)+y):v&&(c+=v),this.add(o,"setProperty",u,c,n,s,0,0,x),a.push(x),M.push(x,0,o[x]);else if(p!=="undefined"){if(l&&x in l?(u=typeof l[x]=="function"?l[x].call(r,n,e,s):l[x],Sm(u)&&~u.indexOf("random(")&&(u=kre(u)),Kx(u+"")||u==="auto"||(u+=cA.units[x]||Kx(z9(e,x))||""),(u+"").charAt(1)==="="&&(u=z9(e,x))):u=z9(e,x),h=parseFloat(u),I=p==="string"&&c.charAt(1)==="="&&c.substr(0,2),I&&(c=c.substr(2)),d=parseFloat(c),x in B4&&(x==="autoAlpha"&&(h===1&&z9(e,"visibility")==="hidden"&&d&&(h=0),M.push("visibility",0,o.visibility),cw(this,o,"visibility",h?"inherit":"hidden",d?"inherit":"hidden",!d)),x!=="scale"&&x!=="transform"&&(x=B4[x],~x.indexOf(",")&&(x=x.split(",")[0]))),S=x in Z9,S){if(this.styles.save(x),p==="string"&&c.substring(0,6)==="var(--"&&(c=pI(e,c.substring(4,c.indexOf(")"))),d=parseFloat(c)),T||(E=e._gsap,E.renderTransform&&!t.parseTransform||zre(e,t.parseTransform),B=t.smoothOrigin!==!1&&E.smooth,T=this._pt=new O3(this._pt,o,u0,0,1,E.renderTransform,E,0,-1),T.dep=1),x==="scale")this._pt=new O3(this._pt,E,"scaleY",E.scaleY,(I?TZ(E.scaleY,I+d):d)-E.scaleY||0,_rt),this._pt.u=0,a.push("scaleY",x),x+="X";else if(x==="transformOrigin"){M.push(k3,0,o[k3]),c=o9n(c),E.svg?Trt(e,c,0,B,0,this):(y=parseFloat(c.split(" ")[2])||0,y!==E.zOrigin&&cw(this,E,"zOrigin",E.zOrigin,y),cw(this,o,x,rve(u),rve(c)));continue}else if(x==="svgOrigin"){Trt(e,c,1,B,0,this);continue}else if(x in yEr){d9n(this,E,x,h,I?TZ(h,I+c):c);continue}else if(x==="smoothOrigin"){cw(this,E,"smooth",E.smooth,c);continue}else if(x==="force3D"){E[x]=c;continue}else if(x==="transform"){h9n(this,c,e);continue}}else x in o||(x=LZ(x)||x);if(S||(d||d===0)&&(h||h===0)&&!Y5n.test(c)&&x in o)v=(u+"").substr((h+"").length),d||(d=0),y=Kx(c)||(x in cA.units?cA.units[x]:v),v!==y&&(h=dw(e,x,u,y)),this._pt=new O3(this._pt,S?E:o,x,h,(I?TZ(h,I+d):d)-h,!S&&(y==="px"||x==="zIndex")&&t.autoRound!==!1?Q5n:_rt),this._pt.u=y||0,v!==y&&y!=="%"&&(this._pt.b=u,this._pt.r=K5n);else if(x in o)a9n.call(this,e,x,u,I?I+c:c);else if(x in e)this.add(e,x,u||e[x],I?I+c:c,n,s);else if(x!=="parseTransform"){Jtt(x,c);continue}S||(x in o?M.push(x,0,o[x]):typeof e[x]=="function"?M.push(x,2,e[x]()):M.push(x,1,u||e[x])),a.push(x)}}P&&tEr(this)},render:function(e,t){if(t.tween._time||!brt())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:z9,aliases:B4,getSetter:function(e,t,r){var n=B4[t];return n&&n.indexOf(",")<0&&(t=n),t in Z9&&t!==k3&&(e._gsap.x||z9(e,"x"))?r&&sEr===r?t==="scale"?e9n:$5n:(sEr=r||{})&&(t==="scale"?t9n:r9n):e.style&&!ztt(e.style[t])?J5n:~t.indexOf("-")?q5n:mrt(e,t)},core:{_removeProperty:nO,_getMatrix:Ert}};L3.utils.checkPrefix=LZ,L3.core.getStyleSaver=cEr,(function(i,e,t,r){var n=N3(i+","+e+","+t,function(s){Z9[s]=1});N3(e,function(s){cA.units[s]="deg",yEr[s]=1}),B4[n[13]]=i+","+e,N3(r,function(s){var a=s.split(":");B4[a[1]]=n[a[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),N3("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){cA.units[i]="px"}),L3.registerPlugin(_Er);var yc=L3.registerPlugin(_Er)||L3;yc.core.Tween;const wrt="155",kZ={ROTATE:0,DOLLY:1,PAN:2},GZ={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},f9n=0,DEr=1,p9n=2,SEr=1,g9n=2,X9=3,zD=0,fy=1,Z0=2,Y9=0,VZ=1,Em=2,EEr=3,TEr=4,m9n=5,WZ=100,x9n=101,v9n=102,REr=103,wEr=104,y9n=200,C9n=201,A9n=202,b9n=203,FEr=204,BEr=205,I9n=206,_9n=207,D9n=208,S9n=209,E9n=210,T9n=0,R9n=1,w9n=2,Frt=3,F9n=4,B9n=5,P9n=6,M9n=7,PEr=0,N9n=1,O9n=2,j9=0,L9n=1,k9n=2,G9n=3,V9n=4,W9n=5,MEr=300,UZ=301,HZ=302,Brt=303,Prt=304,ive=306,G3=1e3,gI=1001,nve=1002,w1=1003,Mrt=1004,sve=1005,V3=1006,NEr=1007,oO=1008,hw=1009,U9n=1010,H9n=1011,Nrt=1012,OEr=1013,fw=1014,P4=1015,M4=1016,LEr=1017,kEr=1018,lO=1020,Z9n=1021,mI=1023,GEr=1024,z9n=1025,uO=1026,ZZ=1027,VEr=1028,WEr=1029,X9n=1030,UEr=1031,HEr=1033,Ort=33776,Lrt=33777,krt=33778,Grt=33779,ZEr=35840,zEr=35841,XEr=35842,YEr=35843,Y9n=36196,jEr=37492,KEr=37496,QEr=37808,JEr=37809,qEr=37810,$Er=37811,e4r=37812,t4r=37813,r4r=37814,i4r=37815,n4r=37816,s4r=37817,a4r=37818,o4r=37819,l4r=37820,u4r=37821,Vrt=36492,j9n=36283,c4r=36284,d4r=36285,h4r=36286,Yre=2300,zZ=2301,Wrt=2302,f4r=2400,p4r=2401,g4r=2402,K9n=2500,Q9n=0,m4r=1,Urt=2,x4r=3e3,K9=3001,J9n=3200,q9n=3201,v4r=0,$9n=1,cO="",Vl="srgb",N4="srgb-linear",y4r="display-p3",Hrt=7680,eTn=519,tTn=512,rTn=513,iTn=514,nTn=515,sTn=516,aTn=517,oTn=518,lTn=519,Zrt=35044,C4r="300 es",zrt=1035,Q9=2e3,ave=2001;class dO{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(t)===-1&&r[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const n=r.slice(0);for(let s=0,a=n.length;s<a;s++)n[s].call(this,e);e.target=null}}}const Qx=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let A4r=1234567;const jre=Math.PI/180,XZ=180/Math.PI;function xI(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(Qx[i&255]+Qx[i>>8&255]+Qx[i>>16&255]+Qx[i>>24&255]+"-"+Qx[e&255]+Qx[e>>8&255]+"-"+Qx[e>>16&15|64]+Qx[e>>24&255]+"-"+Qx[t&63|128]+Qx[t>>8&255]+"-"+Qx[t>>16&255]+Qx[t>>24&255]+Qx[r&255]+Qx[r>>8&255]+Qx[r>>16&255]+Qx[r>>24&255]).toLowerCase()}function Kg(i,e,t){return Math.max(e,Math.min(t,i))}function Xrt(i,e){return(i%e+e)%e}function uTn(i,e,t,r,n){return r+(i-e)*(n-r)/(t-e)}function cTn(i,e,t){return i!==e?(t-i)/(e-i):0}function Kre(i,e,t){return(1-t)*i+t*e}function dTn(i,e,t,r){return Kre(i,e,1-Math.exp(-t*r))}function hTn(i,e=1){return e-Math.abs(Xrt(i,e*2)-e)}function fTn(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function pTn(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function gTn(i,e){return i+Math.floor(Math.random()*(e-i+1))}function mTn(i,e){return i+Math.random()*(e-i)}function xTn(i){return i*(.5-Math.random())}function vTn(i){i!==void 0&&(A4r=i);let e=A4r+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function yTn(i){return i*jre}function CTn(i){return i*XZ}function Yrt(i){return(i&i-1)===0&&i!==0}function b4r(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function ove(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function ATn(i,e,t,r,n){const s=Math.cos,a=Math.sin,o=s(t/2),l=a(t/2),u=s((e+r)/2),c=a((e+r)/2),d=s((e-r)/2),h=a((e-r)/2),p=s((r-e)/2),g=a((r-e)/2);switch(n){case"XYX":i.set(o*c,l*d,l*h,o*u);break;case"YZY":i.set(l*h,o*c,l*d,o*u);break;case"ZXZ":i.set(l*d,l*h,o*c,o*u);break;case"XZX":i.set(o*c,l*g,l*p,o*u);break;case"YXY":i.set(l*p,o*c,l*g,o*u);break;case"ZYZ":i.set(l*g,l*p,o*c,o*u);break;default:}}function O4(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Wh(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const py={DEG2RAD:jre,RAD2DEG:XZ,generateUUID:xI,clamp:Kg,euclideanModulo:Xrt,mapLinear:uTn,inverseLerp:cTn,lerp:Kre,damp:dTn,pingpong:hTn,smoothstep:fTn,smootherstep:pTn,randInt:gTn,randFloat:mTn,randFloatSpread:xTn,seededRandom:vTn,degToRad:yTn,radToDeg:CTn,isPowerOfTwo:Yrt,ceilPowerOfTwo:b4r,floorPowerOfTwo:ove,setQuaternionFromProperEuler:ATn,normalize:Wh,denormalize:O4};class En{constructor(e=0,t=0){En.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(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(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,r=this.y,n=e.elements;return this.x=n[0]*t+n[3]*r+n[6],this.y=n[1]*t+n[4]*r+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(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(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(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(Kg(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y;return t*t+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const r=Math.cos(t),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*r-a*n+e.x,this.y=s*n+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class cc{constructor(e,t,r,n,s,a,o,l,u){cc.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,r,n,s,a,o,l,u)}set(e,t,r,n,s,a,o,l,u){const c=this.elements;return c[0]=e,c[1]=n,c[2]=o,c[3]=t,c[4]=s,c[5]=l,c[6]=r,c[7]=a,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this}extractBasis(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,n=t.elements,s=this.elements,a=r[0],o=r[3],l=r[6],u=r[1],c=r[4],d=r[7],h=r[2],p=r[5],g=r[8],x=n[0],v=n[3],y=n[6],I=n[1],S=n[4],T=n[7],E=n[2],B=n[5],P=n[8];return s[0]=a*x+o*I+l*E,s[3]=a*v+o*S+l*B,s[6]=a*y+o*T+l*P,s[1]=u*x+c*I+d*E,s[4]=u*v+c*S+d*B,s[7]=u*y+c*T+d*P,s[2]=h*x+p*I+g*E,s[5]=h*v+p*S+g*B,s[8]=h*y+p*T+g*P,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8];return t*a*c-t*o*u-r*s*c+r*o*l+n*s*u-n*a*l}invert(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],d=c*a-o*u,h=o*l-c*s,p=u*s-a*l,g=t*d+r*h+n*p;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/g;return e[0]=d*x,e[1]=(n*u-c*r)*x,e[2]=(o*r-n*a)*x,e[3]=h*x,e[4]=(c*t-n*l)*x,e[5]=(n*s-o*t)*x,e[6]=p*x,e[7]=(r*l-u*t)*x,e[8]=(a*t-r*s)*x,this}transpose(){let e;const 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(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const 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(e,t,r,n,s,a,o){const l=Math.cos(s),u=Math.sin(s);return this.set(r*l,r*u,-r*(l*a+u*o)+a+e,-n*u,n*l,-n*(-u*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(jrt.makeScale(e,t)),this}rotate(e){return this.premultiply(jrt.makeRotation(-e)),this}translate(e,t){return this.premultiply(jrt.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,r,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,r=e.elements;for(let n=0;n<9;n++)if(t[n]!==r[n])return!1;return!0}fromArray(e,t=0){for(let r=0;r<9;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const jrt=new cc;function I4r(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function Qre(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}const _4r={};function Jre(i){i in _4r||(_4r[i]=!0)}function YZ(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Krt(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}const bTn=new cc().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),ITn=new cc().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function _Tn(i){return i.convertSRGBToLinear().applyMatrix3(ITn)}function DTn(i){return i.applyMatrix3(bTn).convertLinearToSRGB()}const STn={[N4]:i=>i,[Vl]:i=>i.convertSRGBToLinear(),[y4r]:_Tn},ETn={[N4]:i=>i,[Vl]:i=>i.convertLinearToSRGB(),[y4r]:DTn},XD={enabled:!0,get legacyMode(){return!this.enabled},set legacyMode(i){this.enabled=!i},get workingColorSpace(){return N4},set workingColorSpace(i){},convert:function(i,e,t){if(this.enabled===!1||e===t||!e||!t)return i;const r=STn[e],n=ETn[t];if(r===void 0||n===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return n(r(i))},fromWorkingColorSpace:function(i,e){return this.convert(i,this.workingColorSpace,e)},toWorkingColorSpace:function(i,e){return this.convert(i,e,this.workingColorSpace)}};let jZ;class D4r{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{jZ===void 0&&(jZ=Qre("canvas")),jZ.width=e.width,jZ.height=e.height;const r=jZ.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),t=jZ}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Qre("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const n=r.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a<s.length;a++)s[a]=YZ(s[a]/255)*255;return r.putImageData(n,0,0),t}else if(e.data){const t=e.data.slice(0);for(let r=0;r<t.length;r++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[r]=Math.floor(YZ(t[r]/255)*255):t[r]=YZ(t[r]);return{data:t,width:e.width,height:e.height}}else return e}}let TTn=0;class S4r{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:TTn++}),this.uuid=xI(),this.data=e,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const r={uuid:this.uuid,url:""},n=this.data;if(n!==null){let s;if(Array.isArray(n)){s=[];for(let a=0,o=n.length;a<o;a++)n[a].isDataTexture?s.push(Qrt(n[a].image)):s.push(Qrt(n[a]))}else s=Qrt(n);r.url=s}return t||(e.images[this.uuid]=r),r}}function Qrt(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?D4r.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:{}}let RTn=0;class Tm extends dO{constructor(e=Tm.DEFAULT_IMAGE,t=Tm.DEFAULT_MAPPING,r=gI,n=gI,s=V3,a=oO,o=mI,l=hw,u=Tm.DEFAULT_ANISOTROPY,c=cO){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:RTn++}),this.uuid=xI(),this.name="",this.source=new S4r(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=r,this.wrapT=n,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new En(0,0),this.repeat=new En(1,1),this.center=new En(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new cc,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof c=="string"?this.colorSpace=c:(Jre("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===K9?Vl:cO),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,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.internalFormat=e.internalFormat,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.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),t||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==MEr)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case G3:e.x=e.x-Math.floor(e.x);break;case gI:e.x=e.x<0?0:1;break;case nve:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case G3:e.y=e.y-Math.floor(e.y);break;case gI:e.y=e.y<0?0:1;break;case nve:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Jre("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Vl?K9:x4r}set encoding(e){Jre("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===K9?Vl:cO}}Tm.DEFAULT_IMAGE=null,Tm.DEFAULT_MAPPING=MEr,Tm.DEFAULT_ANISOTROPY=1;class md{constructor(e=0,t=0,r=0,n=1){md.prototype.isVector4=!0,this.x=e,this.y=t,this.z=r,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,r,n){return this.x=e,this.y=t,this.z=r,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(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(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(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(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}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,r=this.y,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*r+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*r+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*r+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*r+a[11]*n+a[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const 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(e){let t,r,n,s;const l=e.elements,u=l[0],c=l[4],d=l[8],h=l[1],p=l[5],g=l[9],x=l[2],v=l[6],y=l[10];if(Math.abs(c-h)<.01&&Math.abs(d-x)<.01&&Math.abs(g-v)<.01){if(Math.abs(c+h)<.1&&Math.abs(d+x)<.1&&Math.abs(g+v)<.1&&Math.abs(u+p+y-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(u+1)/2,T=(p+1)/2,E=(y+1)/2,B=(c+h)/4,P=(d+x)/4,M=(g+v)/4;return S>T&&S>E?S<.01?(r=0,n=.707106781,s=.707106781):(r=Math.sqrt(S),n=B/r,s=P/r):T>E?T<.01?(r=.707106781,n=0,s=.707106781):(n=Math.sqrt(T),r=B/n,s=M/n):E<.01?(r=.707106781,n=.707106781,s=0):(s=Math.sqrt(E),r=P/s,n=M/s),this.set(r,n,s,t),this}let I=Math.sqrt((v-g)*(v-g)+(d-x)*(d-x)+(h-c)*(h-c));return Math.abs(I)<.001&&(I=1),this.x=(v-g)/I,this.y=(d-x)/I,this.z=(h-c)/I,this.w=Math.acos((u+p+y-1)/2),this}min(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(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(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(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.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class wTn extends dO{constructor(e=1,t=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new md(0,0,e,t),this.scissorTest=!1,this.viewport=new md(0,0,e,t);const n={width:e,height:t,depth:1};r.encoding!==void 0&&(Jre("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===K9?Vl:cO),this.texture=new Tm(n,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.internalFormat=r.internalFormat!==void 0?r.internalFormat:null,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:V3,this.depthBuffer=r.depthBuffer!==void 0?r.depthBuffer:!0,this.stencilBuffer=r.stencilBuffer!==void 0?r.stencilBuffer:!1,this.depthTexture=r.depthTexture!==void 0?r.depthTexture:null,this.samples=r.samples!==void 0?r.samples:0}setSize(e,t,r=1){(this.width!==e||this.height!==t||this.depth!==r)&&(this.width=e,this.height=t,this.depth=r,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new S4r(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class vI extends wTn{constructor(e=1,t=1,r={}){super(e,t,r),this.isWebGLRenderTarget=!0}}class E4r extends Tm{constructor(e=null,t=1,r=1,n=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:r,depth:n},this.magFilter=w1,this.minFilter=w1,this.wrapR=gI,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class FTn extends Tm{constructor(e=null,t=1,r=1,n=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:r,depth:n},this.magFilter=w1,this.minFilter=w1,this.wrapR=gI,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class yI{constructor(e=0,t=0,r=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=r,this._w=n}static slerpFlat(e,t,r,n,s,a,o){let l=r[n+0],u=r[n+1],c=r[n+2],d=r[n+3];const h=s[a+0],p=s[a+1],g=s[a+2],x=s[a+3];if(o===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d;return}if(o===1){e[t+0]=h,e[t+1]=p,e[t+2]=g,e[t+3]=x;return}if(d!==x||l!==h||u!==p||c!==g){let v=1-o;const y=l*h+u*p+c*g+d*x,I=y>=0?1:-1,S=1-y*y;if(S>Number.EPSILON){const E=Math.sqrt(S),B=Math.atan2(E,y*I);v=Math.sin(v*B)/E,o=Math.sin(o*B)/E}const T=o*I;if(l=l*v+h*T,u=u*v+p*T,c=c*v+g*T,d=d*v+x*T,v===1-o){const E=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=E,u*=E,c*=E,d*=E}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,r,n,s,a){const o=r[n],l=r[n+1],u=r[n+2],c=r[n+3],d=s[a],h=s[a+1],p=s[a+2],g=s[a+3];return e[t]=o*g+c*d+l*p-u*h,e[t+1]=l*g+c*h+u*d-o*p,e[t+2]=u*g+c*p+o*h-l*d,e[t+3]=c*g-o*d-l*h-u*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const r=e._x,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,u=o(r/2),c=o(n/2),d=o(s/2),h=l(r/2),p=l(n/2),g=l(s/2);switch(a){case"XYZ":this._x=h*c*d+u*p*g,this._y=u*p*d-h*c*g,this._z=u*c*g+h*p*d,this._w=u*c*d-h*p*g;break;case"YXZ":this._x=h*c*d+u*p*g,this._y=u*p*d-h*c*g,this._z=u*c*g-h*p*d,this._w=u*c*d+h*p*g;break;case"ZXY":this._x=h*c*d-u*p*g,this._y=u*p*d+h*c*g,this._z=u*c*g+h*p*d,this._w=u*c*d-h*p*g;break;case"ZYX":this._x=h*c*d-u*p*g,this._y=u*p*d+h*c*g,this._z=u*c*g-h*p*d,this._w=u*c*d+h*p*g;break;case"YZX":this._x=h*c*d+u*p*g,this._y=u*p*d+h*c*g,this._z=u*c*g-h*p*d,this._w=u*c*d-h*p*g;break;case"XZY":this._x=h*c*d-u*p*g,this._y=u*p*d-h*c*g,this._z=u*c*g+h*p*d,this._w=u*c*d+h*p*g;break;default:}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const r=t/2,n=Math.sin(r);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,r=t[0],n=t[4],s=t[8],a=t[1],o=t[5],l=t[9],u=t[2],c=t[6],d=t[10],h=r+o+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(c-l)*p,this._y=(s-u)*p,this._z=(a-n)*p}else if(r>o&&r>d){const p=2*Math.sqrt(1+r-o-d);this._w=(c-l)/p,this._x=.25*p,this._y=(n+a)/p,this._z=(s+u)/p}else if(o>d){const p=2*Math.sqrt(1+o-r-d);this._w=(s-u)/p,this._x=(n+a)/p,this._y=.25*p,this._z=(l+c)/p}else{const p=2*Math.sqrt(1+d-r-o);this._w=(a-n)/p,this._x=(s+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let r=e.dot(t)+1;return r<Number.EPSILON?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(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=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Kg(this.dot(e),-1,1)))}rotateTowards(e,t){const r=this.angleTo(e);if(r===0)return this;const n=Math.min(1,t/r);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(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(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const r=e._x,n=e._y,s=e._z,a=e._w,o=t._x,l=t._y,u=t._z,c=t._w;return this._x=r*c+a*o+n*u-s*l,this._y=n*c+a*l+s*o-r*u,this._z=s*c+a*u+r*l-n*o,this._w=a*c-r*o-n*l-s*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const r=this._x,n=this._y,s=this._z,a=this._w;let o=a*e._w+r*e._x+n*e._y+s*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=r,this._y=n,this._z=s,this;const l=1-o*o;if(l<=Number.EPSILON){const p=1-t;return this._w=p*a+t*this._w,this._x=p*r+t*this._x,this._y=p*n+t*this._y,this._z=p*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),c=Math.atan2(u,o),d=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=a*d+this._w*h,this._x=r*d+this._x*h,this._y=n*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,r){return this.copy(e).slerp(t,r)}random(){const e=Math.random(),t=Math.sqrt(1-e),r=Math.sqrt(e),n=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(n),r*Math.sin(s),r*Math.cos(s),t*Math.sin(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class er{constructor(e=0,t=0,r=0){er.prototype.isVector3=!0,this.x=e,this.y=t,this.z=r}set(e,t,r){return r===void 0&&(r=this.z),this.x=e,this.y=t,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(T4r.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(T4r.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,r=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6]*n,this.y=s[1]*t+s[4]*r+s[7]*n,this.z=s[2]*t+s[5]*r+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,r=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*r+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*r+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*r+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*r+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,r=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,u=l*t+a*n-o*r,c=l*r+o*t-s*n,d=l*n+s*r-a*t,h=-s*t-a*r-o*n;return this.x=u*l+h*-s+c*-o-d*-a,this.y=c*l+h*-a+d*-s-u*-o,this.z=d*l+h*-o+u*-a-c*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,r=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*n,this.y=s[1]*t+s[5]*r+s[9]*n,this.z=s[2]*t+s[6]*r+s[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(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(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(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(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(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const r=e.x,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-r*l,this.z=r*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Jrt.copy(this).projectOnVector(e),this.sub(Jrt)}reflect(e){return this.sub(Jrt.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(Kg(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return t*t+r*r+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,r){const n=Math.sin(t)*e;return this.x=n*Math.sin(r),this.y=Math.cos(t)*e,this.z=n*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,r){return this.x=e*Math.sin(t),this.y=r,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(t),this.y=r*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Jrt=new er,T4r=new yI;class c0{constructor(e=new er(1/0,1/0,1/0),t=new er(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t+=3)this.expandByPoint(q9.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,r=e.count;t<r;t++)this.expandByPoint(q9.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const r=q9.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){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(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){if(e.updateWorldMatrix(!1,!1),e.boundingBox!==void 0)e.boundingBox===null&&e.computeBoundingBox(),KZ.copy(e.boundingBox),KZ.applyMatrix4(e.matrixWorld),this.union(KZ);else{const n=e.geometry;if(n!==void 0)if(t&&n.attributes!==void 0&&n.attributes.position!==void 0){const s=n.attributes.position;for(let a=0,o=s.count;a<o;a++)q9.fromBufferAttribute(s,a).applyMatrix4(e.matrixWorld),this.expandByPoint(q9)}else n.boundingBox===null&&n.computeBoundingBox(),KZ.copy(n.boundingBox),KZ.applyMatrix4(e.matrixWorld),this.union(KZ)}const r=e.children;for(let n=0,s=r.length;n<s;n++)this.expandByObject(r[n],t);return this}containsPoint(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(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(e,t){return 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(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(e){return this.clampPoint(e.center,q9),q9.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(qre),lve.subVectors(this.max,qre),QZ.subVectors(e.a,qre),JZ.subVectors(e.b,qre),qZ.subVectors(e.c,qre),pw.subVectors(JZ,QZ),gw.subVectors(qZ,JZ),hO.subVectors(QZ,qZ);let t=[0,-pw.z,pw.y,0,-gw.z,gw.y,0,-hO.z,hO.y,pw.z,0,-pw.x,gw.z,0,-gw.x,hO.z,0,-hO.x,-pw.y,pw.x,0,-gw.y,gw.x,0,-hO.y,hO.x,0];return!qrt(t,QZ,JZ,qZ,lve)||(t=[1,0,0,0,1,0,0,0,1],!qrt(t,QZ,JZ,qZ,lve))?!1:(uve.crossVectors(pw,gw),t=[uve.x,uve.y,uve.z],qrt(t,QZ,JZ,qZ,lve))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,q9).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(q9).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(J9[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),J9[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),J9[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),J9[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),J9[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),J9[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),J9[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),J9[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(J9),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const J9=[new er,new er,new er,new er,new er,new er,new er,new er],q9=new er,KZ=new c0,QZ=new er,JZ=new er,qZ=new er,pw=new er,gw=new er,hO=new er,qre=new er,lve=new er,uve=new er,fO=new er;function qrt(i,e,t,r,n){for(let s=0,a=i.length-3;s<=a;s+=3){fO.fromArray(i,s);const o=n.x*Math.abs(fO.x)+n.y*Math.abs(fO.y)+n.z*Math.abs(fO.z),l=e.dot(fO),u=t.dot(fO),c=r.dot(fO);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>o)return!1}return!0}const BTn=new c0,$re=new er,$rt=new er;class W3{constructor(e=new er,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const r=this.center;t!==void 0?r.copy(t):BTn.setFromPoints(e).getCenter(r);let n=0;for(let s=0,a=e.length;s<a;s++)n=Math.max(n,r.distanceToSquared(e[s]));return this.radius=Math.sqrt(n),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const r=this.center.distanceToSquared(e);return t.copy(e),r>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;$re.subVectors(e,this.center);const t=$re.lengthSq();if(t>this.radius*this.radius){const r=Math.sqrt(t),n=(r-this.radius)*.5;this.center.addScaledVector($re,n/r),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):($rt.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint($re.copy(e.center).add($rt)),this.expandByPoint($re.copy(e.center).sub($rt))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const $9=new er,eit=new er,cve=new er,mw=new er,tit=new er,dve=new er,rit=new er;class xw{constructor(e=new er,t=new er(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,$9)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=$9.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):($9.copy(this.origin).addScaledVector(this.direction,t),$9.distanceToSquared(e))}distanceSqToSegment(e,t,r,n){eit.copy(e).add(t).multiplyScalar(.5),cve.copy(t).sub(e).normalize(),mw.copy(this.origin).sub(eit);const s=e.distanceTo(t)*.5,a=-this.direction.dot(cve),o=mw.dot(this.direction),l=-mw.dot(cve),u=mw.lengthSq(),c=Math.abs(1-a*a);let d,h,p,g;if(c>0)if(d=a*l-o,h=a*o-l,g=s*c,d>=0)if(h>=-g)if(h<=g){const x=1/c;d*=x,h*=x,p=d*(d+a*h+2*o)+h*(a*d+h+2*l)+u}else h=s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;else h=-s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;else h<=-g?(d=Math.max(0,-(-a*s+o)),h=d>0?-s:Math.min(Math.max(-s,-l),s),p=-d*d+h*(h+2*l)+u):h<=g?(d=0,h=Math.min(Math.max(-s,-l),s),p=h*(h+2*l)+u):(d=Math.max(0,-(a*s+o)),h=d>0?s:Math.min(Math.max(-s,-l),s),p=-d*d+h*(h+2*l)+u);else h=a>0?-s:s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;return r&&r.copy(this.origin).addScaledVector(this.direction,d),n&&n.copy(eit).addScaledVector(cve,h),p}intersectSphere(e,t){$9.subVectors(e.center,this.origin);const r=$9.dot(this.direction),n=$9.dot($9)-r*r,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),o=r-a,l=r+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null}intersectPlane(e,t){const r=this.distanceToPlane(e);return r===null?null:this.at(r,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let r,n,s,a,o,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,h=this.origin;return u>=0?(r=(e.min.x-h.x)*u,n=(e.max.x-h.x)*u):(r=(e.max.x-h.x)*u,n=(e.min.x-h.x)*u),c>=0?(s=(e.min.y-h.y)*c,a=(e.max.y-h.y)*c):(s=(e.max.y-h.y)*c,a=(e.min.y-h.y)*c),r>a||s>n||((s>r||isNaN(r))&&(r=s),(a<n||isNaN(n))&&(n=a),d>=0?(o=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(o=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),r>l||o>n)||((o>r||r!==r)&&(r=o),(l<n||n!==n)&&(n=l),n<0)?null:this.at(r>=0?r:n,t)}intersectsBox(e){return this.intersectBox(e,$9)!==null}intersectTriangle(e,t,r,n,s){tit.subVectors(t,e),dve.subVectors(r,e),rit.crossVectors(tit,dve);let a=this.direction.dot(rit),o;if(a>0){if(n)return null;o=1}else if(a<0)o=-1,a=-a;else return null;mw.subVectors(this.origin,e);const l=o*this.direction.dot(dve.crossVectors(mw,dve));if(l<0)return null;const u=o*this.direction.dot(tit.cross(mw));if(u<0||l+u>a)return null;const c=-o*mw.dot(rit);return c<0?null:this.at(c/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class vo{constructor(e,t,r,n,s,a,o,l,u,c,d,h,p,g,x,v){vo.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,r,n,s,a,o,l,u,c,d,h,p,g,x,v)}set(e,t,r,n,s,a,o,l,u,c,d,h,p,g,x,v){const y=this.elements;return y[0]=e,y[4]=t,y[8]=r,y[12]=n,y[1]=s,y[5]=a,y[9]=o,y[13]=l,y[2]=u,y[6]=c,y[10]=d,y[14]=h,y[3]=p,y[7]=g,y[11]=x,y[15]=v,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new vo().fromArray(this.elements)}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this}copyPosition(e){const t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,r){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,r=e.elements,n=1/$Z.setFromMatrixColumn(e,0).length(),s=1/$Z.setFromMatrixColumn(e,1).length(),a=1/$Z.setFromMatrixColumn(e,2).length();return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=0,t[4]=r[4]*s,t[5]=r[5]*s,t[6]=r[6]*s,t[7]=0,t[8]=r[8]*a,t[9]=r[9]*a,t[10]=r[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,r=e.x,n=e.y,s=e.z,a=Math.cos(r),o=Math.sin(r),l=Math.cos(n),u=Math.sin(n),c=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const h=a*c,p=a*d,g=o*c,x=o*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=p+g*u,t[5]=h-x*u,t[9]=-o*l,t[2]=x-h*u,t[6]=g+p*u,t[10]=a*l}else if(e.order==="YXZ"){const h=l*c,p=l*d,g=u*c,x=u*d;t[0]=h+x*o,t[4]=g*o-p,t[8]=a*u,t[1]=a*d,t[5]=a*c,t[9]=-o,t[2]=p*o-g,t[6]=x+h*o,t[10]=a*l}else if(e.order==="ZXY"){const h=l*c,p=l*d,g=u*c,x=u*d;t[0]=h-x*o,t[4]=-a*d,t[8]=g+p*o,t[1]=p+g*o,t[5]=a*c,t[9]=x-h*o,t[2]=-a*u,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const h=a*c,p=a*d,g=o*c,x=o*d;t[0]=l*c,t[4]=g*u-p,t[8]=h*u+x,t[1]=l*d,t[5]=x*u+h,t[9]=p*u-g,t[2]=-u,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const h=a*l,p=a*u,g=o*l,x=o*u;t[0]=l*c,t[4]=x-h*d,t[8]=g*d+p,t[1]=d,t[5]=a*c,t[9]=-o*c,t[2]=-u*c,t[6]=p*d+g,t[10]=h-x*d}else if(e.order==="XZY"){const h=a*l,p=a*u,g=o*l,x=o*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=h*d+x,t[5]=a*c,t[9]=p*d-g,t[2]=g*d-p,t[6]=o*c,t[10]=x*d+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(PTn,e,MTn)}lookAt(e,t,r){const n=this.elements;return mA.subVectors(e,t),mA.lengthSq()===0&&(mA.z=1),mA.normalize(),vw.crossVectors(r,mA),vw.lengthSq()===0&&(Math.abs(r.z)===1?mA.x+=1e-4:mA.z+=1e-4,mA.normalize(),vw.crossVectors(r,mA)),vw.normalize(),hve.crossVectors(mA,vw),n[0]=vw.x,n[4]=hve.x,n[8]=mA.x,n[1]=vw.y,n[5]=hve.y,n[9]=mA.y,n[2]=vw.z,n[6]=hve.z,n[10]=mA.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,n=t.elements,s=this.elements,a=r[0],o=r[4],l=r[8],u=r[12],c=r[1],d=r[5],h=r[9],p=r[13],g=r[2],x=r[6],v=r[10],y=r[14],I=r[3],S=r[7],T=r[11],E=r[15],B=n[0],P=n[4],M=n[8],O=n[12],k=n[1],V=n[5],U=n[9],z=n[13],Z=n[2],j=n[6],K=n[10],J=n[14],q=n[3],ie=n[7],ne=n[11],le=n[15];return s[0]=a*B+o*k+l*Z+u*q,s[4]=a*P+o*V+l*j+u*ie,s[8]=a*M+o*U+l*K+u*ne,s[12]=a*O+o*z+l*J+u*le,s[1]=c*B+d*k+h*Z+p*q,s[5]=c*P+d*V+h*j+p*ie,s[9]=c*M+d*U+h*K+p*ne,s[13]=c*O+d*z+h*J+p*le,s[2]=g*B+x*k+v*Z+y*q,s[6]=g*P+x*V+v*j+y*ie,s[10]=g*M+x*U+v*K+y*ne,s[14]=g*O+x*z+v*J+y*le,s[3]=I*B+S*k+T*Z+E*q,s[7]=I*P+S*V+T*j+E*ie,s[11]=I*M+S*U+T*K+E*ne,s[15]=I*O+S*z+T*J+E*le,this}multiplyScalar(e){const 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}determinant(){const e=this.elements,t=e[0],r=e[4],n=e[8],s=e[12],a=e[1],o=e[5],l=e[9],u=e[13],c=e[2],d=e[6],h=e[10],p=e[14],g=e[3],x=e[7],v=e[11],y=e[15];return g*(+s*l*d-n*u*d-s*o*h+r*u*h+n*o*p-r*l*p)+x*(+t*l*p-t*u*h+s*a*h-n*a*p+n*u*c-s*l*c)+v*(+t*u*d-t*o*p-s*a*d+r*a*p+s*o*c-r*u*c)+y*(-n*o*c-t*l*d+t*o*h+n*a*d-r*a*h+r*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,r){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=r),this}invert(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],p=e[11],g=e[12],x=e[13],v=e[14],y=e[15],I=d*v*u-x*h*u+x*l*p-o*v*p-d*l*y+o*h*y,S=g*h*u-c*v*u-g*l*p+a*v*p+c*l*y-a*h*y,T=c*x*u-g*d*u+g*o*p-a*x*p-c*o*y+a*d*y,E=g*d*l-c*x*l-g*o*h+a*x*h+c*o*v-a*d*v,B=t*I+r*S+n*T+s*E;if(B===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/B;return e[0]=I*P,e[1]=(x*h*s-d*v*s-x*n*p+r*v*p+d*n*y-r*h*y)*P,e[2]=(o*v*s-x*l*s+x*n*u-r*v*u-o*n*y+r*l*y)*P,e[3]=(d*l*s-o*h*s-d*n*u+r*h*u+o*n*p-r*l*p)*P,e[4]=S*P,e[5]=(c*v*s-g*h*s+g*n*p-t*v*p-c*n*y+t*h*y)*P,e[6]=(g*l*s-a*v*s-g*n*u+t*v*u+a*n*y-t*l*y)*P,e[7]=(a*h*s-c*l*s+c*n*u-t*h*u-a*n*p+t*l*p)*P,e[8]=T*P,e[9]=(g*d*s-c*x*s-g*r*p+t*x*p+c*r*y-t*d*y)*P,e[10]=(a*x*s-g*o*s+g*r*u-t*x*u-a*r*y+t*o*y)*P,e[11]=(c*o*s-a*d*s-c*r*u+t*d*u+a*r*p-t*o*p)*P,e[12]=E*P,e[13]=(c*x*n-g*d*n+g*r*h-t*x*h-c*r*v+t*d*v)*P,e[14]=(g*o*n-a*x*n-g*r*l+t*x*l+a*r*v-t*o*v)*P,e[15]=(a*d*n-c*o*n+c*r*l-t*d*l-a*r*h+t*o*h)*P,this}scale(e){const t=this.elements,r=e.x,n=e.y,s=e.z;return t[0]*=r,t[4]*=n,t[8]*=s,t[1]*=r,t[5]*=n,t[9]*=s,t[2]*=r,t[6]*=n,t[10]*=s,t[3]*=r,t[7]*=n,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n))}makeTranslation(e,t,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const r=Math.cos(t),n=Math.sin(t),s=1-r,a=e.x,o=e.y,l=e.z,u=s*a,c=s*o;return this.set(u*a+r,u*o-n*l,u*l+n*o,0,u*o+n*l,c*o+r,c*l-n*a,0,u*l-n*o,c*l+n*a,s*l*l+r,0,0,0,0,1),this}makeScale(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,t,r,n,s,a){return this.set(1,r,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,r){const n=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,u=s+s,c=a+a,d=o+o,h=s*u,p=s*c,g=s*d,x=a*c,v=a*d,y=o*d,I=l*u,S=l*c,T=l*d,E=r.x,B=r.y,P=r.z;return n[0]=(1-(x+y))*E,n[1]=(p+T)*E,n[2]=(g-S)*E,n[3]=0,n[4]=(p-T)*B,n[5]=(1-(h+y))*B,n[6]=(v+I)*B,n[7]=0,n[8]=(g+S)*P,n[9]=(v-I)*P,n[10]=(1-(h+x))*P,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,r){const n=this.elements;let s=$Z.set(n[0],n[1],n[2]).length();const a=$Z.set(n[4],n[5],n[6]).length(),o=$Z.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),e.x=n[12],e.y=n[13],e.z=n[14],YD.copy(this);const u=1/s,c=1/a,d=1/o;return YD.elements[0]*=u,YD.elements[1]*=u,YD.elements[2]*=u,YD.elements[4]*=c,YD.elements[5]*=c,YD.elements[6]*=c,YD.elements[8]*=d,YD.elements[9]*=d,YD.elements[10]*=d,t.setFromRotationMatrix(YD),r.x=s,r.y=a,r.z=o,this}makePerspective(e,t,r,n,s,a,o=Q9){const l=this.elements,u=2*s/(t-e),c=2*s/(r-n),d=(t+e)/(t-e),h=(r+n)/(r-n);let p,g;if(o===Q9)p=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(o===ave)p=-a/(a-s),g=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=u,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,r,n,s,a,o=Q9){const l=this.elements,u=1/(t-e),c=1/(r-n),d=1/(a-s),h=(t+e)*u,p=(r+n)*c;let g,x;if(o===Q9)g=(a+s)*d,x=-2*d;else if(o===ave)g=s*d,x=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=x,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,r=e.elements;for(let n=0;n<16;n++)if(t[n]!==r[n])return!1;return!0}fromArray(e,t=0){for(let r=0;r<16;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}}const $Z=new er,YD=new vo,PTn=new er(0,0,0),MTn=new er(1,1,1),vw=new er,hve=new er,mA=new er,R4r=new vo,w4r=new yI;class eie{constructor(e=0,t=0,r=0,n=eie.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=r,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,r,n=this._order){return this._x=e,this._y=t,this._z=r,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,r=!0){const n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],u=n[5],c=n[9],d=n[2],h=n[6],p=n[10];switch(t){case"XYZ":this._y=Math.asin(Kg(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Kg(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(Kg(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Kg(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Kg(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-Kg(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,u),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-c,p),this._y=0);break;default:}return this._order=t,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,r){return R4r.makeRotationFromQuaternion(e),this.setFromRotationMatrix(R4r,t,r)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return w4r.setFromEuler(this),this.setFromQuaternion(w4r,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}eie.DEFAULT_ORDER="XYZ";class iit{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let NTn=0;const F4r=new er,ez=new yI,eT=new vo,fve=new er,tie=new er,OTn=new er,LTn=new yI,B4r=new er(1,0,0),P4r=new er(0,1,0),M4r=new er(0,0,1),kTn={type:"added"},N4r={type:"removed"};class lf extends dO{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:NTn++}),this.uuid=xI(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=lf.DEFAULT_UP.clone();const e=new er,t=new eie,r=new yI,n=new er(1,1,1);function s(){r.setFromEuler(t,!1)}function a(){t.setFromQuaternion(r,void 0,!1)}t._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new vo},normalMatrix:{value:new cc}}),this.matrix=new vo,this.matrixWorld=new vo,this.matrixAutoUpdate=lf.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=lf.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.layers=new iit,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ez.setFromAxisAngle(e,t),this.quaternion.multiply(ez),this}rotateOnWorldAxis(e,t){return ez.setFromAxisAngle(e,t),this.quaternion.premultiply(ez),this}rotateX(e){return this.rotateOnAxis(B4r,e)}rotateY(e){return this.rotateOnAxis(P4r,e)}rotateZ(e){return this.rotateOnAxis(M4r,e)}translateOnAxis(e,t){return F4r.copy(e).applyQuaternion(this.quaternion),this.position.add(F4r.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(B4r,e)}translateY(e){return this.translateOnAxis(P4r,e)}translateZ(e){return this.translateOnAxis(M4r,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(eT.copy(this.matrixWorld).invert())}lookAt(e,t,r){e.isVector3?fve.copy(e):fve.set(e,t,r);const n=this.parent;this.updateWorldMatrix(!0,!1),tie.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?eT.lookAt(tie,fve,this.up):eT.lookAt(fve,tie,this.up),this.quaternion.setFromRotationMatrix(eT),n&&(eT.extractRotation(n.matrixWorld),ez.setFromRotationMatrix(eT),this.quaternion.premultiply(ez.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?this:(e&&e.isObject3D&&(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(kTn)),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(N4r)),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(N4r)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),eT.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),eT.multiply(e.parent.matrixWorld)),e.applyMatrix4(eT),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let r=0,n=this.children.length;r<n;r++){const a=this.children[r].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t){let r=[];this[e]===t&&r.push(this);for(let n=0,s=this.children.length;n<s;n++){const a=this.children[n].getObjectsByProperty(e,t);a.length>0&&(r=r.concat(a))}return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(tie,e,OTn),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(tie,LTn,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let r=0,n=t.length;r<n;r++){const s=t[r];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const r=this.parent;if(e===!0&&r!==null&&r.matrixWorldAutoUpdate===!0&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),t===!0){const n=this.children;for(let s=0,a=n.length;s<a;s++){const o=n[s];o.matrixWorldAutoUpdate===!0&&o.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const n={};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),this.frustumCulled===!1&&(n.frustumCulled=!1),this.renderOrder!==0&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const d=l[u];s(e.shapes,d)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,u=this.material.length;l<u;l++)o.push(s(e.materials,this.material[l]));n.material=o}else n.material=s(e.materials,this.material);if(this.children.length>0){n.children=[];for(let o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];n.animations.push(s(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),u=a(e.textures),c=a(e.images),d=a(e.shapes),h=a(e.skeletons),p=a(e.animations),g=a(e.nodes);o.length>0&&(r.geometries=o),l.length>0&&(r.materials=l),u.length>0&&(r.textures=u),c.length>0&&(r.images=c),d.length>0&&(r.shapes=d),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),g.length>0&&(r.nodes=g)}return r.object=n,r;function a(o){const l=[];for(const u in o){const c=o[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,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.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let r=0;r<e.children.length;r++){const n=e.children[r];this.add(n.clone())}return this}}lf.DEFAULT_UP=new er(0,1,0),lf.DEFAULT_MATRIX_AUTO_UPDATE=!0,lf.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const jD=new er,tT=new er,nit=new er,rT=new er,tz=new er,rz=new er,O4r=new er,sit=new er,ait=new er,oit=new er;let pve=!1;class L2{constructor(e=new er,t=new er,r=new er){this.a=e,this.b=t,this.c=r}static getNormal(e,t,r,n){n.subVectors(r,t),jD.subVectors(e,t),n.cross(jD);const s=n.lengthSq();return s>0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,r,n,s){jD.subVectors(n,t),tT.subVectors(r,t),nit.subVectors(e,t);const a=jD.dot(jD),o=jD.dot(tT),l=jD.dot(nit),u=tT.dot(tT),c=tT.dot(nit),d=a*u-o*o;if(d===0)return s.set(-2,-1,-1);const h=1/d,p=(u*l-o*c)*h,g=(a*c-o*l)*h;return s.set(1-p-g,g,p)}static containsPoint(e,t,r,n){return this.getBarycoord(e,t,r,n,rT),rT.x>=0&&rT.y>=0&&rT.x+rT.y<=1}static getUV(e,t,r,n,s,a,o,l){return pve===!1&&(pve=!0),this.getInterpolation(e,t,r,n,s,a,o,l)}static getInterpolation(e,t,r,n,s,a,o,l){return this.getBarycoord(e,t,r,n,rT),l.setScalar(0),l.addScaledVector(s,rT.x),l.addScaledVector(a,rT.y),l.addScaledVector(o,rT.z),l}static isFrontFacing(e,t,r,n){return jD.subVectors(r,t),tT.subVectors(e,t),jD.cross(tT).dot(n)<0}set(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this}setFromPointsAndIndices(e,t,r,n){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,r,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return jD.subVectors(this.c,this.b),tT.subVectors(this.a,this.b),jD.cross(tT).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return L2.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return L2.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,r,n,s){return pve===!1&&(pve=!0),L2.getInterpolation(e,this.a,this.b,this.c,t,r,n,s)}getInterpolation(e,t,r,n,s){return L2.getInterpolation(e,this.a,this.b,this.c,t,r,n,s)}containsPoint(e){return L2.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return L2.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const r=this.a,n=this.b,s=this.c;let a,o;tz.subVectors(n,r),rz.subVectors(s,r),sit.subVectors(e,r);const l=tz.dot(sit),u=rz.dot(sit);if(l<=0&&u<=0)return t.copy(r);ait.subVectors(e,n);const c=tz.dot(ait),d=rz.dot(ait);if(c>=0&&d<=c)return t.copy(n);const h=l*d-c*u;if(h<=0&&l>=0&&c<=0)return a=l/(l-c),t.copy(r).addScaledVector(tz,a);oit.subVectors(e,s);const p=tz.dot(oit),g=rz.dot(oit);if(g>=0&&p<=g)return t.copy(s);const x=p*u-l*g;if(x<=0&&u>=0&&g<=0)return o=u/(u-g),t.copy(r).addScaledVector(rz,o);const v=c*g-p*d;if(v<=0&&d-c>=0&&p-g>=0)return O4r.subVectors(s,n),o=(d-c)/(d-c+(p-g)),t.copy(n).addScaledVector(O4r,o);const y=1/(v+x+h);return a=x*y,o=h*y,t.copy(r).addScaledVector(tz,a).addScaledVector(rz,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let GTn=0;class KD extends dO{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:GTn++}),this.uuid=xI(),this.name="",this.type="Material",this.blending=VZ,this.side=zD,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=FEr,this.blendDst=BEr,this.blendEquation=WZ,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Frt,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=eTn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Hrt,this.stencilZFail=Hrt,this.stencilZPass=Hrt,this.stencilWrite=!1,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.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const r=e[t];if(r===void 0)continue;const n=this[t];n!==void 0&&(n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r)}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==VZ&&(r.blending=this.blending),this.side!==zD&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.colorWrite=this.colorWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=this.alphaHash),this.alphaToCoverage===!0&&(r.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(r.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=this.flatShading),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(e.images);s.length>0&&(r.textures=s),a.length>0&&(r.images=a)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,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.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let r=null;if(t!==null){const n=t.length;r=new Array(n);for(let s=0;s!==n;++s)r[s]=t[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,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.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const L4r={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,mediumpurple: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},QD={h:0,s:0,l:0},gve={h:0,s:0,l:0};function lit(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class _s{constructor(e,t,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,r)}set(e,t,r){if(t===void 0&&r===void 0){const n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Vl){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,XD.toWorkingColorSpace(this,t),this}setRGB(e,t,r,n=XD.workingColorSpace){return this.r=e,this.g=t,this.b=r,XD.toWorkingColorSpace(this,n),this}setHSL(e,t,r,n=XD.workingColorSpace){if(e=Xrt(e,1),t=Kg(t,0,1),r=Kg(r,0,1),t===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+t):r+t-r*t,a=2*r-s;this.r=lit(a,s,e+1/3),this.g=lit(a,s,e),this.b=lit(a,s,e-1/3)}return XD.toWorkingColorSpace(this,n),this}setStyle(e,t=Vl){function r(s){s!==void 0&&parseFloat(s)<1}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Vl){const r=L4r[e.toLowerCase()];return r!==void 0&&this.setHex(r,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=YZ(e.r),this.g=YZ(e.g),this.b=YZ(e.b),this}copyLinearToSRGB(e){return this.r=Krt(e.r),this.g=Krt(e.g),this.b=Krt(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Vl){return XD.fromWorkingColorSpace(Jx.copy(this),e),Math.round(Kg(Jx.r*255,0,255))*65536+Math.round(Kg(Jx.g*255,0,255))*256+Math.round(Kg(Jx.b*255,0,255))}getHexString(e=Vl){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=XD.workingColorSpace){XD.fromWorkingColorSpace(Jx.copy(this),t);const r=Jx.r,n=Jx.g,s=Jx.b,a=Math.max(r,n,s),o=Math.min(r,n,s);let l,u;const c=(o+a)/2;if(o===a)l=0,u=0;else{const d=a-o;switch(u=c<=.5?d/(a+o):d/(2-a-o),a){case r:l=(n-s)/d+(n<s?6:0);break;case n:l=(s-r)/d+2;break;case s:l=(r-n)/d+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=XD.workingColorSpace){return XD.fromWorkingColorSpace(Jx.copy(this),t),e.r=Jx.r,e.g=Jx.g,e.b=Jx.b,e}getStyle(e=Vl){XD.fromWorkingColorSpace(Jx.copy(this),e);const t=Jx.r,r=Jx.g,n=Jx.b;return e!==Vl?`color(${e} ${t.toFixed(3)} ${r.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(r*255)},${Math.round(n*255)})`}offsetHSL(e,t,r){return this.getHSL(QD),QD.h+=e,QD.s+=t,QD.l+=r,this.setHSL(QD.h,QD.s,QD.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(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(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(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}lerpColors(e,t,r){return this.r=e.r+(t.r-e.r)*r,this.g=e.g+(t.g-e.g)*r,this.b=e.b+(t.b-e.b)*r,this}lerpHSL(e,t){this.getHSL(QD),e.getHSL(gve);const r=Kre(QD.h,gve.h,t),n=Kre(QD.s,gve.s,t),s=Kre(QD.l,gve.l,t);return this.setHSL(r,n,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,r=this.g,n=this.b,s=e.elements;return this.r=s[0]*t+s[3]*r+s[6]*n,this.g=s[1]*t+s[4]*r+s[7]*n,this.b=s[2]*t+s[5]*r+s[8]*n,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Jx=new _s;_s.NAMES=L4r;class Ef extends KD{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _s(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=PEr,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(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.fog=e.fog,this}}const Qg=new er,mve=new En;class d0{constructor(e,t,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=r,this.usage=Zrt,this.updateRange={offset:0,count:-1},this.gpuType=P4,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(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.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,r){e*=this.itemSize,r*=t.itemSize;for(let n=0,s=this.itemSize;n<s;n++)this.array[e+n]=t.array[r+n];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,r=this.count;t<r;t++)mve.fromBufferAttribute(this,t),mve.applyMatrix3(e),this.setXY(t,mve.x,mve.y);else if(this.itemSize===3)for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.applyMatrix3(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}applyMatrix4(e){for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.applyMatrix4(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.applyNormalMatrix(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.transformDirection(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let r=this.array[e*this.itemSize+t];return this.normalized&&(r=O4(r,this.array)),r}setComponent(e,t,r){return this.normalized&&(r=Wh(r,this.array)),this.array[e*this.itemSize+t]=r,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=O4(t,this.array)),t}setX(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=O4(t,this.array)),t}setY(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=O4(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=O4(t,this.array)),t}setW(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=Wh(t,this.array),r=Wh(r,this.array)),this.array[e+0]=t,this.array[e+1]=r,this}setXYZ(e,t,r,n){return e*=this.itemSize,this.normalized&&(t=Wh(t,this.array),r=Wh(r,this.array),n=Wh(n,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this}setXYZW(e,t,r,n,s){return e*=this.itemSize,this.normalized&&(t=Wh(t,this.array),r=Wh(r,this.array),n=Wh(n,this.array),s=Wh(s,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Zrt&&(e.usage=this.usage),(this.updateRange.offset!==0||this.updateRange.count!==-1)&&(e.updateRange=this.updateRange),e}}class k4r extends d0{constructor(e,t,r){super(new Uint16Array(e),t,r)}}class G4r extends d0{constructor(e,t,r){super(new Uint32Array(e),t,r)}}class td extends d0{constructor(e,t,r){super(new Float32Array(e),t,r)}}let VTn=0;const CI=new vo,uit=new lf,iz=new er,xA=new c0,rie=new c0,Rm=new er;class Td extends dO{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:VTn++}),this.uuid=xI(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(I4r(e)?G4r:k4r)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,r=0){this.groups.push({start:e,count:t,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const r=this.attributes.normal;if(r!==void 0){const s=new cc().getNormalMatrix(e);r.applyNormalMatrix(s),r.needsUpdate=!0}const n=this.attributes.tangent;return n!==void 0&&(n.transformDirection(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return CI.makeRotationFromQuaternion(e),this.applyMatrix4(CI),this}rotateX(e){return CI.makeRotationX(e),this.applyMatrix4(CI),this}rotateY(e){return CI.makeRotationY(e),this.applyMatrix4(CI),this}rotateZ(e){return CI.makeRotationZ(e),this.applyMatrix4(CI),this}translate(e,t,r){return CI.makeTranslation(e,t,r),this.applyMatrix4(CI),this}scale(e,t,r){return CI.makeScale(e,t,r),this.applyMatrix4(CI),this}lookAt(e){return uit.lookAt(e),uit.updateMatrix(),this.applyMatrix4(uit.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(iz).negate(),this.translate(iz.x,iz.y,iz.z),this}setFromPoints(e){const t=[];for(let r=0,n=e.length;r<n;r++){const s=e[r];t.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new td(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new c0);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){this.boundingBox.set(new er(-1/0,-1/0,-1/0),new er(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let r=0,n=t.length;r<n;r++){const s=t[r];xA.setFromBufferAttribute(s),this.morphTargetsRelative?(Rm.addVectors(this.boundingBox.min,xA.min),this.boundingBox.expandByPoint(Rm),Rm.addVectors(this.boundingBox.max,xA.max),this.boundingBox.expandByPoint(Rm)):(this.boundingBox.expandByPoint(xA.min),this.boundingBox.expandByPoint(xA.max))}}else this.boundingBox.makeEmpty();isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new W3);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){this.boundingSphere.set(new er,1/0);return}if(e){const r=this.boundingSphere.center;if(xA.setFromBufferAttribute(e),t)for(let s=0,a=t.length;s<a;s++){const o=t[s];rie.setFromBufferAttribute(o),this.morphTargetsRelative?(Rm.addVectors(xA.min,rie.min),xA.expandByPoint(Rm),Rm.addVectors(xA.max,rie.max),xA.expandByPoint(Rm)):(xA.expandByPoint(rie.min),xA.expandByPoint(rie.max))}xA.getCenter(r);let n=0;for(let s=0,a=e.count;s<a;s++)Rm.fromBufferAttribute(e,s),n=Math.max(n,r.distanceToSquared(Rm));if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s],l=this.morphTargetsRelative;for(let u=0,c=o.count;u<c;u++)Rm.fromBufferAttribute(o,u),l&&(iz.fromBufferAttribute(e,u),Rm.add(iz)),n=Math.max(n,r.distanceToSquared(Rm))}this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0)return;const r=e.array,n=t.position.array,s=t.normal.array,a=t.uv.array,o=n.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new d0(new Float32Array(4*o),4));const l=this.getAttribute("tangent").array,u=[],c=[];for(let k=0;k<o;k++)u[k]=new er,c[k]=new er;const d=new er,h=new er,p=new er,g=new En,x=new En,v=new En,y=new er,I=new er;function S(k,V,U){d.fromArray(n,k*3),h.fromArray(n,V*3),p.fromArray(n,U*3),g.fromArray(a,k*2),x.fromArray(a,V*2),v.fromArray(a,U*2),h.sub(d),p.sub(d),x.sub(g),v.sub(g);const z=1/(x.x*v.y-v.x*x.y);isFinite(z)&&(y.copy(h).multiplyScalar(v.y).addScaledVector(p,-x.y).multiplyScalar(z),I.copy(p).multiplyScalar(x.x).addScaledVector(h,-v.x).multiplyScalar(z),u[k].add(y),u[V].add(y),u[U].add(y),c[k].add(I),c[V].add(I),c[U].add(I))}let T=this.groups;T.length===0&&(T=[{start:0,count:r.length}]);for(let k=0,V=T.length;k<V;++k){const U=T[k],z=U.start,Z=U.count;for(let j=z,K=z+Z;j<K;j+=3)S(r[j+0],r[j+1],r[j+2])}const E=new er,B=new er,P=new er,M=new er;function O(k){P.fromArray(s,k*3),M.copy(P);const V=u[k];E.copy(V),E.sub(P.multiplyScalar(P.dot(V))).normalize(),B.crossVectors(M,V);const z=B.dot(c[k])<0?-1:1;l[k*4]=E.x,l[k*4+1]=E.y,l[k*4+2]=E.z,l[k*4+3]=z}for(let k=0,V=T.length;k<V;++k){const U=T[k],z=U.start,Z=U.count;for(let j=z,K=z+Z;j<K;j+=3)O(r[j+0]),O(r[j+1]),O(r[j+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new d0(new Float32Array(t.count*3),3),this.setAttribute("normal",r);else for(let h=0,p=r.count;h<p;h++)r.setXYZ(h,0,0,0);const n=new er,s=new er,a=new er,o=new er,l=new er,u=new er,c=new er,d=new er;if(e)for(let h=0,p=e.count;h<p;h+=3){const g=e.getX(h+0),x=e.getX(h+1),v=e.getX(h+2);n.fromBufferAttribute(t,g),s.fromBufferAttribute(t,x),a.fromBufferAttribute(t,v),c.subVectors(a,s),d.subVectors(n,s),c.cross(d),o.fromBufferAttribute(r,g),l.fromBufferAttribute(r,x),u.fromBufferAttribute(r,v),o.add(c),l.add(c),u.add(c),r.setXYZ(g,o.x,o.y,o.z),r.setXYZ(x,l.x,l.y,l.z),r.setXYZ(v,u.x,u.y,u.z)}else for(let h=0,p=t.count;h<p;h+=3)n.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),a.fromBufferAttribute(t,h+2),c.subVectors(a,s),d.subVectors(n,s),c.cross(d),r.setXYZ(h+0,c.x,c.y,c.z),r.setXYZ(h+1,c.x,c.y,c.z),r.setXYZ(h+2,c.x,c.y,c.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,r=e.count;t<r;t++)Rm.fromBufferAttribute(e,t),Rm.normalize(),e.setXYZ(t,Rm.x,Rm.y,Rm.z)}toNonIndexed(){function e(o,l){const u=o.array,c=o.itemSize,d=o.normalized,h=new u.constructor(l.length*c);let p=0,g=0;for(let x=0,v=l.length;x<v;x++){o.isInterleavedBufferAttribute?p=l[x]*o.data.stride+o.offset:p=l[x]*c;for(let y=0;y<c;y++)h[g++]=u[p++]}return new d0(h,c,d)}if(this.index===null)return this;const t=new Td,r=this.index.array,n=this.attributes;for(const o in n){const l=n[o],u=e(l,r);t.setAttribute(o,u)}const s=this.morphAttributes;for(const o in s){const l=[],u=s[o];for(let c=0,d=u.length;c<d;c++){const h=u[c],p=e(h,r);l.push(p)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const u=a[o];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,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),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const r=this.attributes;for(const l in r){const u=r[l];e.data.attributes[l]=u.toJSON(e.data)}const n={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,h=u.length;d<h;d++){const p=u[d];c.push(p.toJSON(e.data))}c.length>0&&(n[l]=c,s=!0)}s&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(t));const n=e.attributes;for(const u in n){const c=n[u];this.setAttribute(u,c.clone(t))}const s=e.morphAttributes;for(const u in s){const c=[],d=s[u];for(let h=0,p=d.length;h<p;h++)c.push(d[h].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let u=0,c=a.length;u<c;u++){const d=a[u];this.addGroup(d.start,d.count,d.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const V4r=new vo,pO=new xw,xve=new W3,W4r=new er,nz=new er,sz=new er,az=new er,cit=new er,vve=new er,yve=new En,Cve=new En,Ave=new En,U4r=new er,H4r=new er,Z4r=new er,bve=new er,Ive=new er;class Ku extends lf{constructor(e=new Td,t=new Ef){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const n=t[r[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,t){const r=this.geometry,n=r.attributes.position,s=r.morphAttributes.position,a=r.morphTargetsRelative;t.fromBufferAttribute(n,e);const o=this.morphTargetInfluences;if(s&&o){vve.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const c=o[l],d=s[l];c!==0&&(cit.fromBufferAttribute(d,e),a?vve.addScaledVector(cit,c):vve.addScaledVector(cit.sub(t),c))}t.add(vve)}return t}raycast(e,t){const r=this.geometry,n=this.material,s=this.matrixWorld;n!==void 0&&(r.boundingSphere===null&&r.computeBoundingSphere(),xve.copy(r.boundingSphere),xve.applyMatrix4(s),pO.copy(e.ray).recast(e.near),!(xve.containsPoint(pO.origin)===!1&&(pO.intersectSphere(xve,W4r)===null||pO.origin.distanceToSquared(W4r)>(e.far-e.near)**2))&&(V4r.copy(s).invert(),pO.copy(e.ray).applyMatrix4(V4r),!(r.boundingBox!==null&&pO.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,t,pO)))}_computeIntersections(e,t,r){let n;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,u=s.attributes.uv,c=s.attributes.uv1,d=s.attributes.normal,h=s.groups,p=s.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,x=h.length;g<x;g++){const v=h[g],y=a[v.materialIndex],I=Math.max(v.start,p.start),S=Math.min(o.count,Math.min(v.start+v.count,p.start+p.count));for(let T=I,E=S;T<E;T+=3){const B=o.getX(T),P=o.getX(T+1),M=o.getX(T+2);n=_ve(this,y,e,r,u,c,d,B,P,M),n&&(n.faceIndex=Math.floor(T/3),n.face.materialIndex=v.materialIndex,t.push(n))}}else{const g=Math.max(0,p.start),x=Math.min(o.count,p.start+p.count);for(let v=g,y=x;v<y;v+=3){const I=o.getX(v),S=o.getX(v+1),T=o.getX(v+2);n=_ve(this,a,e,r,u,c,d,I,S,T),n&&(n.faceIndex=Math.floor(v/3),t.push(n))}}else if(l!==void 0)if(Array.isArray(a))for(let g=0,x=h.length;g<x;g++){const v=h[g],y=a[v.materialIndex],I=Math.max(v.start,p.start),S=Math.min(l.count,Math.min(v.start+v.count,p.start+p.count));for(let T=I,E=S;T<E;T+=3){const B=T,P=T+1,M=T+2;n=_ve(this,y,e,r,u,c,d,B,P,M),n&&(n.faceIndex=Math.floor(T/3),n.face.materialIndex=v.materialIndex,t.push(n))}}else{const g=Math.max(0,p.start),x=Math.min(l.count,p.start+p.count);for(let v=g,y=x;v<y;v+=3){const I=v,S=v+1,T=v+2;n=_ve(this,a,e,r,u,c,d,I,S,T),n&&(n.faceIndex=Math.floor(v/3),t.push(n))}}}}function WTn(i,e,t,r,n,s,a,o){let l;if(e.side===fy?l=r.intersectTriangle(a,s,n,!0,o):l=r.intersectTriangle(n,s,a,e.side===zD,o),l===null)return null;Ive.copy(o),Ive.applyMatrix4(i.matrixWorld);const u=t.ray.origin.distanceTo(Ive);return u<t.near||u>t.far?null:{distance:u,point:Ive.clone(),object:i}}function _ve(i,e,t,r,n,s,a,o,l,u){i.getVertexPosition(o,nz),i.getVertexPosition(l,sz),i.getVertexPosition(u,az);const c=WTn(i,e,t,r,nz,sz,az,bve);if(c){n&&(yve.fromBufferAttribute(n,o),Cve.fromBufferAttribute(n,l),Ave.fromBufferAttribute(n,u),c.uv=L2.getInterpolation(bve,nz,sz,az,yve,Cve,Ave,new En)),s&&(yve.fromBufferAttribute(s,o),Cve.fromBufferAttribute(s,l),Ave.fromBufferAttribute(s,u),c.uv1=L2.getInterpolation(bve,nz,sz,az,yve,Cve,Ave,new En),c.uv2=c.uv1),a&&(U4r.fromBufferAttribute(a,o),H4r.fromBufferAttribute(a,l),Z4r.fromBufferAttribute(a,u),c.normal=L2.getInterpolation(bve,nz,sz,az,U4r,H4r,Z4r,new er),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const d={a:o,b:l,c:u,normal:new er,materialIndex:0};L2.getNormal(nz,sz,az,d.normal),c.face=d}return c}class gO extends Td{constructor(e=1,t=1,r=1,n=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:r,widthSegments:n,heightSegments:s,depthSegments:a};const o=this;n=Math.floor(n),s=Math.floor(s),a=Math.floor(a);const l=[],u=[],c=[],d=[];let h=0,p=0;g("z","y","x",-1,-1,r,t,e,a,s,0),g("z","y","x",1,-1,r,t,-e,a,s,1),g("x","z","y",1,1,e,r,t,n,a,2),g("x","z","y",1,-1,e,r,-t,n,a,3),g("x","y","z",1,-1,e,t,r,n,s,4),g("x","y","z",-1,-1,e,t,-r,n,s,5),this.setIndex(l),this.setAttribute("position",new td(u,3)),this.setAttribute("normal",new td(c,3)),this.setAttribute("uv",new td(d,2));function g(x,v,y,I,S,T,E,B,P,M,O){const k=T/P,V=E/M,U=T/2,z=E/2,Z=B/2,j=P+1,K=M+1;let J=0,q=0;const ie=new er;for(let ne=0;ne<K;ne++){const le=ne*V-z;for(let de=0;de<j;de++){const he=de*k-U;ie[x]=he*I,ie[v]=le*S,ie[y]=Z,u.push(ie.x,ie.y,ie.z),ie[x]=0,ie[v]=0,ie[y]=B>0?1:-1,c.push(ie.x,ie.y,ie.z),d.push(de/P),d.push(1-ne/M),J+=1}}for(let ne=0;ne<M;ne++)for(let le=0;le<P;le++){const de=h+le+j*ne,he=h+le+j*(ne+1),ge=h+(le+1)+j*(ne+1),ce=h+(le+1)+j*ne;l.push(de,he,ce),l.push(he,ge,ce),q+=6}o.addGroup(p,q,O),p+=q,h+=J}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new gO(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function oz(i){const e={};for(const t in i){e[t]={};for(const r in i[t]){const n=i[t][r];n&&(n.isColor||n.isMatrix3||n.isMatrix4||n.isVector2||n.isVector3||n.isVector4||n.isTexture||n.isQuaternion)?n.isRenderTargetTexture?e[t][r]=null:e[t][r]=n.clone():Array.isArray(n)?e[t][r]=n.slice():e[t][r]=n}}return e}function gy(i){const e={};for(let t=0;t<i.length;t++){const r=oz(i[t]);for(const n in r)e[n]=r[n]}return e}function UTn(i){const e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function z4r(i){return i.getRenderTarget()===null?i.outputColorSpace:N4}const L4={clone:oz,merge:gy};var HTn=`void main() {
|
|
33868
|
+
</div>`,unit:Te.landmark.style.unit,rotation:Te.landmark.style.rotation,alwaysFront:Te.landmark.style.alwaysFront,size:Te.landmark.style.size,altitude:Te.landmark.style.altitude}),Oe.addAnimate({key:"altitude",value:[0,1],random:Te.landmark.animate.random,duration:Te.landmark.animate.duration,transform:Te.landmark.animate.transform,delay:Te.landmark.animate.delay,yoyo:Te.landmark.animate.yoyo,repeat:Te.landmark.animate.repeat}),x.value.add(Oe),x.value.animate.start()}catch{}},ne=(fe,Te,Ne)=>{const Le=new fe.PulseLinkLayer({zIndex:Te.zIndex,opacity:Te.opacity,visible:Te.visible,zooms:Te.zooms,depth:Te.depth}),Ae=new fe.GeoJSONSource({data:Ne});if(Le.setSource(Ae),Le.setStyle({unit:Te.style.unit,dash:[4e4,0,4e4,0],lineWidth:Te.style.lineWidth,height:function(Oe,He){return He.distance/3+Te.style.height},smoothSteps:30,speed:function(){return 1e5+Math.random()*Te.style.speed},flowLength:Te.style.flowLength,lineColors:Te.style.lineColors,maxHeightScale:Te.style.maxHeightScale,headColor:Te.style.headColor,trailColor:Te.style.trailColor}),g.value&&M.value&&(g.value.off("click",M.value),M.value=null),g.value){const Oe=He=>{const Ee=Le.queryFeature(He.pixel.toArray());Ee&&(n("amap3d-scene-pulseLinkLayer",Ee),ni.parseEvents(i.useEvents,"amap3d-scene-pulseLinkLayer",Ee))};g.value.on("click",Oe),M.value=Oe}x.value.add(Le),x.value.animate.start()},le=(fe,Te)=>{const Ne={type:"FeatureCollection",features:[]};return fe.forEach(Le=>{const Ae={type:"Feature",id:So(),properties:{type:Te==="Point"?Te:0,...Le},geometry:{type:Te,coordinates:Le.value}};Ne.features.push(Ae)}),Ne},de=fe=>{g.value&&(g.value.setFeatures(fe.config.features),g.value.setPitch(fe.config.pitch),g.value.setRotation(fe.config.rotation),g.value.setStatus({dragEnable:fe.config.dragEnable,zoomEnable:fe.config.zoomEnable,rotateEnable:fe.config.rotateEnable,pitchEnable:fe.config.pitchEnable}),fe.config.plugin.scale.visible?E.value.show():E.value.hide(),fe.config.plugin.toolBar.visible?T.value.show():T.value.hide(),fe.config.plugin.controlBar.visible?S.value.show():S.value.hide())},he=()=>{g.value&&(g.value.clearMap(),x.value.clear(),k(B.value))},ge=fe=>{g.value&&g.value.setMapStyle(fe.config.mapStyle)},ce=fe=>{g.value&&g.value.setZoom(fe.config.zoom,!1,200)},me=fe=>{g.value&&g.value.setCenter(fe.config.center,!1,200)},te=()=>{g.value&&M.value&&(g.value.off("click",M.value),M.value=null),g.value&&(g.value.clearMap(),g.value.destroy(),g.value=null),x.value&&(x.value.clear(),x.value.destroy(),x.value=null)};return na(()=>{setTimeout(()=>{O(r.value)},0)}),tm(()=>{y.value=!0,te()}),{initAMap3d:O,updateAMapStyle:ge,updateAMapConfig:de,updateAMapComponents:he,updateAMapZoom:ce,updateAMapCenter:me,amap3d:g,loading:v,AMapPrototype:B,errorMessage:P}},{initAMap3d:a,updateAMapStyle:o,updateAMapConfig:l,updateAMapComponents:u,updateAMapZoom:c,updateAMapCenter:d,loading:h,errorMessage:p}=s();return ci(()=>r.value.config,()=>{l(r.value)},{deep:!0}),ci(()=>r.value.config.zoom,()=>{c(r.value)},{deep:!0}),ci(()=>r.value.config.center,()=>{d(r.value)},{deep:!0}),ci(()=>r.value.config.floors,Zt.debounce(()=>{a(r.value)},300),{deep:!0}),ci(()=>r.value.config.skyColor,Zt.debounce(()=>{a(r.value)},300),{deep:!0}),ci(()=>r.value.widgets,()=>{u()},{deep:!0}),ci(()=>r.value.config.mapStyle,()=>{o(r.value)},{deep:!0}),ci(()=>r.value.basic,()=>{a(r.value)},{deep:!0}),ci(()=>i.sources,()=>{a(r.value)},{deep:!0}),e({refresh:()=>a(r.value),refreshView:()=>l(r.value),refreshData:()=>a(r.value)}),(g,x)=>(wt(),Ir("div",z8n,[vi("div",{class:ba(["amap-3d-wrap",{show:Br(h)}])},x[0]||(x[0]=[vi("div",{id:"zerov-amap-3d",class:"zerov-amap-container"},null,-1)]),2),Br(h)?wi("",!0):(wt(),Ir("div",X8n,[Br(p)!==""?(wt(),Ir("i",Y8n)):wi("",!0),vi("p",j8n,Go(Br(p)),1)]))]))}}),sSr=Zi(zl(K8n,[["__scopeId","data-v-82692c4f"]])),aSr="2.0.0",Q8n=i=>{const e=Zt.cloneDeep(i)??{};return e.version!==aSr?(e.version=aSr,{...e,background:{color:e.background?.color??"#00000000",image:e.background?.image??"",size:e.background?.size??"cover",positionX:e.background?.positionX??"center",positionY:e.background?.positionY??"center"}}):{...i,background:{color:i.background?.color??"#00000000",image:i.background?.image??"",size:i.background?.size??"cover",positionX:i.background?.positionX??"center",positionY:i.background?.positionY??"center"}}},J8n=Kt({...Kt({name:"ShjDefault"}),props:{option:{},sources:{},useEvents:{}},setup(i){const e=kr(()=>Q8n(i.option)),t=n=>typeof n=="number"?`${n}px`:n??"center",r=()=>{try{const n=e.value.background.image,s=e.value.background.color,a=e.value.background.size,o=a==="repeat"||a==="auto"?"auto":a;return{background:n?`url('${n}')`:s,backgroundSize:o,backgroundPosition:`${t(e.value.background.positionX)} ${t(e.value.background.positionY)}`,backgroundRepeat:a==="repeat"||a==="auto"?"repeat":"no-repeat"}}catch{return{}}};return(n,s)=>(wt(),Ir("div",{class:"shj-default",style:Dn(r())},null,4))}}),oSr=Zi(zl(J8n,[["__scopeId","data-v-5075cbee"]])),q8n=Kt({...Kt({name:"ShjMap2d"}),props:{option:{},sources:{},useEvents:{}},setup(i,{expose:e}){const t=Wt();return e({getEchartsInstance:()=>t.value?.getEchartsInstance(),refresh:()=>t.value?.refresh(),refreshView:()=>t.value?.refreshView(),refreshData:()=>t.value?.refreshData()}),(r,n)=>(wt(),Ni(vR,yn({ref_key:"componentRef",ref:t,option:r.option,sources:r.sources,"use-events":r.useEvents},r.$attrs),null,16,["option","sources","use-events"]))}}),lSr=Zi(q8n);function U9(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function uSr(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}var cA={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},SZ={duration:.5,overwrite:!1,delay:0},Htt,O2,Rp,dI=1e8,af=1/dI,Ztt=Math.PI*2,$8n=Ztt/4,e5n=0,cSr=Math.sqrt,t5n=Math.cos,r5n=Math.sin,Sm=function(e){return typeof e=="string"},H0=function(e){return typeof e=="function"},H9=function(e){return typeof e=="number"},ztt=function(e){return typeof e>"u"},R4=function(e){return typeof e=="object"},M3=function(e){return e!==!1},Xtt=function(){return typeof window<"u"},Hxe=function(e){return H0(e)||Sm(e)},dSr=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},jx=Array.isArray,Ytt=/(?:-?\.?\d|\.)+/gi,hSr=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,EZ=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,jtt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fSr=/[+-]=-?[.\d]+/,pSr=/[^,'"\[\]\s]+/gi,i5n=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,l0,w4,Ktt,Qtt,dA={},Zxe={},gSr,mSr=function(e){return(Zxe=RZ(e,dA))&&L3},Jtt=function(e,t){},Pre=function(e,t){return!t&&void 0},xSr=function(e,t){return e&&(dA[e]=t)&&Zxe&&(Zxe[e]=t)||dA},Mre=function(){return 0},n5n={suppressEvents:!0,isStart:!0,kill:!1},zxe={suppressEvents:!0,kill:!1},s5n={suppressEvents:!0},qtt={},nw=[],$tt={},vSr,hA={},ert={},ySr=30,Xxe=[],trt="",rrt=function(e){var t=e[0],r,n;if(R4(t)||H0(t)||(e=[e]),!(r=(t._gsap||{}).harness)){for(n=Xxe.length;n--&&!Xxe[n].targetTest(t););r=Xxe[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new jSr(e[n],r)))||e.splice(n,1);return e},JN=function(e){return e._gsap||rrt(fI(e))[0]._gsap},CSr=function(e,t,r){return(r=e[t])&&H0(r)?e[t]():ztt(r)&&e.getAttribute&&e.getAttribute(t)||r},N3=function(e,t){return(e=e.split(",")).forEach(t)||e},vg=function(e){return Math.round(e*1e5)/1e5||0},Yg=function(e){return Math.round(e*1e7)/1e7||0},TZ=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),r==="+"?e+n:r==="-"?e-n:r==="*"?e*n:e/n},a5n=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},Yxe=function(){var e=nw.length,t=nw.slice(0),r,n;for($tt={},nw.length=0,r=0;r<e;r++)n=t[r],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},irt=function(e){return!!(e._initted||e._startAt||e.add)},ASr=function(e,t,r,n){nw.length&&!O2&&Yxe(),e.render(t,r,!!(O2&&t<0&&irt(e))),nw.length&&!O2&&Yxe()},bSr=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(pSr).length<2?t:Sm(e)?e.trim():e},ISr=function(e){return e},fA=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},o5n=function(e){return function(t,r){for(var n in r)n in t||n==="duration"&&e||n==="ease"||(t[n]=r[n])}},RZ=function(e,t){for(var r in t)e[r]=t[r];return e},_Sr=function i(e,t){for(var r in t)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=R4(t[r])?i(e[r]||(e[r]={}),t[r]):t[r]);return e},jxe=function(e,t){var r={},n;for(n in e)n in t||(r[n]=e[n]);return r},Nre=function(e){var t=e.parent||l0,r=e.keyframes?o5n(jx(e.keyframes)):fA;if(M3(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},l5n=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},DSr=function(e,t,r,n,s){var a=e[n],o;if(s)for(o=t[s];a&&a[s]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},Kxe=function(e,t,r,n){r===void 0&&(r="_first"),n===void 0&&(n="_last");var s=t._prev,a=t._next;s?s._next=a:e[r]===t&&(e[r]=a),a?a._prev=s:e[n]===t&&(e[n]=s),t._next=t._prev=t.parent=null},sw=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},qN=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},u5n=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},nrt=function(e,t,r,n){return e._startAt&&(O2?e._startAt.revert(zxe):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},c5n=function i(e){return!e||e._ts&&i(e.parent)},SSr=function(e){return e._repeat?wZ(e._tTime,e=e.duration()+e._rDelay)*e:0},wZ=function(e,t){var r=Math.floor(e=Yg(e/t));return e&&r===e?r-1:r},Qxe=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Jxe=function(e){return e._end=Yg(e._start+(e._tDur/Math.abs(e._ts||e._rts||af)||0))},qxe=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=Yg(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Jxe(e),r._dirty||qN(r,e)),e},ESr=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=Qxe(e.rawTime(),t),(!t._dur||Lre(0,t.totalDuration(),r)-t._tTime>af)&&t.render(r,!0)),qN(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-af}},F4=function(e,t,r,n){return t.parent&&sw(t),t._start=Yg((H9(r)?r:r||e!==l0?hI(e,r,t):e._time)+t._delay),t._end=Yg(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),DSr(e,t,"_first","_last",e._sort?"_start":0),srt(t)||(e._recent=t),n||ESr(e,t),e._ts<0&&qxe(e,e._tTime),e},TSr=function(e,t){return(dA.ScrollTrigger||Jtt("scrollTrigger",t))&&dA.ScrollTrigger.create(t,e)},RSr=function(e,t,r,n,s){if(prt(e,t,s),!e._initted)return 1;if(!r&&e._pt&&!O2&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&vSr!==gA.frame)return nw.push(e),e._lazy=[s,n],1},d5n=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},srt=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},h5n=function(e,t,r,n){var s=e.ratio,a=t<0||!t&&(!e._start&&d5n(e)&&!(!e._initted&&srt(e))||(e._ts<0||e._dp._ts<0)&&!srt(e))?0:1,o=e._rDelay,l=0,u,c,d;if(o&&e._repeat&&(l=Lre(0,e._tDur,t),c=wZ(l,o),e._yoyo&&c&1&&(a=1-a),c!==wZ(e._tTime,o)&&(s=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==s||O2||n||e._zTime===af||!t&&e._zTime){if(!e._initted&&RSr(e,t,n,r,l))return;for(d=e._zTime,e._zTime=t||(r?af:0),r||(r=t&&!d),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=l,u=e._pt;u;)u.r(a,u.d),u=u._next;t<0&&nrt(e,t,r,!0),e._onUpdate&&!r&&pA(e,"onUpdate"),l&&e._repeat&&!r&&e.parent&&pA(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&sw(e,1),!r&&!O2&&(pA(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},f5n=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},FZ=function(e,t,r,n){var s=e._repeat,a=Yg(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=a/e._dur),e._dur=a,e._tDur=s?s<0?1e10:Yg(a*(s+1)+e._rDelay*s):a,o>0&&!n&&qxe(e,e._tTime=e._tDur*o),e.parent&&Jxe(e),r||qN(e.parent,e),e},wSr=function(e){return e instanceof hy?qN(e):FZ(e,e._dur)},p5n={_start:0,endTime:Mre,totalDuration:Mre},hI=function i(e,t,r){var n=e.labels,s=e._recent||p5n,a=e.duration()>=dI?s.endTime(!1):e._dur,o,l,u;return Sm(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",o=t.indexOf("="),l==="<"||l===">"?(o>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(o<0?s:r).totalDuration()/100:1)):o<0?(t in n||(n[t]=a),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),u&&r&&(l=l/100*(jx(r)?r[0]:r).totalDuration()),o>1?i(e,t.substr(0,o-1),r)+l:a+l)):t==null?a:+t},Ore=function(e,t,r){var n=H9(t[1]),s=(n?2:1)+(e<2?0:1),a=t[s],o,l;if(n&&(a.duration=t[1]),a.parent=r,e){for(o=a,l=r;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=M3(l.vars.inherit)&&l.parent;a.immediateRender=M3(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[s-1]}return new jg(t[0],a,t[s+1])},aw=function(e,t){return e||e===0?t(e):t},Lre=function(e,t,r){return r<e?e:r>t?t:r},Kx=function(e,t){return!Sm(e)||!(t=i5n.exec(e))?"":t[1]},g5n=function(e,t,r){return aw(r,function(n){return Lre(e,t,n)})},art=[].slice,FSr=function(e,t){return e&&R4(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&R4(e[0]))&&!e.nodeType&&e!==w4},m5n=function(e,t,r){return r===void 0&&(r=[]),e.forEach(function(n){var s;return Sm(n)&&!t||FSr(n,1)?(s=r).push.apply(s,fI(n)):r.push(n)})||r},fI=function(e,t,r){return Rp&&!t&&Rp.selector?Rp.selector(e):Sm(e)&&!r&&(Ktt||!PZ())?art.call((t||Qtt).querySelectorAll(e),0):jx(e)?m5n(e,r):FSr(e)?art.call(e,0):e?[e]:[]},ort=function(e){return e=fI(e)[0]||Pre("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return fI(t,r.querySelectorAll?r:r===e?Pre("Invalid scope")||Qtt.createElement("div"):e)}},BSr=function(e){return e.sort(function(){return .5-Math.random()})},PSr=function(e){if(H0(e))return e;var t=R4(e)?e:{each:e},r=$N(t.ease),n=t.from||0,s=parseFloat(t.base)||0,a={},o=n>0&&n<1,l=isNaN(n)||o,u=t.axis,c=n,d=n;return Sm(n)?c=d={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(c=n[0],d=n[1]),function(h,p,g){var x=(g||t).length,v=a[x],y,I,S,T,E,B,P,M,O;if(!v){if(O=t.grid==="auto"?0:(t.grid||[1,dI])[1],!O){for(P=-dI;P<(P=g[O++].getBoundingClientRect().left)&&O<x;);O<x&&O--}for(v=a[x]=[],y=l?Math.min(O,x)*c-.5:n%O,I=O===dI?0:l?x*d/O-.5:n/O|0,P=0,M=dI,B=0;B<x;B++)S=B%O-y,T=I-(B/O|0),v[B]=E=u?Math.abs(u==="y"?T:S):cSr(S*S+T*T),E>P&&(P=E),E<M&&(M=E);n==="random"&&BSr(v),v.max=P-M,v.min=M,v.v=x=(parseFloat(t.amount)||parseFloat(t.each)*(O>x?x-1:u?u==="y"?x/O:O:Math.max(O,x/O))||0)*(n==="edges"?-1:1),v.b=x<0?s-x:s,v.u=Kx(t.amount||t.each)||0,r=r&&x<0?zSr(r):r}return x=(v[h]-v.min)/v.max||0,Yg(v.b+(r?r(x):x)*v.v)+v.u}},lrt=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=Yg(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(H9(r)?0:Kx(r))}},MSr=function(e,t){var r=jx(e),n,s;return!r&&R4(e)&&(n=r=e.radius||dI,e.values?(e=fI(e.values),(s=!H9(e[0]))&&(n*=n)):e=lrt(e.increment)),aw(t,r?H0(e)?function(a){return s=e(a),Math.abs(s-a)<=n?s:a}:function(a){for(var o=parseFloat(s?a.x:a),l=parseFloat(s?a.y:0),u=dI,c=0,d=e.length,h,p;d--;)s?(h=e[d].x-o,p=e[d].y-l,h=h*h+p*p):h=Math.abs(e[d]-o),h<u&&(u=h,c=d);return c=!n||u<=n?e[c]:a,s||c===a||H9(a)?c:c+Kx(a)}:lrt(e))},NSr=function(e,t,r,n){return aw(jx(e)?!t:r===!0?!!(r=0):!n,function(){return jx(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+r*.99))/r)*r*n)/n})},x5n=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduce(function(s,a){return a(s)},n)}},v5n=function(e,t){return function(r){return e(parseFloat(r))+(t||Kx(r))}},y5n=function(e,t,r){return LSr(e,t,0,1,r)},OSr=function(e,t,r){return aw(r,function(n){return e[~~t(n)]})},C5n=function i(e,t,r){var n=t-e;return jx(e)?OSr(e,i(0,e.length),t):aw(r,function(s){return(n+(s-e)%n)%n+e})},A5n=function i(e,t,r){var n=t-e,s=n*2;return jx(e)?OSr(e,i(0,e.length-1),t):aw(r,function(a){return a=(s+(a-e)%s)%s||0,e+(a>n?s-a:a)})},kre=function(e){for(var t=0,r="",n,s,a,o;~(n=e.indexOf("random(",t));)a=e.indexOf(")",n),o=e.charAt(n+7)==="[",s=e.substr(n+7,a-n-7).match(o?pSr:Ytt),r+=e.substr(t,n-t)+NSr(o?s:+s[0],o?0:+s[1],+s[2]||1e-5),t=a+1;return r+e.substr(t,e.length-t)},LSr=function(e,t,r,n,s){var a=t-e,o=n-r;return aw(s,function(l){return r+((l-e)/a*o||0)})},b5n=function i(e,t,r,n){var s=isNaN(e+t)?0:function(p){return(1-p)*e+p*t};if(!s){var a=Sm(e),o={},l,u,c,d,h;if(r===!0&&(n=1)&&(r=null),a)e={p:e},t={p:t};else if(jx(e)&&!jx(t)){for(c=[],d=e.length,h=d-2,u=1;u<d;u++)c.push(i(e[u-1],e[u]));d--,s=function(g){g*=d;var x=Math.min(h,~~g);return c[x](g-x)},r=t}else n||(e=RZ(jx(e)?[]:{},e));if(!c){for(l in t)hrt.call(o,e,l,"get",t[l]);s=function(g){return xrt(g,o)||(a?e.p:e)}}}return aw(r,s)},kSr=function(e,t,r){var n=e.labels,s=dI,a,o,l;for(a in n)o=n[a]-t,o<0==!!r&&o&&s>(o=Math.abs(o))&&(l=a,s=o);return l},pA=function(e,t,r){var n=e.vars,s=n[t],a=Rp,o=e._ctx,l,u,c;if(s)return l=n[t+"Params"],u=n.callbackScope||e,r&&nw.length&&Yxe(),o&&(Rp=o),c=l?s.apply(u,l):s.call(u),Rp=a,c},Gre=function(e){return sw(e),e.scrollTrigger&&e.scrollTrigger.kill(!!O2),e.progress()<1&&pA(e,"onInterrupt"),e},BZ,GSr=[],VSr=function(e){if(e)if(e=!e.name&&e.default||e,Xtt()||e.headless){var t=e.name,r=H0(e),n=t&&!r&&e.init?function(){this._props=[]}:e,s={init:Mre,render:xrt,add:hrt,kill:k5n,modifier:L5n,rawVars:0},a={targetTest:0,get:0,getSetter:mrt,aliases:{},register:0};if(PZ(),e!==n){if(hA[t])return;fA(n,fA(jxe(e,s),a)),RZ(n.prototype,RZ(s,jxe(e,a))),hA[n.prop=t]=n,e.targetTest&&(Xxe.push(n),qtt[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}xSr(t,n),e.register&&e.register(L3,n,O3)}else GSr.push(e)},of=255,Vre={aqua:[0,of,of],lime:[0,of,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,of],navy:[0,0,128],white:[of,of,of],olive:[128,128,0],yellow:[of,of,0],orange:[of,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[of,0,0],pink:[of,192,203],cyan:[0,of,of],transparent:[of,of,of,0]},urt=function(e,t,r){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(r-t)*e*6:e<.5?r:e*3<2?t+(r-t)*(2/3-e)*6:t)*of+.5|0},WSr=function(e,t,r){var n=e?H9(e)?[e>>16,e>>8&of,e&of]:0:Vre.black,s,a,o,l,u,c,d,h,p,g;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Vre[e])n=Vre[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e="#"+s+s+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&of,n&of,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&of,e&of]}else if(e.substr(0,3)==="hsl"){if(n=g=e.match(Ytt),!t)l=+n[0]%360/360,u=+n[1]/100,c=+n[2]/100,a=c<=.5?c*(u+1):c+u-c*u,s=c*2-a,n.length>3&&(n[3]*=1),n[0]=urt(l+1/3,s,a),n[1]=urt(l,s,a),n[2]=urt(l-1/3,s,a);else if(~e.indexOf("="))return n=e.match(hSr),r&&n.length<4&&(n[3]=1),n}else n=e.match(Ytt)||Vre.transparent;n=n.map(Number)}return t&&!g&&(s=n[0]/of,a=n[1]/of,o=n[2]/of,d=Math.max(s,a,o),h=Math.min(s,a,o),c=(d+h)/2,d===h?l=u=0:(p=d-h,u=c>.5?p/(2-d-h):p/(d+h),l=d===s?(a-o)/p+(a<o?6:0):d===a?(o-s)/p+2:(s-a)/p+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(c*100+.5)),r&&n.length<4&&(n[3]=1),n},USr=function(e){var t=[],r=[],n=-1;return e.split(ow).forEach(function(s){var a=s.match(EZ)||[];t.push.apply(t,a),r.push(n+=a.length+1)}),t.c=r,t},HSr=function(e,t,r){var n="",s=(e+n).match(ow),a=t?"hsla(":"rgba(",o=0,l,u,c,d;if(!s)return e;if(s=s.map(function(h){return(h=WSr(h,t,1))&&a+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),r&&(c=USr(e),l=r.c,l.join(n)!==c.c.join(n)))for(u=e.replace(ow,"1").split(EZ),d=u.length-1;o<d;o++)n+=u[o]+(~l.indexOf(o)?s.shift()||a+"0,0,0,0)":(c.length?c:s.length?s:r).shift());if(!u)for(u=e.split(ow),d=u.length-1;o<d;o++)n+=u[o]+s[o];return n+u[d]},ow=(function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Vre)i+="|"+e+"\\b";return new RegExp(i+")","gi")})(),I5n=/hsl[a]?\(/,ZSr=function(e){var t=e.join(" "),r;if(ow.lastIndex=0,ow.test(t))return r=I5n.test(t),e[1]=HSr(e[1],r),e[0]=HSr(e[0],r,USr(e[1])),!0},Wre,gA=(function(){var i=Date.now,e=500,t=33,r=i(),n=r,s=1e3/240,a=s,o=[],l,u,c,d,h,p,g=function x(v){var y=i()-n,I=v===!0,S,T,E,B;if((y>e||y<0)&&(r+=y-t),n+=y,E=n-r,S=E-a,(S>0||I)&&(B=++d.frame,h=E-d.time*1e3,d.time=E=E/1e3,a+=S+(S>=s?4:s-S),T=1),I||(l=u(x)),T)for(p=0;p<o.length;p++)o[p](E,h,B,v)};return d={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(v){return h/(1e3/(v||60))},wake:function(){gSr&&(!Ktt&&Xtt()&&(w4=Ktt=window,Qtt=w4.document||{},dA.gsap=L3,(w4.gsapVersions||(w4.gsapVersions=[])).push(L3.version),mSr(Zxe||w4.GreenSockGlobals||!w4.gsap&&w4||{}),GSr.forEach(VSr)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),u=c||function(v){return setTimeout(v,a-d.time*1e3+1|0)},Wre=1,g(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),Wre=0,u=Mre},lagSmoothing:function(v,y){e=v||1/0,t=Math.min(y||33,e)},fps:function(v){s=1e3/(v||240),a=d.time*1e3+s},add:function(v,y,I){var S=y?function(T,E,B,P){v(T,E,B,P),d.remove(S)}:v;return d.remove(v),o[I?"unshift":"push"](S),PZ(),S},remove:function(v,y){~(y=o.indexOf(v))&&o.splice(y,1)&&p>=y&&p--},_listeners:o},d})(),PZ=function(){return!Wre&&gA.wake()},Wc={},_5n=/^[\d.\-M][\d.\-,\s]/,D5n=/["']/g,S5n=function(e){for(var t={},r=e.substr(1,e.length-3).split(":"),n=r[0],s=1,a=r.length,o,l,u;s<a;s++)l=r[s],o=s!==a-1?l.lastIndexOf(","):l.length,u=l.substr(0,o),t[n]=isNaN(u)?u.replace(D5n,"").trim():+u,n=l.substr(o+1).trim();return t},E5n=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},T5n=function(e){var t=(e+"").split("("),r=Wc[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[S5n(t[1])]:E5n(e).split(",").map(bSr)):Wc._CE&&_5n.test(e)?Wc._CE("",e):r},zSr=function(e){return function(t){return 1-e(1-t)}},XSr=function i(e,t){for(var r=e._first,n;r;)r instanceof hy?i(r,t):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==t&&(r.timeline?i(r.timeline,t):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=t)),r=r._next},$N=function(e,t){return e&&(H0(e)?e:Wc[e]||T5n(e))||t},eO=function(e,t,r,n){r===void 0&&(r=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:r,easeInOut:n},a;return N3(e,function(o){Wc[o]=dA[o]=s,Wc[a=o.toLowerCase()]=r;for(var l in s)Wc[a+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Wc[o+"."+l]=s[l]}),s},YSr=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},crt=function i(e,t,r){var n=t>=1?t:1,s=(r||(e?.3:.45))/(t<1?t:1),a=s/Ztt*(Math.asin(1/n)||0),o=function(c){return c===1?1:n*Math.pow(2,-10*c)*r5n((c-a)*s)+1},l=e==="out"?o:e==="in"?function(u){return 1-o(1-u)}:YSr(o);return s=Ztt/s,l.config=function(u,c){return i(e,u,c)},l},drt=function i(e,t){t===void 0&&(t=1.70158);var r=function(a){return a?--a*a*((t+1)*a+t)+1:0},n=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:YSr(r);return n.config=function(s){return i(e,s)},n};N3("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;eO(i+",Power"+(t-1),e?function(r){return Math.pow(r,t)}:function(r){return r},function(r){return 1-Math.pow(1-r,t)},function(r){return r<.5?Math.pow(r*2,t)/2:1-Math.pow((1-r)*2,t)/2})}),Wc.Linear.easeNone=Wc.none=Wc.Linear.easeIn,eO("Elastic",crt("in"),crt("out"),crt()),(function(i,e){var t=1/e,r=2*t,n=2.5*t,s=function(o){return o<t?i*o*o:o<r?i*Math.pow(o-1.5/e,2)+.75:o<n?i*(o-=2.25/e)*o+.9375:i*Math.pow(o-2.625/e,2)+.984375};eO("Bounce",function(a){return 1-s(1-a)},s)})(7.5625,2.75),eO("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)}),eO("Circ",function(i){return-(cSr(1-i*i)-1)}),eO("Sine",function(i){return i===1?1:-t5n(i*$8n)+1}),eO("Back",drt("in"),drt("out"),drt()),Wc.SteppedEase=Wc.steps=dA.SteppedEase={config:function(e,t){e===void 0&&(e=1);var r=1/e,n=e+(t?0:1),s=t?1:0,a=1-af;return function(o){return((n*Lre(0,a,o)|0)+s)*r}}},SZ.ease=Wc["quad.out"],N3("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return trt+=i+","+i+"Params,"});var jSr=function(e,t){this.id=e5n++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:CSr,this.set=t?t.getSetter:mrt},Ure=(function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,FZ(this,+t.duration,1,1),this.data=t.data,Rp&&(this._ctx=Rp,Rp.data.push(this)),Wre||gA.wake()}var e=i.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,FZ(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,n){if(PZ(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(qxe(this,r),!s._dp||s.parent||ESr(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&F4(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===af||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),ASr(this,r,n)),this},e.time=function(r,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+SSr(this))%(this._dur+this._rDelay)||(r?this._dur:0),n):this._time},e.totalProgress=function(r,n){return arguments.length?this.totalTime(this.totalDuration()*r,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+SSr(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,n){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,n):this._repeat?wZ(this._tTime,s)+1:1},e.timeScale=function(r,n){if(!arguments.length)return this._rts===-af?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Qxe(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-af?0:this._rts,this.totalTime(Lre(-Math.abs(this._delay),this.totalDuration(),s),n!==!1),Jxe(this),u5n(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(PZ(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==af&&(this._tTime-=af)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=r;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&F4(n,this,r-this._delay),this}return this._start},e.endTime=function(r){return this._start+(M3(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var n=this.parent||this._dp;return n?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Qxe(n.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=s5n);var n=O2;return O2=r,irt(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),O2=n,this},e.globalTime=function(r){for(var n=this,s=arguments.length?r:n.rawTime();n;)s=n._start+s/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,wSr(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var n=this._time;return this._rDelay=r,wSr(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,n){return this.totalTime(hI(this,r),M3(n))},e.restart=function(r,n){return this.play().totalTime(r?-this._delay:0,M3(n)),this._dur||(this._zTime=-af),this},e.play=function(r,n){return r!=null&&this.seek(r,n),this.reversed(!1).paused(!1)},e.reverse=function(r,n){return r!=null&&this.seek(r||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(r,n){return r!=null&&this.seek(r,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-af:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-af,this},e.isActive=function(){var r=this.parent||this._dp,n=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=n&&s<this.endTime(!0)-af)},e.eventCallback=function(r,n,s){var a=this.vars;return arguments.length>1?(n?(a[r]=n,s&&(a[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=n)):delete a[r],this):a[r]},e.then=function(r){var n=this;return new Promise(function(s){var a=H0(r)?r:ISr,o=function(){var u=n.then;n.then=null,H0(a)&&(a=a(n))&&(a.then||a===n)&&(n.then=u),s(a),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){Gre(this)},i})();fA(Ure.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-af,_prom:0,_ps:!1,_rts:1});var hy=(function(i){uSr(e,i);function e(r,n){var s;return r===void 0&&(r={}),s=i.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=M3(r.sortChildren),l0&&F4(r.parent||l0,U9(s),n),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&TSr(U9(s),r.scrollTrigger),s}var t=e.prototype;return t.to=function(n,s,a){return Ore(0,arguments,this),this},t.from=function(n,s,a){return Ore(1,arguments,this),this},t.fromTo=function(n,s,a,o){return Ore(2,arguments,this),this},t.set=function(n,s,a){return s.duration=0,s.parent=this,Nre(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new jg(n,s,hI(this,a),1),this},t.call=function(n,s,a){return F4(this,jg.delayedCall(0,n,s),a)},t.staggerTo=function(n,s,a,o,l,u,c){return a.duration=s,a.stagger=a.stagger||o,a.onComplete=u,a.onCompleteParams=c,a.parent=this,new jg(n,a,hI(this,l)),this},t.staggerFrom=function(n,s,a,o,l,u,c){return a.runBackwards=1,Nre(a).immediateRender=M3(a.immediateRender),this.staggerTo(n,s,a,o,l,u,c)},t.staggerFromTo=function(n,s,a,o,l,u,c,d){return o.startAt=a,Nre(o).immediateRender=M3(o.immediateRender),this.staggerTo(n,s,o,l,u,c,d)},t.render=function(n,s,a){var o=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=n<=0?0:Yg(n),d=this._zTime<0!=n<0&&(this._initted||!u),h,p,g,x,v,y,I,S,T,E,B,P;if(this!==l0&&c>l&&n>=0&&(c=l),c!==this._tTime||a||d){if(o!==this._time&&u&&(c+=this._time-o,n+=this._time-o),h=c,T=this._start,S=this._ts,y=!S,d&&(u||(o=this._zTime),(n||!s)&&(this._zTime=n)),this._repeat){if(B=this._yoyo,v=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(v*100+n,s,a);if(h=Yg(c%v),c===l?(x=this._repeat,h=u):(E=Yg(c/v),x=~~E,x&&x===E&&(h=u,x--),h>u&&(h=u)),E=wZ(this._tTime,v),!o&&this._tTime&&E!==x&&this._tTime-E*v-this._dur<=0&&(E=x),B&&x&1&&(h=u-h,P=1),x!==E&&!this._lock){var M=B&&E&1,O=M===(B&&x&1);if(x<E&&(M=!M),o=M?0:c%u?u:c,this._lock=1,this.render(o||(P?0:Yg(x*v)),s,!u)._lock=0,this._tTime=c,!s&&this.parent&&pA(this,"onRepeat"),this.vars.repeatRefresh&&!P&&(this.invalidate()._lock=1),o&&o!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,O&&(this._lock=2,o=M?u:-1e-4,this.render(o,!0),this.vars.repeatRefresh&&!P&&this.invalidate()),this._lock=0,!this._ts&&!y)return this;XSr(this,P)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(I=f5n(this,Yg(o),Yg(h)),I&&(c-=h-(h=I._start))),this._tTime=c,this._time=h,this._act=!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&c&&!s&&!E&&(pA(this,"onStart"),this._tTime!==c))return this;if(h>=o&&n>=0)for(p=this._first;p;){if(g=p._next,(p._act||h>=p._start)&&p._ts&&I!==p){if(p.parent!==this)return this.render(n,s,a);if(p.render(p._ts>0?(h-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(h-p._start)*p._ts,s,a),h!==this._time||!this._ts&&!y){I=0,g&&(c+=this._zTime=-af);break}}p=g}else{p=this._last;for(var k=n<0?n:h;p;){if(g=p._prev,(p._act||k<=p._end)&&p._ts&&I!==p){if(p.parent!==this)return this.render(n,s,a);if(p.render(p._ts>0?(k-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(k-p._start)*p._ts,s,a||O2&&irt(p)),h!==this._time||!this._ts&&!y){I=0,g&&(c+=this._zTime=k?-af:af);break}}p=g}}if(I&&!s&&(this.pause(),I.render(h>=o?0:-af)._zTime=h>=o?1:-1,this._ts))return this._start=T,Jxe(this),this.render(n,s,a);this._onUpdate&&!s&&pA(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(T===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&sw(this,1),!s&&!(n<0&&!o)&&(c||o||!l)&&(pA(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,s){var a=this;if(H9(s)||(s=hI(this,s,n)),!(n instanceof Ure)){if(jx(n))return n.forEach(function(o){return a.add(o,s)}),this;if(Sm(n))return this.addLabel(n,s);if(H0(n))n=jg.delayedCall(0,n);else return this}return this!==n?F4(this,n,s):this},t.getChildren=function(n,s,a,o){n===void 0&&(n=!0),s===void 0&&(s=!0),a===void 0&&(a=!0),o===void 0&&(o=-dI);for(var l=[],u=this._first;u;)u._start>=o&&(u instanceof jg?s&&l.push(u):(a&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,s,a)))),u=u._next;return l},t.getById=function(n){for(var s=this.getChildren(1,1,1),a=s.length;a--;)if(s[a].vars.id===n)return s[a]},t.remove=function(n){return Sm(n)?this.removeLabel(n):H0(n)?this.killTweensOf(n):(n.parent===this&&Kxe(this,n),n===this._recent&&(this._recent=this._last),qN(this))},t.totalTime=function(n,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Yg(gA.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,s),this._forcing=0,this):this._tTime},t.addLabel=function(n,s){return this.labels[n]=hI(this,s),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,s,a){var o=jg.delayedCall(0,s||Mre,a);return o.data="isPause",this._hasPause=1,F4(this,o,hI(this,n))},t.removePause=function(n){var s=this._first;for(n=hI(this,n);s;)s._start===n&&s.data==="isPause"&&sw(s),s=s._next},t.killTweensOf=function(n,s,a){for(var o=this.getTweensOf(n,a),l=o.length;l--;)lw!==o[l]&&o[l].kill(n,s);return this},t.getTweensOf=function(n,s){for(var a=[],o=fI(n),l=this._first,u=H9(s),c;l;)l instanceof jg?a5n(l._targets,o)&&(u?(!lw||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&a.push(l):(c=l.getTweensOf(o,s)).length&&a.push.apply(a,c),l=l._next;return a},t.tweenTo=function(n,s){s=s||{};var a=this,o=hI(a,n),l=s,u=l.startAt,c=l.onStart,d=l.onStartParams,h=l.immediateRender,p,g=jg.to(a,fA({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:s.duration||Math.abs((o-(u&&"time"in u?u.time:a._time))/a.timeScale())||af,onStart:function(){if(a.pause(),!p){var v=s.duration||Math.abs((o-(u&&"time"in u?u.time:a._time))/a.timeScale());g._dur!==v&&FZ(g,v,0,1).render(g._time,!0,!0),p=1}c&&c.apply(g,d||[])}},s));return h?g.render(0):g},t.tweenFromTo=function(n,s,a){return this.tweenTo(s,fA({startAt:{time:hI(this,n)}},a))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),kSr(this,hI(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),kSr(this,hI(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+af)},t.shiftChildren=function(n,s,a){a===void 0&&(a=0);for(var o=this._first,l=this.labels,u;o;)o._start>=a&&(o._start+=n,o._end+=n),o=o._next;if(s)for(u in l)l[u]>=a&&(l[u]+=n);return qN(this)},t.invalidate=function(n){var s=this._first;for(this._lock=0;s;)s.invalidate(n),s=s._next;return i.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var s=this._first,a;s;)a=s._next,this.remove(s),s=a;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),qN(this)},t.totalDuration=function(n){var s=0,a=this,o=a._last,l=dI,u,c,d;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-n:n));if(a._dirty){for(d=a.parent;o;)u=o._prev,o._dirty&&o.totalDuration(),c=o._start,c>l&&a._sort&&o._ts&&!a._lock?(a._lock=1,F4(a,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(s-=c,(!d&&!a._dp||d&&d.smoothChildTiming)&&(a._start+=c/a._ts,a._time-=c,a._tTime-=c),a.shiftChildren(-c,!1,-1/0),l=0),o._end>s&&o._ts&&(s=o._end),o=u;FZ(a,a===l0&&a._time>s?a._time:s,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(n){if(l0._ts&&(ASr(l0,Qxe(n,l0)),vSr=gA.frame),gA.frame>=ySr){ySr+=cA.autoSleep||120;var s=l0._first;if((!s||!s._ts)&&cA.autoSleep&&gA._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||gA.sleep()}}},e})(Ure);fA(hy.prototype,{_lock:0,_hasPause:0,_forcing:0});var R5n=function(e,t,r,n,s,a,o){var l=new O3(this._pt,e,t,0,1,eEr,null,s),u=0,c=0,d,h,p,g,x,v,y,I;for(l.b=r,l.e=n,r+="",n+="",(y=~n.indexOf("random("))&&(n=kre(n)),a&&(I=[r,n],a(I,e,t),r=I[0],n=I[1]),h=r.match(jtt)||[];d=jtt.exec(n);)g=d[0],x=n.substring(u,d.index),p?p=(p+1)%5:x.substr(-5)==="rgba("&&(p=1),g!==h[c++]&&(v=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:x||c===1?x:",",s:v,c:g.charAt(1)==="="?TZ(v,g)-v:parseFloat(g)-v,m:p&&p<4?Math.round:0},u=jtt.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=o,(fSr.test(n)||y)&&(l.e=0),this._pt=l,l},hrt=function(e,t,r,n,s,a,o,l,u,c){H0(n)&&(n=n(s||0,e,a));var d=e[t],h=r!=="get"?r:H0(d)?u?e[t.indexOf("set")||!H0(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():d,p=H0(d)?u?M5n:qSr:grt,g;if(Sm(n)&&(~n.indexOf("random(")&&(n=kre(n)),n.charAt(1)==="="&&(g=TZ(h,n)+(Kx(h)||0),(g||g===0)&&(n=g))),!c||h!==n||frt)return!isNaN(h*n)&&n!==""?(g=new O3(this._pt,e,t,+h||0,n-(h||0),typeof d=="boolean"?O5n:$Sr,0,p),u&&(g.fp=u),o&&g.modifier(o,this,e),this._pt=g):(!d&&!(t in e)&&Jtt(t,n),R5n.call(this,e,t,h,n,p,l||cA.stringFilter,u))},w5n=function(e,t,r,n,s){if(H0(e)&&(e=Hre(e,s,t,r,n)),!R4(e)||e.style&&e.nodeType||jx(e)||dSr(e))return Sm(e)?Hre(e,s,t,r,n):e;var a={},o;for(o in e)a[o]=Hre(e[o],s,t,r,n);return a},KSr=function(e,t,r,n,s,a){var o,l,u,c;if(hA[e]&&(o=new hA[e]).init(s,o.rawVars?t[e]:w5n(t[e],n,s,a,r),r,n,a)!==!1&&(r._pt=l=new O3(r._pt,s,e,0,1,o.render,o,0,o.priority),r!==BZ))for(u=r._ptLookup[r._targets.indexOf(s)],c=o._props.length;c--;)u[o._props[c]]=l;return o},lw,frt,prt=function i(e,t,r){var n=e.vars,s=n.ease,a=n.startAt,o=n.immediateRender,l=n.lazy,u=n.onUpdate,c=n.runBackwards,d=n.yoyoEase,h=n.keyframes,p=n.autoRevert,g=e._dur,x=e._startAt,v=e._targets,y=e.parent,I=y&&y.data==="nested"?y.vars.targets:v,S=e._overwrite==="auto"&&!Htt,T=e.timeline,E,B,P,M,O,k,V,U,z,Z,j,K,J;if(T&&(!h||!s)&&(s="none"),e._ease=$N(s,SZ.ease),e._yEase=d?zSr($N(d===!0?s:d,SZ.ease)):0,d&&e._yoyo&&!e._repeat&&(d=e._yEase,e._yEase=e._ease,e._ease=d),e._from=!T&&!!n.runBackwards,!T||h&&!n.stagger){if(U=v[0]?JN(v[0]).harness:0,K=U&&n[U.prop],E=jxe(n,qtt),x&&(x._zTime<0&&x.progress(1),t<0&&c&&o&&!p?x.render(-1,!0):x.revert(c&&g?zxe:n5n),x._lazy=0),a){if(sw(e._startAt=jg.set(v,fA({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!x&&M3(l),startAt:null,delay:0,onUpdate:u&&function(){return pA(e,"onUpdate")},stagger:0},a))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(O2||!o&&!p)&&e._startAt.revert(zxe),o&&g&&t<=0&&r<=0){t&&(e._zTime=t);return}}else if(c&&g&&!x){if(t&&(o=!1),P=fA({overwrite:!1,data:"isFromStart",lazy:o&&!x&&M3(l),immediateRender:o,stagger:0,parent:y},E),K&&(P[U.prop]=K),sw(e._startAt=jg.set(v,P)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(O2?e._startAt.revert(zxe):e._startAt.render(-1,!0)),e._zTime=t,!o)i(e._startAt,af,af);else if(!t)return}for(e._pt=e._ptCache=0,l=g&&M3(l)||l&&!g,B=0;B<v.length;B++){if(O=v[B],V=O._gsap||rrt(v)[B]._gsap,e._ptLookup[B]=Z={},$tt[V.id]&&nw.length&&Yxe(),j=I===v?B:I.indexOf(O),U&&(z=new U).init(O,K||E,e,j,I)!==!1&&(e._pt=M=new O3(e._pt,O,z.name,0,1,z.render,z,0,z.priority),z._props.forEach(function(q){Z[q]=M}),z.priority&&(k=1)),!U||K)for(P in E)hA[P]&&(z=KSr(P,E,e,j,O,I))?z.priority&&(k=1):Z[P]=M=hrt.call(e,O,P,"get",E[P],j,I,0,n.stringFilter);e._op&&e._op[B]&&e.kill(O,e._op[B]),S&&e._pt&&(lw=e,l0.killTweensOf(O,Z,e.globalTime(t)),J=!e.parent,lw=0),e._pt&&l&&($tt[V.id]=1)}k&&tEr(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!J,h&&t<=0&&T.render(dI,!0,!0)},F5n=function(e,t,r,n,s,a,o,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,d,h,p;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,p=e._targets.length;p--;){if(c=h[p][t],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return frt=1,e.vars[t]="+=0",prt(e,o),frt=0,l?Pre(t+" not eligible for reset"):1;u.push(c)}for(p=u.length;p--;)d=u[p],c=d._pt||d,c.s=(n||n===0)&&!s?n:c.s+(n||0)+a*c.c,c.c=r-c.s,d.e&&(d.e=vg(r)+Kx(d.e)),d.b&&(d.b=c.s+Kx(d.b))},B5n=function(e,t){var r=e[0]?JN(e[0]).harness:0,n=r&&r.aliases,s,a,o,l;if(!n)return t;s=RZ({},t);for(a in n)if(a in s)for(l=n[a].split(","),o=l.length;o--;)s[l[o]]=s[a];return s},P5n=function(e,t,r,n){var s=t.ease||n||"power1.inOut",a,o;if(jx(t))o=r[e]||(r[e]=[]),t.forEach(function(l,u){return o.push({t:u/(t.length-1)*100,v:l,e:s})});else for(a in t)o=r[a]||(r[a]=[]),a==="ease"||o.push({t:parseFloat(e),v:t[a],e:s})},Hre=function(e,t,r,n,s){return H0(e)?e.call(t,r,n,s):Sm(e)&&~e.indexOf("random(")?kre(e):e},QSr=trt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",JSr={};N3(QSr+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return JSr[i]=1});var jg=(function(i){uSr(e,i);function e(r,n,s,a){var o;typeof n=="number"&&(s.duration=n,n=s,s=null),o=i.call(this,a?n:Nre(n))||this;var l=o.vars,u=l.duration,c=l.delay,d=l.immediateRender,h=l.stagger,p=l.overwrite,g=l.keyframes,x=l.defaults,v=l.scrollTrigger,y=l.yoyoEase,I=n.parent||l0,S=(jx(r)||dSr(r)?H9(r[0]):"length"in n)?[r]:fI(r),T,E,B,P,M,O,k,V;if(o._targets=S.length?rrt(S):Pre("GSAP target "+r+" not found. https://gsap.com",!cA.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=p,g||h||Hxe(u)||Hxe(c)){if(n=o.vars,T=o.timeline=new hy({data:"nested",defaults:x||{},targets:I&&I.data==="nested"?I.vars.targets:S}),T.kill(),T.parent=T._dp=U9(o),T._start=0,h||Hxe(u)||Hxe(c)){if(P=S.length,k=h&&PSr(h),R4(h))for(M in h)~QSr.indexOf(M)&&(V||(V={}),V[M]=h[M]);for(E=0;E<P;E++)B=jxe(n,JSr),B.stagger=0,y&&(B.yoyoEase=y),V&&RZ(B,V),O=S[E],B.duration=+Hre(u,U9(o),E,O,S),B.delay=(+Hre(c,U9(o),E,O,S)||0)-o._delay,!h&&P===1&&B.delay&&(o._delay=c=B.delay,o._start+=c,B.delay=0),T.to(O,B,k?k(E,O,S):0),T._ease=Wc.none;T.duration()?u=c=0:o.timeline=0}else if(g){Nre(fA(T.vars.defaults,{ease:"none"})),T._ease=$N(g.ease||n.ease||"none");var U=0,z,Z,j;if(jx(g))g.forEach(function(K){return T.to(S,K,">")}),T.duration();else{B={};for(M in g)M==="ease"||M==="easeEach"||P5n(M,g[M],B,g.easeEach);for(M in B)for(z=B[M].sort(function(K,J){return K.t-J.t}),U=0,E=0;E<z.length;E++)Z=z[E],j={ease:Z.e,duration:(Z.t-(E?z[E-1].t:0))/100*u},j[M]=Z.v,T.to(S,j,U),U+=j.duration;T.duration()<u&&T.to({},{duration:u-T.duration()})}}u||o.duration(u=T.duration())}else o.timeline=0;return p===!0&&!Htt&&(lw=U9(o),l0.killTweensOf(S),lw=0),F4(I,U9(o),s),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(d||!u&&!g&&o._start===Yg(I._time)&&M3(d)&&c5n(U9(o))&&I.data!=="nested")&&(o._tTime=-af,o.render(Math.max(0,-c)||0)),v&&TSr(U9(o),v),o}var t=e.prototype;return t.render=function(n,s,a){var o=this._time,l=this._tDur,u=this._dur,c=n<0,d=n>l-af&&!c?l:n<af?0:n,h,p,g,x,v,y,I,S,T;if(!u)h5n(this,n,s,a);else if(d!==this._tTime||!n||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(h=d,S=this.timeline,this._repeat){if(x=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(x*100+n,s,a);if(h=Yg(d%x),d===l?(g=this._repeat,h=u):(v=Yg(d/x),g=~~v,g&&g===v?(h=u,g--):h>u&&(h=u)),y=this._yoyo&&g&1,y&&(T=this._yEase,h=u-h),v=wZ(this._tTime,x),h===o&&!a&&this._initted&&g===v)return this._tTime=d,this;g!==v&&(S&&this._yEase&&XSr(S,y),this.vars.repeatRefresh&&!y&&!this._lock&&h!==x&&this._initted&&(this._lock=a=1,this.render(Yg(x*g),!0).invalidate()._lock=0))}if(!this._initted){if(RSr(this,c?n:h,a,s,d))return this._tTime=0,this;if(o!==this._time&&!(a&&this.vars.repeatRefresh&&g!==v))return this;if(u!==this._dur)return this.render(n,s,a)}if(this._tTime=d,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=I=(T||this._ease)(h/u),this._from&&(this.ratio=I=1-I),!o&&d&&!s&&!v&&(pA(this,"onStart"),this._tTime!==d))return this;for(p=this._pt;p;)p.r(I,p.d),p=p._next;S&&S.render(n<0?n:S._dur*S._ease(h/this._dur),s,a)||this._startAt&&(this._zTime=n),this._onUpdate&&!s&&(c&&nrt(this,n,s,a),pA(this,"onUpdate")),this._repeat&&g!==v&&this.vars.onRepeat&&!s&&this.parent&&pA(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(c&&!this._onUpdate&&nrt(this,n,!0,!0),(n||!u)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&sw(this,1),!s&&!(c&&!o)&&(d||o||y)&&(pA(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},t.resetTo=function(n,s,a,o,l){Wre||gA.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||prt(this,u),c=this._ease(u/this._dur),F5n(this,n,s,a,o,c,u,l)?this.resetTo(n,s,a,o,1):(qxe(this,0),this.parent||DSr(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,s){if(s===void 0&&(s="all"),!n&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?Gre(this):this.scrollTrigger&&this.scrollTrigger.kill(!!O2),this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(n,s,lw&&lw.vars.overwrite!==!0)._first||Gre(this),this.parent&&a!==this.timeline.totalDuration()&&FZ(this,this._dur*this.timeline._tDur/a,0,1),this}var o=this._targets,l=n?fI(n):o,u=this._ptLookup,c=this._pt,d,h,p,g,x,v,y;if((!s||s==="all")&&l5n(o,l))return s==="all"&&(this._pt=0),Gre(this);for(d=this._op=this._op||[],s!=="all"&&(Sm(s)&&(x={},N3(s,function(I){return x[I]=1}),s=x),s=B5n(o,s)),y=o.length;y--;)if(~l.indexOf(o[y])){h=u[y],s==="all"?(d[y]=s,g=h,p={}):(p=d[y]=d[y]||{},g=s);for(x in g)v=h&&h[x],v&&((!("kill"in v.d)||v.d.kill(x)===!0)&&Kxe(this,v,"_pt"),delete h[x]),p!=="all"&&(p[x]=1)}return this._initted&&!this._pt&&c&&Gre(this),this},e.to=function(n,s){return new e(n,s,arguments[2])},e.from=function(n,s){return Ore(1,arguments)},e.delayedCall=function(n,s,a,o){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:s,onReverseComplete:s,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:o})},e.fromTo=function(n,s,a){return Ore(2,arguments)},e.set=function(n,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(n,s)},e.killTweensOf=function(n,s,a){return l0.killTweensOf(n,s,a)},e})(Ure);fA(jg.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),N3("staggerTo,staggerFrom,staggerFromTo",function(i){jg[i]=function(){var e=new hy,t=art.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var grt=function(e,t,r){return e[t]=r},qSr=function(e,t,r){return e[t](r)},M5n=function(e,t,r,n){return e[t](n.fp,r)},N5n=function(e,t,r){return e.setAttribute(t,r)},mrt=function(e,t){return H0(e[t])?qSr:ztt(e[t])&&e.setAttribute?N5n:grt},$Sr=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},O5n=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},eEr=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},xrt=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},L5n=function(e,t,r,n){for(var s=this._pt,a;s;)a=s._next,s.p===n&&s.modifier(e,t,r),s=a},k5n=function(e){for(var t=this._pt,r,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?Kxe(this,t,"_pt"):t.dep||(r=1),t=n;return!r},G5n=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},tEr=function(e){for(var t=e._pt,r,n,s,a;t;){for(r=t._next,n=s;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:a)?t._prev._next=t:s=t,(t._next=n)?n._prev=t:a=t,t=r}e._pt=s},O3=(function(){function i(t,r,n,s,a,o,l,u,c){this.t=r,this.s=s,this.c=a,this.p=n,this.r=o||$Sr,this.d=l||this,this.set=u||grt,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(r,n,s){this.mSet=this.mSet||this.set,this.set=G5n,this.m=r,this.mt=s,this.tween=n},i})();N3(trt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return qtt[i]=1}),dA.TweenMax=dA.TweenLite=jg,dA.TimelineLite=dA.TimelineMax=hy,l0=new hy({sortChildren:!1,defaults:SZ,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),cA.stringFilter=ZSr;var tO=[],$xe={},V5n=[],rEr=0,W5n=0,vrt=function(e){return($xe[e]||V5n).map(function(t){return t()})},yrt=function(){var e=Date.now(),t=[];e-rEr>2&&(vrt("matchMediaInit"),tO.forEach(function(r){var n=r.queries,s=r.conditions,a,o,l,u;for(o in n)a=w4.matchMedia(n[o]).matches,a&&(l=1),a!==s[o]&&(s[o]=a,u=1);u&&(r.revert(),l&&t.push(r))}),vrt("matchMediaRevert"),t.forEach(function(r){return r.onMatch(r,function(n){return r.add(null,n)})}),rEr=e,vrt("matchMedia"))},iEr=(function(){function i(t,r){this.selector=r&&ort(r),this.data=[],this._r=[],this.isReverted=!1,this.id=W5n++,t&&this.add(t)}var e=i.prototype;return e.add=function(r,n,s){H0(r)&&(s=n,n=r,r=H0);var a=this,o=function(){var u=Rp,c=a.selector,d;return u&&u!==a&&u.data.push(a),s&&(a.selector=ort(s)),Rp=a,d=n.apply(a,arguments),H0(d)&&a._r.push(d),Rp=u,a.selector=c,a.isReverted=!1,d};return a.last=o,r===H0?o(a,function(l){return a.add(null,l)}):r?a[r]=o:o},e.ignore=function(r){var n=Rp;Rp=null,r(this),Rp=n},e.getTweens=function(){var r=[];return this.data.forEach(function(n){return n instanceof i?r.push.apply(r,n.getTweens()):n instanceof jg&&!(n.parent&&n.parent.data==="nested")&&r.push(n)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,n){var s=this;if(r?(function(){for(var o=s.getTweens(),l=s.data.length,u;l--;)u=s.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return o.splice(o.indexOf(c),1)}));for(o.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,d){return d.g-c.g||-1/0}).forEach(function(c){return c.t.revert(r)}),l=s.data.length;l--;)u=s.data[l],u instanceof hy?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof jg)&&u.revert&&u.revert(r);s._r.forEach(function(c){return c(r,s)}),s.isReverted=!0})():this.data.forEach(function(o){return o.kill&&o.kill()}),this.clear(),n)for(var a=tO.length;a--;)tO[a].id===this.id&&tO.splice(a,1)},e.revert=function(r){this.kill(r||{})},i})(),U5n=(function(){function i(t){this.contexts=[],this.scope=t,Rp&&Rp.data.push(this)}var e=i.prototype;return e.add=function(r,n,s){R4(r)||(r={matches:r});var a=new iEr(0,s||this.scope),o=a.conditions={},l,u,c;Rp&&!a.selector&&(a.selector=Rp.selector),this.contexts.push(a),n=a.add("onMatch",n),a.queries=r;for(u in r)u==="all"?c=1:(l=w4.matchMedia(r[u]),l&&(tO.indexOf(a)<0&&tO.push(a),(o[u]=l.matches)&&(c=1),l.addListener?l.addListener(yrt):l.addEventListener("change",yrt)));return c&&n(a,function(d){return a.add(null,d)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(n){return n.kill(r,!0)})},i})(),eve={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach(function(n){return VSr(n)})},timeline:function(e){return new hy(e)},getTweensOf:function(e,t){return l0.getTweensOf(e,t)},getProperty:function(e,t,r,n){Sm(e)&&(e=fI(e)[0]);var s=JN(e||{}).get,a=r?ISr:bSr;return r==="native"&&(r=""),e&&(t?a((hA[t]&&hA[t].get||s)(e,t,r,n)):function(o,l,u){return a((hA[o]&&hA[o].get||s)(e,o,l,u))})},quickSetter:function(e,t,r){if(e=fI(e),e.length>1){var n=e.map(function(c){return L3.quickSetter(c,t,r)}),s=n.length;return function(c){for(var d=s;d--;)n[d](c)}}e=e[0]||{};var a=hA[t],o=JN(e),l=o.harness&&(o.harness.aliases||{})[t]||t,u=a?function(c){var d=new a;BZ._pt=0,d.init(e,r?c+r:c,BZ,0,[e]),d.render(1,d),BZ._pt&&xrt(1,BZ)}:o.set(e,l);return a?u:function(c){return u(e,l,r?c+r:c,o,1)}},quickTo:function(e,t,r){var n,s=L3.to(e,fA((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),r||{})),a=function(l,u,c){return s.resetTo(t,l,u,c)};return a.tween=s,a},isTweening:function(e){return l0.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=$N(e.ease,SZ.ease)),_Sr(SZ,e||{})},config:function(e){return _Sr(cA,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,s=e.defaults,a=e.extendTimeline;(n||"").split(",").forEach(function(o){return o&&!hA[o]&&!dA[o]&&Pre(t+" effect requires "+o+" plugin.")}),ert[t]=function(o,l,u){return r(fI(o),fA(l||{},s),u)},a&&(hy.prototype[t]=function(o,l,u){return this.add(ert[t](o,R4(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){Wc[e]=$N(t)},parseEase:function(e,t){return arguments.length?$N(e,t):Wc},getById:function(e){return l0.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var r=new hy(e),n,s;for(r.smoothChildTiming=M3(e.smoothChildTiming),l0.remove(r),r._dp=0,r._time=r._tTime=l0._time,n=l0._first;n;)s=n._next,(t||!(!n._dur&&n instanceof jg&&n.vars.onComplete===n._targets[0]))&&F4(r,n,n._start-n._delay),n=s;return F4(l0,r,0),r},context:function(e,t){return e?new iEr(e,t):Rp},matchMedia:function(e){return new U5n(e)},matchMediaRefresh:function(){return tO.forEach(function(e){var t=e.conditions,r,n;for(n in t)t[n]&&(t[n]=!1,r=1);r&&e.revert()})||yrt()},addEventListener:function(e,t){var r=$xe[e]||($xe[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=$xe[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:C5n,wrapYoyo:A5n,distribute:PSr,random:NSr,snap:MSr,normalize:y5n,getUnit:Kx,clamp:g5n,splitColor:WSr,toArray:fI,selector:ort,mapRange:LSr,pipe:x5n,unitize:v5n,interpolate:b5n,shuffle:BSr},install:mSr,effects:ert,ticker:gA,updateRoot:hy.updateRoot,plugins:hA,globalTimeline:l0,core:{PropTween:O3,globals:xSr,Tween:jg,Timeline:hy,Animation:Ure,getCache:JN,_removeLinkedListItem:Kxe,reverting:function(){return O2},context:function(e){return e&&Rp&&(Rp.data.push(e),e._ctx=Rp),Rp},suppressOverwrites:function(e){return Htt=e}}};N3("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return eve[i]=jg[i]}),gA.add(hy.updateRoot),BZ=eve.to({},{duration:0});var H5n=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},Z5n=function(e,t){var r=e._targets,n,s,a;for(n in t)for(s=r.length;s--;)a=e._ptLookup[s][n],a&&(a=a.d)&&(a._pt&&(a=H5n(a,n)),a&&a.modifier&&a.modifier(t[n],e,r[s],n))},Crt=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,s,a){a._onInit=function(o){var l,u;if(Sm(s)&&(l={},N3(s,function(c){return l[c]=1}),s=l),t){l={};for(u in s)l[u]=t(s[u]);s=l}Z5n(o,s)}}}},L3=eve.registerPlugin({name:"attr",init:function(e,t,r,n,s){var a,o,l;this.tween=r;for(a in t)l=e.getAttribute(a)||"",o=this.add(e,"setAttribute",(l||0)+"",t[a],n,s,0,0,a),o.op=a,o.b=l,this._props.push(a)},render:function(e,t){for(var r=t._pt;r;)O2?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},Crt("roundProps",lrt),Crt("modifiers"),Crt("snap",MSr))||eve;jg.version=hy.version=L3.version="3.13.0",gSr=1,Xtt()&&PZ(),Wc.Power0,Wc.Power1,Wc.Power2,Wc.Power3,Wc.Power4,Wc.Linear,Wc.Quad,Wc.Cubic,Wc.Quart,Wc.Quint,Wc.Strong,Wc.Elastic,Wc.Back,Wc.SteppedEase,Wc.Bounce,Wc.Sine,Wc.Expo,Wc.Circ;var nEr,uw,MZ,Art,rO,sEr,brt,z5n=function(){return typeof window<"u"},Z9={},iO=180/Math.PI,NZ=Math.PI/180,OZ=Math.atan2,aEr=1e8,Irt=/([A-Z])/g,X5n=/(left|right|width|margin|padding|x)/i,Y5n=/[\s,\(]\S/,B4={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_rt=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},j5n=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},K5n=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Q5n=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},oEr=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},lEr=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},J5n=function(e,t,r){return e.style[t]=r},q5n=function(e,t,r){return e.style.setProperty(t,r)},$5n=function(e,t,r){return e._gsap[t]=r},e9n=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},t9n=function(e,t,r,n,s){var a=e._gsap;a.scaleX=a.scaleY=r,a.renderTransform(s,a)},r9n=function(e,t,r,n,s){var a=e._gsap;a[t]=r,a.renderTransform(s,a)},u0="transform",k3=u0+"Origin",i9n=function i(e,t){var r=this,n=this.target,s=n.style,a=n._gsap;if(e in Z9&&s){if(this.tfm=this.tfm||{},e!=="transform")e=B4[e]||e,~e.indexOf(",")?e.split(",").forEach(function(o){return r.tfm[o]=z9(n,o)}):this.tfm[e]=a.x?a[e]:z9(n,e),e===k3&&(this.tfm.zOrigin=a.zOrigin);else return B4.transform.split(",").forEach(function(o){return i.call(r,o,t)});if(this.props.indexOf(u0)>=0)return;a.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(k3,t,"")),e=u0}(s||t)&&this.props.push(e,t,s[e])},uEr=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},n9n=function(){var e=this.props,t=this.target,r=t.style,n=t._gsap,s,a;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?t[e[s]](e[s+2]):t[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(Irt,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)n[a]=this.tfm[a];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=brt(),(!s||!s.isStart)&&!r[u0]&&(uEr(r),n.zOrigin&&r[k3]&&(r[k3]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},cEr=function(e,t){var r={target:e,props:[],revert:n9n,save:i9n};return e._gsap||L3.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return r.save(n)}),r},dEr,Drt=function(e,t){var r=uw.createElementNS?uw.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):uw.createElement(e);return r&&r.style?r:uw.createElement(e)},pI=function i(e,t,r){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Irt,"-$1").toLowerCase())||n.getPropertyValue(t)||!r&&i(e,LZ(t)||t,1)||""},hEr="O,Moz,ms,Ms,Webkit".split(","),LZ=function(e,t,r){var n=t||rO,s=n.style,a=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(hEr[a]+e in s););return a<0?null:(a===3?"ms":a>=0?hEr[a]:"")+e},Srt=function(){z5n()&&window.document&&(nEr=window,uw=nEr.document,MZ=uw.documentElement,rO=Drt("div")||{style:{}},Drt("div"),u0=LZ(u0),k3=u0+"Origin",rO.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",dEr=!!LZ("perspective"),brt=L3.core.reverting,Art=1)},fEr=function(e){var t=e.ownerSVGElement,r=Drt("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),s;n.style.display="block",r.appendChild(n),MZ.appendChild(r);try{s=n.getBBox()}catch{}return r.removeChild(n),MZ.removeChild(r),s},pEr=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},gEr=function(e){var t,r;try{t=e.getBBox()}catch{t=fEr(e),r=1}return t&&(t.width||t.height)||r||(t=fEr(e)),t&&!t.width&&!t.x&&!t.y?{x:+pEr(e,["x","cx","x1"])||0,y:+pEr(e,["y","cy","y1"])||0,width:0,height:0}:t},mEr=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&gEr(e))},nO=function(e,t){if(t){var r=e.style,n;t in Z9&&t!==k3&&(t=u0),r.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),r.removeProperty(n==="--"?t:t.replace(Irt,"-$1").toLowerCase())):r.removeAttribute(t)}},cw=function(e,t,r,n,s,a){var o=new O3(e._pt,t,r,0,1,a?lEr:oEr);return e._pt=o,o.b=n,o.e=s,e._props.push(r),o},xEr={deg:1,rad:1,turn:1},s9n={grid:1,flex:1},dw=function i(e,t,r,n){var s=parseFloat(r)||0,a=(r+"").trim().substr((s+"").length)||"px",o=rO.style,l=X5n.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),d=100,h=n==="px",p=n==="%",g,x,v,y;if(n===a||!s||xEr[n]||xEr[a])return s;if(a!=="px"&&!h&&(s=i(e,t,r,"px")),y=e.getCTM&&mEr(e),(p||a==="%")&&(Z9[t]||~t.indexOf("adius")))return g=y?e.getBBox()[l?"width":"height"]:e[c],vg(p?s/g*d:s/100*g);if(o[l?"width":"height"]=d+(h?a:n),x=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,y&&(x=(e.ownerSVGElement||{}).parentNode),(!x||x===uw||!x.appendChild)&&(x=uw.body),v=x._gsap,v&&p&&v.width&&l&&v.time===gA.time&&!v.uncache)return vg(s/v.width*d);if(p&&(t==="height"||t==="width")){var I=e.style[t];e.style[t]=d+n,g=e[c],I?e.style[t]=I:nO(e,t)}else(p||a==="%")&&!s9n[pI(x,"display")]&&(o.position=pI(e,"position")),x===e&&(o.position="static"),x.appendChild(rO),g=rO[c],x.removeChild(rO),o.position="absolute";return l&&p&&(v=JN(x),v.time=gA.time,v.width=x[c]),vg(h?g*s/d:g&&s?d/g*s:0)},z9=function(e,t,r,n){var s;return Art||Srt(),t in B4&&t!=="transform"&&(t=B4[t],~t.indexOf(",")&&(t=t.split(",")[0])),Z9[t]&&t!=="transform"?(s=zre(e,n),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:rve(pI(e,k3))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||n||~(s+"").indexOf("calc("))&&(s=tve[t]&&tve[t](e,t,r)||pI(e,t)||CSr(e,t)||(t==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?dw(e,t,s,r)+r:s},a9n=function(e,t,r,n){if(!r||r==="none"){var s=LZ(t,e,1),a=s&&pI(e,s,1);a&&a!==r?(t=s,r=a):t==="borderColor"&&(r=pI(e,"borderTopColor"))}var o=new O3(this._pt,e.style,t,0,1,eEr),l=0,u=0,c,d,h,p,g,x,v,y,I,S,T,E;if(o.b=r,o.e=n,r+="",n+="",n.substring(0,6)==="var(--"&&(n=pI(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(x=e.style[t],e.style[t]=n,n=pI(e,t)||n,x?e.style[t]=x:nO(e,t)),c=[r,n],ZSr(c),r=c[0],n=c[1],h=r.match(EZ)||[],E=n.match(EZ)||[],E.length){for(;d=EZ.exec(n);)v=d[0],I=n.substring(l,d.index),g?g=(g+1)%5:(I.substr(-5)==="rgba("||I.substr(-5)==="hsla(")&&(g=1),v!==(x=h[u++]||"")&&(p=parseFloat(x)||0,T=x.substr((p+"").length),v.charAt(1)==="="&&(v=TZ(p,v)+T),y=parseFloat(v),S=v.substr((y+"").length),l=EZ.lastIndex-S.length,S||(S=S||cA.units[t]||T,l===n.length&&(n+=S,o.e+=S)),T!==S&&(p=dw(e,t,x,S)||0),o._pt={_next:o._pt,p:I||u===1?I:",",s:p,c:y-p,m:g&&g<4||t==="zIndex"?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r=t==="display"&&n==="none"?lEr:oEr;return fSr.test(n)&&(o.e=0),this._pt=o,o},vEr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},o9n=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return(r==="top"||r==="bottom"||n==="left"||n==="right")&&(e=r,r=n,n=e),t[0]=vEr[r]||r,t[1]=vEr[n]||n,t.join(" ")},l9n=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r=t.t,n=r.style,s=t.u,a=r._gsap,o,l,u;if(s==="all"||s===!0)n.cssText="",l=1;else for(s=s.split(","),u=s.length;--u>-1;)o=s[u],Z9[o]&&(l=1,o=o==="transformOrigin"?k3:u0),nO(r,o);l&&(nO(r,u0),a&&(a.svg&&r.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",zre(r,1),a.uncache=1,uEr(n)))}},tve={clearProps:function(e,t,r,n,s){if(s.data!=="isFromStart"){var a=e._pt=new O3(e._pt,t,r,0,0,l9n);return a.u=n,a.pr=-10,a.tween=s,e._props.push(r),1}}},Zre=[1,0,0,1,0,0],yEr={},CEr=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},AEr=function(e){var t=pI(e,u0);return CEr(t)?Zre:t.substr(7).match(hSr).map(vg)},Ert=function(e,t){var r=e._gsap||JN(e),n=e.style,s=AEr(e),a,o,l,u;return r.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Zre:s):(s===Zre&&!e.offsetParent&&e!==MZ&&!r.svg&&(l=n.display,n.display="block",a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,o=e.nextElementSibling,MZ.appendChild(e)),s=AEr(e),l?n.display=l:nO(e,"display"),u&&(o?a.insertBefore(e,o):a?a.appendChild(e):MZ.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Trt=function(e,t,r,n,s,a){var o=e._gsap,l=s||Ert(e,!0),u=o.xOrigin||0,c=o.yOrigin||0,d=o.xOffset||0,h=o.yOffset||0,p=l[0],g=l[1],x=l[2],v=l[3],y=l[4],I=l[5],S=t.split(" "),T=parseFloat(S[0])||0,E=parseFloat(S[1])||0,B,P,M,O;r?l!==Zre&&(P=p*v-g*x)&&(M=T*(v/P)+E*(-x/P)+(x*I-v*y)/P,O=T*(-g/P)+E*(p/P)-(p*I-g*y)/P,T=M,E=O):(B=gEr(e),T=B.x+(~S[0].indexOf("%")?T/100*B.width:T),E=B.y+(~(S[1]||S[0]).indexOf("%")?E/100*B.height:E)),n||n!==!1&&o.smooth?(y=T-u,I=E-c,o.xOffset=d+(y*p+I*x)-y,o.yOffset=h+(y*g+I*v)-I):o.xOffset=o.yOffset=0,o.xOrigin=T,o.yOrigin=E,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!r,e.style[k3]="0px 0px",a&&(cw(a,o,"xOrigin",u,T),cw(a,o,"yOrigin",c,E),cw(a,o,"xOffset",d,o.xOffset),cw(a,o,"yOffset",h,o.yOffset)),e.setAttribute("data-svg-origin",T+" "+E)},zre=function(e,t){var r=e._gsap||new jSr(e);if("x"in r&&!t&&!r.uncache)return r;var n=e.style,s=r.scaleX<0,a="px",o="deg",l=getComputedStyle(e),u=pI(e,k3)||"0",c,d,h,p,g,x,v,y,I,S,T,E,B,P,M,O,k,V,U,z,Z,j,K,J,q,ie,ne,le,de,he,ge,ce;return c=d=h=x=v=y=I=S=T=0,p=g=1,r.svg=!!(e.getCTM&&mEr(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[u0]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[u0]!=="none"?l[u0]:"")),n.scale=n.rotate=n.translate="none"),P=Ert(e,r.svg),r.svg&&(r.uncache?(q=e.getBBox(),u=r.xOrigin-q.x+"px "+(r.yOrigin-q.y)+"px",J=""):J=!t&&e.getAttribute("data-svg-origin"),Trt(e,J||u,!!J||r.originIsAbsolute,r.smooth!==!1,P)),E=r.xOrigin||0,B=r.yOrigin||0,P!==Zre&&(V=P[0],U=P[1],z=P[2],Z=P[3],c=j=P[4],d=K=P[5],P.length===6?(p=Math.sqrt(V*V+U*U),g=Math.sqrt(Z*Z+z*z),x=V||U?OZ(U,V)*iO:0,I=z||Z?OZ(z,Z)*iO+x:0,I&&(g*=Math.abs(Math.cos(I*NZ))),r.svg&&(c-=E-(E*V+B*z),d-=B-(E*U+B*Z))):(ce=P[6],he=P[7],ne=P[8],le=P[9],de=P[10],ge=P[11],c=P[12],d=P[13],h=P[14],M=OZ(ce,de),v=M*iO,M&&(O=Math.cos(-M),k=Math.sin(-M),J=j*O+ne*k,q=K*O+le*k,ie=ce*O+de*k,ne=j*-k+ne*O,le=K*-k+le*O,de=ce*-k+de*O,ge=he*-k+ge*O,j=J,K=q,ce=ie),M=OZ(-z,de),y=M*iO,M&&(O=Math.cos(-M),k=Math.sin(-M),J=V*O-ne*k,q=U*O-le*k,ie=z*O-de*k,ge=Z*k+ge*O,V=J,U=q,z=ie),M=OZ(U,V),x=M*iO,M&&(O=Math.cos(M),k=Math.sin(M),J=V*O+U*k,q=j*O+K*k,U=U*O-V*k,K=K*O-j*k,V=J,j=q),v&&Math.abs(v)+Math.abs(x)>359.9&&(v=x=0,y=180-y),p=vg(Math.sqrt(V*V+U*U+z*z)),g=vg(Math.sqrt(K*K+ce*ce)),M=OZ(j,K),I=Math.abs(M)>2e-4?M*iO:0,T=ge?1/(ge<0?-ge:ge):0),r.svg&&(J=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!CEr(pI(e,u0)),J&&e.setAttribute("transform",J))),Math.abs(I)>90&&Math.abs(I)<270&&(s?(p*=-1,I+=x<=0?180:-180,x+=x<=0?180:-180):(g*=-1,I+=I<=0?180:-180)),t=t||r.uncache,r.x=c-((r.xPercent=c&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+a,r.y=d-((r.yPercent=d&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+a,r.z=h+a,r.scaleX=vg(p),r.scaleY=vg(g),r.rotation=vg(x)+o,r.rotationX=vg(v)+o,r.rotationY=vg(y)+o,r.skewX=I+o,r.skewY=S+o,r.transformPerspective=T+a,(r.zOrigin=parseFloat(u.split(" ")[2])||!t&&r.zOrigin||0)&&(n[k3]=rve(u)),r.xOffset=r.yOffset=0,r.force3D=cA.force3D,r.renderTransform=r.svg?c9n:dEr?bEr:u9n,r.uncache=0,r},rve=function(e){return(e=e.split(" "))[0]+" "+e[1]},Rrt=function(e,t,r){var n=Kx(t);return vg(parseFloat(t)+parseFloat(dw(e,"x",r+"px",n)))+n},u9n=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,bEr(e,t)},sO="0deg",Xre="0px",aO=") ",bEr=function(e,t){var r=t||this,n=r.xPercent,s=r.yPercent,a=r.x,o=r.y,l=r.z,u=r.rotation,c=r.rotationY,d=r.rotationX,h=r.skewX,p=r.skewY,g=r.scaleX,x=r.scaleY,v=r.transformPerspective,y=r.force3D,I=r.target,S=r.zOrigin,T="",E=y==="auto"&&e&&e!==1||y===!0;if(S&&(d!==sO||c!==sO)){var B=parseFloat(c)*NZ,P=Math.sin(B),M=Math.cos(B),O;B=parseFloat(d)*NZ,O=Math.cos(B),a=Rrt(I,a,P*O*-S),o=Rrt(I,o,-Math.sin(B)*-S),l=Rrt(I,l,M*O*-S+S)}v!==Xre&&(T+="perspective("+v+aO),(n||s)&&(T+="translate("+n+"%, "+s+"%) "),(E||a!==Xre||o!==Xre||l!==Xre)&&(T+=l!==Xre||E?"translate3d("+a+", "+o+", "+l+") ":"translate("+a+", "+o+aO),u!==sO&&(T+="rotate("+u+aO),c!==sO&&(T+="rotateY("+c+aO),d!==sO&&(T+="rotateX("+d+aO),(h!==sO||p!==sO)&&(T+="skew("+h+", "+p+aO),(g!==1||x!==1)&&(T+="scale("+g+", "+x+aO),I.style[u0]=T||"translate(0, 0)"},c9n=function(e,t){var r=t||this,n=r.xPercent,s=r.yPercent,a=r.x,o=r.y,l=r.rotation,u=r.skewX,c=r.skewY,d=r.scaleX,h=r.scaleY,p=r.target,g=r.xOrigin,x=r.yOrigin,v=r.xOffset,y=r.yOffset,I=r.forceCSS,S=parseFloat(a),T=parseFloat(o),E,B,P,M,O;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=NZ,u*=NZ,E=Math.cos(l)*d,B=Math.sin(l)*d,P=Math.sin(l-u)*-h,M=Math.cos(l-u)*h,u&&(c*=NZ,O=Math.tan(u-c),O=Math.sqrt(1+O*O),P*=O,M*=O,c&&(O=Math.tan(c),O=Math.sqrt(1+O*O),E*=O,B*=O)),E=vg(E),B=vg(B),P=vg(P),M=vg(M)):(E=d,M=h,B=P=0),(S&&!~(a+"").indexOf("px")||T&&!~(o+"").indexOf("px"))&&(S=dw(p,"x",a,"px"),T=dw(p,"y",o,"px")),(g||x||v||y)&&(S=vg(S+g-(g*E+x*P)+v),T=vg(T+x-(g*B+x*M)+y)),(n||s)&&(O=p.getBBox(),S=vg(S+n/100*O.width),T=vg(T+s/100*O.height)),O="matrix("+E+","+B+","+P+","+M+","+S+","+T+")",p.setAttribute("transform",O),I&&(p.style[u0]=O)},d9n=function(e,t,r,n,s){var a=360,o=Sm(s),l=parseFloat(s)*(o&&~s.indexOf("rad")?iO:1),u=l-n,c=n+u+"deg",d,h;return o&&(d=s.split("_")[1],d==="short"&&(u%=a,u!==u%(a/2)&&(u+=u<0?a:-a)),d==="cw"&&u<0?u=(u+a*aEr)%a-~~(u/a)*a:d==="ccw"&&u>0&&(u=(u-a*aEr)%a-~~(u/a)*a)),e._pt=h=new O3(e._pt,t,r,n,u,j5n),h.e=c,h.u="deg",e._props.push(r),h},IEr=function(e,t){for(var r in t)e[r]=t[r];return e},h9n=function(e,t,r){var n=IEr({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",a=r.style,o,l,u,c,d,h,p,g;n.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),a[u0]=t,o=zre(r,1),nO(r,u0),r.setAttribute("transform",u)):(u=getComputedStyle(r)[u0],a[u0]=t,o=zre(r,1),a[u0]=u);for(l in Z9)u=n[l],c=o[l],u!==c&&s.indexOf(l)<0&&(p=Kx(u),g=Kx(c),d=p!==g?dw(r,l,u,g):parseFloat(u),h=parseFloat(c),e._pt=new O3(e._pt,o,l,d,h-d,_rt),e._pt.u=g||0,e._props.push(l));IEr(o,n)};N3("padding,margin,Width,Radius",function(i,e){var t="Top",r="Right",n="Bottom",s="Left",a=(e<3?[t,r,n,s]:[t+s,t+r,n+r,n+s]).map(function(o){return e<2?i+o:"border"+o+i});tve[e>1?"border"+i:i]=function(o,l,u,c,d){var h,p;if(arguments.length<4)return h=a.map(function(g){return z9(o,g,u)}),p=h.join(" "),p.split(h[0]).length===5?h[0]:p;h=(c+"").split(" "),p={},a.forEach(function(g,x){return p[g]=h[x]=h[x]||h[(x-1)/2|0]}),o.init(l,p,d)}});var _Er={name:"css",register:Srt,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,s){var a=this._props,o=e.style,l=r.vars.startAt,u,c,d,h,p,g,x,v,y,I,S,T,E,B,P,M;Art||Srt(),this.styles=this.styles||cEr(e),M=this.styles.props,this.tween=r;for(x in t)if(x!=="autoRound"&&(c=t[x],!(hA[x]&&KSr(x,t,r,n,e,s)))){if(p=typeof c,g=tve[x],p==="function"&&(c=c.call(r,n,e,s),p=typeof c),p==="string"&&~c.indexOf("random(")&&(c=kre(c)),g)g(this,e,x,c,r)&&(P=1);else if(x.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(x)+"").trim(),c+="",ow.lastIndex=0,ow.test(u)||(v=Kx(u),y=Kx(c)),y?v!==y&&(u=dw(e,x,u,y)+y):v&&(c+=v),this.add(o,"setProperty",u,c,n,s,0,0,x),a.push(x),M.push(x,0,o[x]);else if(p!=="undefined"){if(l&&x in l?(u=typeof l[x]=="function"?l[x].call(r,n,e,s):l[x],Sm(u)&&~u.indexOf("random(")&&(u=kre(u)),Kx(u+"")||u==="auto"||(u+=cA.units[x]||Kx(z9(e,x))||""),(u+"").charAt(1)==="="&&(u=z9(e,x))):u=z9(e,x),h=parseFloat(u),I=p==="string"&&c.charAt(1)==="="&&c.substr(0,2),I&&(c=c.substr(2)),d=parseFloat(c),x in B4&&(x==="autoAlpha"&&(h===1&&z9(e,"visibility")==="hidden"&&d&&(h=0),M.push("visibility",0,o.visibility),cw(this,o,"visibility",h?"inherit":"hidden",d?"inherit":"hidden",!d)),x!=="scale"&&x!=="transform"&&(x=B4[x],~x.indexOf(",")&&(x=x.split(",")[0]))),S=x in Z9,S){if(this.styles.save(x),p==="string"&&c.substring(0,6)==="var(--"&&(c=pI(e,c.substring(4,c.indexOf(")"))),d=parseFloat(c)),T||(E=e._gsap,E.renderTransform&&!t.parseTransform||zre(e,t.parseTransform),B=t.smoothOrigin!==!1&&E.smooth,T=this._pt=new O3(this._pt,o,u0,0,1,E.renderTransform,E,0,-1),T.dep=1),x==="scale")this._pt=new O3(this._pt,E,"scaleY",E.scaleY,(I?TZ(E.scaleY,I+d):d)-E.scaleY||0,_rt),this._pt.u=0,a.push("scaleY",x),x+="X";else if(x==="transformOrigin"){M.push(k3,0,o[k3]),c=o9n(c),E.svg?Trt(e,c,0,B,0,this):(y=parseFloat(c.split(" ")[2])||0,y!==E.zOrigin&&cw(this,E,"zOrigin",E.zOrigin,y),cw(this,o,x,rve(u),rve(c)));continue}else if(x==="svgOrigin"){Trt(e,c,1,B,0,this);continue}else if(x in yEr){d9n(this,E,x,h,I?TZ(h,I+c):c);continue}else if(x==="smoothOrigin"){cw(this,E,"smooth",E.smooth,c);continue}else if(x==="force3D"){E[x]=c;continue}else if(x==="transform"){h9n(this,c,e);continue}}else x in o||(x=LZ(x)||x);if(S||(d||d===0)&&(h||h===0)&&!Y5n.test(c)&&x in o)v=(u+"").substr((h+"").length),d||(d=0),y=Kx(c)||(x in cA.units?cA.units[x]:v),v!==y&&(h=dw(e,x,u,y)),this._pt=new O3(this._pt,S?E:o,x,h,(I?TZ(h,I+d):d)-h,!S&&(y==="px"||x==="zIndex")&&t.autoRound!==!1?Q5n:_rt),this._pt.u=y||0,v!==y&&y!=="%"&&(this._pt.b=u,this._pt.r=K5n);else if(x in o)a9n.call(this,e,x,u,I?I+c:c);else if(x in e)this.add(e,x,u||e[x],I?I+c:c,n,s);else if(x!=="parseTransform"){Jtt(x,c);continue}S||(x in o?M.push(x,0,o[x]):typeof e[x]=="function"?M.push(x,2,e[x]()):M.push(x,1,u||e[x])),a.push(x)}}P&&tEr(this)},render:function(e,t){if(t.tween._time||!brt())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:z9,aliases:B4,getSetter:function(e,t,r){var n=B4[t];return n&&n.indexOf(",")<0&&(t=n),t in Z9&&t!==k3&&(e._gsap.x||z9(e,"x"))?r&&sEr===r?t==="scale"?e9n:$5n:(sEr=r||{})&&(t==="scale"?t9n:r9n):e.style&&!ztt(e.style[t])?J5n:~t.indexOf("-")?q5n:mrt(e,t)},core:{_removeProperty:nO,_getMatrix:Ert}};L3.utils.checkPrefix=LZ,L3.core.getStyleSaver=cEr,(function(i,e,t,r){var n=N3(i+","+e+","+t,function(s){Z9[s]=1});N3(e,function(s){cA.units[s]="deg",yEr[s]=1}),B4[n[13]]=i+","+e,N3(r,function(s){var a=s.split(":");B4[a[1]]=n[a[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),N3("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){cA.units[i]="px"}),L3.registerPlugin(_Er);var yc=L3.registerPlugin(_Er)||L3;yc.core.Tween;const wrt="155",kZ={ROTATE:0,DOLLY:1,PAN:2},GZ={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},f9n=0,DEr=1,p9n=2,SEr=1,g9n=2,X9=3,zD=0,fy=1,Z0=2,Y9=0,VZ=1,Em=2,EEr=3,TEr=4,m9n=5,WZ=100,x9n=101,v9n=102,REr=103,wEr=104,y9n=200,C9n=201,A9n=202,b9n=203,FEr=204,BEr=205,I9n=206,_9n=207,D9n=208,S9n=209,E9n=210,T9n=0,R9n=1,w9n=2,Frt=3,F9n=4,B9n=5,P9n=6,M9n=7,PEr=0,N9n=1,O9n=2,j9=0,L9n=1,k9n=2,G9n=3,V9n=4,W9n=5,MEr=300,UZ=301,HZ=302,Brt=303,Prt=304,ive=306,G3=1e3,gI=1001,nve=1002,w1=1003,Mrt=1004,sve=1005,V3=1006,NEr=1007,oO=1008,hw=1009,U9n=1010,H9n=1011,Nrt=1012,OEr=1013,fw=1014,P4=1015,M4=1016,LEr=1017,kEr=1018,lO=1020,Z9n=1021,mI=1023,GEr=1024,z9n=1025,uO=1026,ZZ=1027,VEr=1028,WEr=1029,X9n=1030,UEr=1031,HEr=1033,Ort=33776,Lrt=33777,krt=33778,Grt=33779,ZEr=35840,zEr=35841,XEr=35842,YEr=35843,Y9n=36196,jEr=37492,KEr=37496,QEr=37808,JEr=37809,qEr=37810,$Er=37811,e4r=37812,t4r=37813,r4r=37814,i4r=37815,n4r=37816,s4r=37817,a4r=37818,o4r=37819,l4r=37820,u4r=37821,Vrt=36492,j9n=36283,c4r=36284,d4r=36285,h4r=36286,Yre=2300,zZ=2301,Wrt=2302,f4r=2400,p4r=2401,g4r=2402,K9n=2500,Q9n=0,m4r=1,Urt=2,x4r=3e3,K9=3001,J9n=3200,q9n=3201,v4r=0,$9n=1,cO="",Vl="srgb",N4="srgb-linear",y4r="display-p3",Hrt=7680,eTn=519,tTn=512,rTn=513,iTn=514,nTn=515,sTn=516,aTn=517,oTn=518,lTn=519,Zrt=35044,C4r="300 es",zrt=1035,Q9=2e3,ave=2001;class dO{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(t)===-1&&r[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const n=r.slice(0);for(let s=0,a=n.length;s<a;s++)n[s].call(this,e);e.target=null}}}const Qx=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let A4r=1234567;const jre=Math.PI/180,XZ=180/Math.PI;function xI(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(Qx[i&255]+Qx[i>>8&255]+Qx[i>>16&255]+Qx[i>>24&255]+"-"+Qx[e&255]+Qx[e>>8&255]+"-"+Qx[e>>16&15|64]+Qx[e>>24&255]+"-"+Qx[t&63|128]+Qx[t>>8&255]+"-"+Qx[t>>16&255]+Qx[t>>24&255]+Qx[r&255]+Qx[r>>8&255]+Qx[r>>16&255]+Qx[r>>24&255]).toLowerCase()}function Kg(i,e,t){return Math.max(e,Math.min(t,i))}function Xrt(i,e){return(i%e+e)%e}function uTn(i,e,t,r,n){return r+(i-e)*(n-r)/(t-e)}function cTn(i,e,t){return i!==e?(t-i)/(e-i):0}function Kre(i,e,t){return(1-t)*i+t*e}function dTn(i,e,t,r){return Kre(i,e,1-Math.exp(-t*r))}function hTn(i,e=1){return e-Math.abs(Xrt(i,e*2)-e)}function fTn(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function pTn(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function gTn(i,e){return i+Math.floor(Math.random()*(e-i+1))}function mTn(i,e){return i+Math.random()*(e-i)}function xTn(i){return i*(.5-Math.random())}function vTn(i){i!==void 0&&(A4r=i);let e=A4r+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function yTn(i){return i*jre}function CTn(i){return i*XZ}function Yrt(i){return(i&i-1)===0&&i!==0}function b4r(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function ove(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function ATn(i,e,t,r,n){const s=Math.cos,a=Math.sin,o=s(t/2),l=a(t/2),u=s((e+r)/2),c=a((e+r)/2),d=s((e-r)/2),h=a((e-r)/2),p=s((r-e)/2),g=a((r-e)/2);switch(n){case"XYX":i.set(o*c,l*d,l*h,o*u);break;case"YZY":i.set(l*h,o*c,l*d,o*u);break;case"ZXZ":i.set(l*d,l*h,o*c,o*u);break;case"XZX":i.set(o*c,l*g,l*p,o*u);break;case"YXY":i.set(l*p,o*c,l*g,o*u);break;case"ZYZ":i.set(l*g,l*p,o*c,o*u);break;default:}}function O4(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Wh(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const py={DEG2RAD:jre,RAD2DEG:XZ,generateUUID:xI,clamp:Kg,euclideanModulo:Xrt,mapLinear:uTn,inverseLerp:cTn,lerp:Kre,damp:dTn,pingpong:hTn,smoothstep:fTn,smootherstep:pTn,randInt:gTn,randFloat:mTn,randFloatSpread:xTn,seededRandom:vTn,degToRad:yTn,radToDeg:CTn,isPowerOfTwo:Yrt,ceilPowerOfTwo:b4r,floorPowerOfTwo:ove,setQuaternionFromProperEuler:ATn,normalize:Wh,denormalize:O4};class En{constructor(e=0,t=0){En.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(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(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,r=this.y,n=e.elements;return this.x=n[0]*t+n[3]*r+n[6],this.y=n[1]*t+n[4]*r+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(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(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(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(Kg(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y;return t*t+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const r=Math.cos(t),n=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*r-a*n+e.x,this.y=s*n+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class cc{constructor(e,t,r,n,s,a,o,l,u){cc.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,r,n,s,a,o,l,u)}set(e,t,r,n,s,a,o,l,u){const c=this.elements;return c[0]=e,c[1]=n,c[2]=o,c[3]=t,c[4]=s,c[5]=l,c[6]=r,c[7]=a,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this}extractBasis(e,t,r){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,n=t.elements,s=this.elements,a=r[0],o=r[3],l=r[6],u=r[1],c=r[4],d=r[7],h=r[2],p=r[5],g=r[8],x=n[0],v=n[3],y=n[6],I=n[1],S=n[4],T=n[7],E=n[2],B=n[5],P=n[8];return s[0]=a*x+o*I+l*E,s[3]=a*v+o*S+l*B,s[6]=a*y+o*T+l*P,s[1]=u*x+c*I+d*E,s[4]=u*v+c*S+d*B,s[7]=u*y+c*T+d*P,s[2]=h*x+p*I+g*E,s[5]=h*v+p*S+g*B,s[8]=h*y+p*T+g*P,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8];return t*a*c-t*o*u-r*s*c+r*o*l+n*s*u-n*a*l}invert(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],d=c*a-o*u,h=o*l-c*s,p=u*s-a*l,g=t*d+r*h+n*p;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/g;return e[0]=d*x,e[1]=(n*u-c*r)*x,e[2]=(o*r-n*a)*x,e[3]=h*x,e[4]=(c*t-n*l)*x,e[5]=(n*s-o*t)*x,e[6]=p*x,e[7]=(r*l-u*t)*x,e[8]=(a*t-r*s)*x,this}transpose(){let e;const 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(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const 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(e,t,r,n,s,a,o){const l=Math.cos(s),u=Math.sin(s);return this.set(r*l,r*u,-r*(l*a+u*o)+a+e,-n*u,n*l,-n*(-u*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(jrt.makeScale(e,t)),this}rotate(e){return this.premultiply(jrt.makeRotation(-e)),this}translate(e,t){return this.premultiply(jrt.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,r,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,r=e.elements;for(let n=0;n<9;n++)if(t[n]!==r[n])return!1;return!0}fromArray(e,t=0){for(let r=0;r<9;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const jrt=new cc;function I4r(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function Qre(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}const _4r={};function Jre(i){i in _4r||(_4r[i]=!0)}function YZ(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Krt(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}const bTn=new cc().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),ITn=new cc().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function _Tn(i){return i.convertSRGBToLinear().applyMatrix3(ITn)}function DTn(i){return i.applyMatrix3(bTn).convertLinearToSRGB()}const STn={[N4]:i=>i,[Vl]:i=>i.convertSRGBToLinear(),[y4r]:_Tn},ETn={[N4]:i=>i,[Vl]:i=>i.convertLinearToSRGB(),[y4r]:DTn},XD={enabled:!0,get legacyMode(){return!this.enabled},set legacyMode(i){this.enabled=!i},get workingColorSpace(){return N4},set workingColorSpace(i){},convert:function(i,e,t){if(this.enabled===!1||e===t||!e||!t)return i;const r=STn[e],n=ETn[t];if(r===void 0||n===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return n(r(i))},fromWorkingColorSpace:function(i,e){return this.convert(i,this.workingColorSpace,e)},toWorkingColorSpace:function(i,e){return this.convert(i,e,this.workingColorSpace)}};let jZ;class D4r{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{jZ===void 0&&(jZ=Qre("canvas")),jZ.width=e.width,jZ.height=e.height;const r=jZ.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),t=jZ}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Qre("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const n=r.getImageData(0,0,e.width,e.height),s=n.data;for(let a=0;a<s.length;a++)s[a]=YZ(s[a]/255)*255;return r.putImageData(n,0,0),t}else if(e.data){const t=e.data.slice(0);for(let r=0;r<t.length;r++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[r]=Math.floor(YZ(t[r]/255)*255):t[r]=YZ(t[r]);return{data:t,width:e.width,height:e.height}}else return e}}let TTn=0;class S4r{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:TTn++}),this.uuid=xI(),this.data=e,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const r={uuid:this.uuid,url:""},n=this.data;if(n!==null){let s;if(Array.isArray(n)){s=[];for(let a=0,o=n.length;a<o;a++)n[a].isDataTexture?s.push(Qrt(n[a].image)):s.push(Qrt(n[a]))}else s=Qrt(n);r.url=s}return t||(e.images[this.uuid]=r),r}}function Qrt(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?D4r.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:{}}let RTn=0;class Tm extends dO{constructor(e=Tm.DEFAULT_IMAGE,t=Tm.DEFAULT_MAPPING,r=gI,n=gI,s=V3,a=oO,o=mI,l=hw,u=Tm.DEFAULT_ANISOTROPY,c=cO){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:RTn++}),this.uuid=xI(),this.name="",this.source=new S4r(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=r,this.wrapT=n,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=l,this.offset=new En(0,0),this.repeat=new En(1,1),this.center=new En(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new cc,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof c=="string"?this.colorSpace=c:(Jre("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===K9?Vl:cO),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,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.internalFormat=e.internalFormat,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.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),t||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==MEr)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case G3:e.x=e.x-Math.floor(e.x);break;case gI:e.x=e.x<0?0:1;break;case nve:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case G3:e.y=e.y-Math.floor(e.y);break;case gI:e.y=e.y<0?0:1;break;case nve:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Jre("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Vl?K9:x4r}set encoding(e){Jre("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===K9?Vl:cO}}Tm.DEFAULT_IMAGE=null,Tm.DEFAULT_MAPPING=MEr,Tm.DEFAULT_ANISOTROPY=1;class md{constructor(e=0,t=0,r=0,n=1){md.prototype.isVector4=!0,this.x=e,this.y=t,this.z=r,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,r,n){return this.x=e,this.y=t,this.z=r,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(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(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(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(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}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,r=this.y,n=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*r+a[8]*n+a[12]*s,this.y=a[1]*t+a[5]*r+a[9]*n+a[13]*s,this.z=a[2]*t+a[6]*r+a[10]*n+a[14]*s,this.w=a[3]*t+a[7]*r+a[11]*n+a[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const 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(e){let t,r,n,s;const l=e.elements,u=l[0],c=l[4],d=l[8],h=l[1],p=l[5],g=l[9],x=l[2],v=l[6],y=l[10];if(Math.abs(c-h)<.01&&Math.abs(d-x)<.01&&Math.abs(g-v)<.01){if(Math.abs(c+h)<.1&&Math.abs(d+x)<.1&&Math.abs(g+v)<.1&&Math.abs(u+p+y-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(u+1)/2,T=(p+1)/2,E=(y+1)/2,B=(c+h)/4,P=(d+x)/4,M=(g+v)/4;return S>T&&S>E?S<.01?(r=0,n=.707106781,s=.707106781):(r=Math.sqrt(S),n=B/r,s=P/r):T>E?T<.01?(r=.707106781,n=0,s=.707106781):(n=Math.sqrt(T),r=B/n,s=M/n):E<.01?(r=.707106781,n=.707106781,s=0):(s=Math.sqrt(E),r=P/s,n=M/s),this.set(r,n,s,t),this}let I=Math.sqrt((v-g)*(v-g)+(d-x)*(d-x)+(h-c)*(h-c));return Math.abs(I)<.001&&(I=1),this.x=(v-g)/I,this.y=(d-x)/I,this.z=(h-c)/I,this.w=Math.acos((u+p+y-1)/2),this}min(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(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(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(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.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this.w=e.w+(t.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class wTn extends dO{constructor(e=1,t=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new md(0,0,e,t),this.scissorTest=!1,this.viewport=new md(0,0,e,t);const n={width:e,height:t,depth:1};r.encoding!==void 0&&(Jre("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===K9?Vl:cO),this.texture=new Tm(n,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.internalFormat=r.internalFormat!==void 0?r.internalFormat:null,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:V3,this.depthBuffer=r.depthBuffer!==void 0?r.depthBuffer:!0,this.stencilBuffer=r.stencilBuffer!==void 0?r.stencilBuffer:!1,this.depthTexture=r.depthTexture!==void 0?r.depthTexture:null,this.samples=r.samples!==void 0?r.samples:0}setSize(e,t,r=1){(this.width!==e||this.height!==t||this.depth!==r)&&(this.width=e,this.height=t,this.depth=r,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new S4r(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class vI extends wTn{constructor(e=1,t=1,r={}){super(e,t,r),this.isWebGLRenderTarget=!0}}class E4r extends Tm{constructor(e=null,t=1,r=1,n=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:r,depth:n},this.magFilter=w1,this.minFilter=w1,this.wrapR=gI,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class FTn extends Tm{constructor(e=null,t=1,r=1,n=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:r,depth:n},this.magFilter=w1,this.minFilter=w1,this.wrapR=gI,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class yI{constructor(e=0,t=0,r=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=r,this._w=n}static slerpFlat(e,t,r,n,s,a,o){let l=r[n+0],u=r[n+1],c=r[n+2],d=r[n+3];const h=s[a+0],p=s[a+1],g=s[a+2],x=s[a+3];if(o===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d;return}if(o===1){e[t+0]=h,e[t+1]=p,e[t+2]=g,e[t+3]=x;return}if(d!==x||l!==h||u!==p||c!==g){let v=1-o;const y=l*h+u*p+c*g+d*x,I=y>=0?1:-1,S=1-y*y;if(S>Number.EPSILON){const E=Math.sqrt(S),B=Math.atan2(E,y*I);v=Math.sin(v*B)/E,o=Math.sin(o*B)/E}const T=o*I;if(l=l*v+h*T,u=u*v+p*T,c=c*v+g*T,d=d*v+x*T,v===1-o){const E=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=E,u*=E,c*=E,d*=E}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,r,n,s,a){const o=r[n],l=r[n+1],u=r[n+2],c=r[n+3],d=s[a],h=s[a+1],p=s[a+2],g=s[a+3];return e[t]=o*g+c*d+l*p-u*h,e[t+1]=l*g+c*h+u*d-o*p,e[t+2]=u*g+c*p+o*h-l*d,e[t+3]=c*g-o*d-l*h-u*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const r=e._x,n=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,u=o(r/2),c=o(n/2),d=o(s/2),h=l(r/2),p=l(n/2),g=l(s/2);switch(a){case"XYZ":this._x=h*c*d+u*p*g,this._y=u*p*d-h*c*g,this._z=u*c*g+h*p*d,this._w=u*c*d-h*p*g;break;case"YXZ":this._x=h*c*d+u*p*g,this._y=u*p*d-h*c*g,this._z=u*c*g-h*p*d,this._w=u*c*d+h*p*g;break;case"ZXY":this._x=h*c*d-u*p*g,this._y=u*p*d+h*c*g,this._z=u*c*g+h*p*d,this._w=u*c*d-h*p*g;break;case"ZYX":this._x=h*c*d-u*p*g,this._y=u*p*d+h*c*g,this._z=u*c*g-h*p*d,this._w=u*c*d+h*p*g;break;case"YZX":this._x=h*c*d+u*p*g,this._y=u*p*d+h*c*g,this._z=u*c*g-h*p*d,this._w=u*c*d-h*p*g;break;case"XZY":this._x=h*c*d-u*p*g,this._y=u*p*d-h*c*g,this._z=u*c*g+h*p*d,this._w=u*c*d+h*p*g;break;default:}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const r=t/2,n=Math.sin(r);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,r=t[0],n=t[4],s=t[8],a=t[1],o=t[5],l=t[9],u=t[2],c=t[6],d=t[10],h=r+o+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(c-l)*p,this._y=(s-u)*p,this._z=(a-n)*p}else if(r>o&&r>d){const p=2*Math.sqrt(1+r-o-d);this._w=(c-l)/p,this._x=.25*p,this._y=(n+a)/p,this._z=(s+u)/p}else if(o>d){const p=2*Math.sqrt(1+o-r-d);this._w=(s-u)/p,this._x=(n+a)/p,this._y=.25*p,this._z=(l+c)/p}else{const p=2*Math.sqrt(1+d-r-o);this._w=(a-n)/p,this._x=(s+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let r=e.dot(t)+1;return r<Number.EPSILON?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(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=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Kg(this.dot(e),-1,1)))}rotateTowards(e,t){const r=this.angleTo(e);if(r===0)return this;const n=Math.min(1,t/r);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(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(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const r=e._x,n=e._y,s=e._z,a=e._w,o=t._x,l=t._y,u=t._z,c=t._w;return this._x=r*c+a*o+n*u-s*l,this._y=n*c+a*l+s*o-r*u,this._z=s*c+a*u+r*l-n*o,this._w=a*c-r*o-n*l-s*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const r=this._x,n=this._y,s=this._z,a=this._w;let o=a*e._w+r*e._x+n*e._y+s*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=r,this._y=n,this._z=s,this;const l=1-o*o;if(l<=Number.EPSILON){const p=1-t;return this._w=p*a+t*this._w,this._x=p*r+t*this._x,this._y=p*n+t*this._y,this._z=p*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),c=Math.atan2(u,o),d=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=a*d+this._w*h,this._x=r*d+this._x*h,this._y=n*d+this._y*h,this._z=s*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,r){return this.copy(e).slerp(t,r)}random(){const e=Math.random(),t=Math.sqrt(1-e),r=Math.sqrt(e),n=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(n),r*Math.sin(s),r*Math.cos(s),t*Math.sin(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class er{constructor(e=0,t=0,r=0){er.prototype.isVector3=!0,this.x=e,this.y=t,this.z=r}set(e,t,r){return r===void 0&&(r=this.z),this.x=e,this.y=t,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(T4r.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(T4r.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,r=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[3]*r+s[6]*n,this.y=s[1]*t+s[4]*r+s[7]*n,this.z=s[2]*t+s[5]*r+s[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,r=this.y,n=this.z,s=e.elements,a=1/(s[3]*t+s[7]*r+s[11]*n+s[15]);return this.x=(s[0]*t+s[4]*r+s[8]*n+s[12])*a,this.y=(s[1]*t+s[5]*r+s[9]*n+s[13])*a,this.z=(s[2]*t+s[6]*r+s[10]*n+s[14])*a,this}applyQuaternion(e){const t=this.x,r=this.y,n=this.z,s=e.x,a=e.y,o=e.z,l=e.w,u=l*t+a*n-o*r,c=l*r+o*t-s*n,d=l*n+s*r-a*t,h=-s*t-a*r-o*n;return this.x=u*l+h*-s+c*-o-d*-a,this.y=c*l+h*-a+d*-s-u*-o,this.z=d*l+h*-o+u*-a-c*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,r=this.y,n=this.z,s=e.elements;return this.x=s[0]*t+s[4]*r+s[8]*n,this.y=s[1]*t+s[5]*r+s[9]*n,this.z=s[2]*t+s[6]*r+s[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(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(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(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(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(e,t){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,r){return this.x=e.x+(t.x-e.x)*r,this.y=e.y+(t.y-e.y)*r,this.z=e.z+(t.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const r=e.x,n=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=n*l-s*o,this.y=s*a-r*l,this.z=r*o-n*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Jrt.copy(this).projectOnVector(e),this.sub(Jrt)}reflect(e){return this.sub(Jrt.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const r=this.dot(e)/t;return Math.acos(Kg(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return t*t+r*r+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,r){const n=Math.sin(t)*e;return this.x=n*Math.sin(r),this.y=Math.cos(t)*e,this.z=n*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,r){return this.x=e*Math.sin(t),this.y=r,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(t),this.y=r*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Jrt=new er,T4r=new yI;class c0{constructor(e=new er(1/0,1/0,1/0),t=new er(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t+=3)this.expandByPoint(q9.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,r=e.count;t<r;t++)this.expandByPoint(q9.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const r=q9.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){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(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){if(e.updateWorldMatrix(!1,!1),e.boundingBox!==void 0)e.boundingBox===null&&e.computeBoundingBox(),KZ.copy(e.boundingBox),KZ.applyMatrix4(e.matrixWorld),this.union(KZ);else{const n=e.geometry;if(n!==void 0)if(t&&n.attributes!==void 0&&n.attributes.position!==void 0){const s=n.attributes.position;for(let a=0,o=s.count;a<o;a++)q9.fromBufferAttribute(s,a).applyMatrix4(e.matrixWorld),this.expandByPoint(q9)}else n.boundingBox===null&&n.computeBoundingBox(),KZ.copy(n.boundingBox),KZ.applyMatrix4(e.matrixWorld),this.union(KZ)}const r=e.children;for(let n=0,s=r.length;n<s;n++)this.expandByObject(r[n],t);return this}containsPoint(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(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(e,t){return 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(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(e){return this.clampPoint(e.center,q9),q9.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(qre),lve.subVectors(this.max,qre),QZ.subVectors(e.a,qre),JZ.subVectors(e.b,qre),qZ.subVectors(e.c,qre),pw.subVectors(JZ,QZ),gw.subVectors(qZ,JZ),hO.subVectors(QZ,qZ);let t=[0,-pw.z,pw.y,0,-gw.z,gw.y,0,-hO.z,hO.y,pw.z,0,-pw.x,gw.z,0,-gw.x,hO.z,0,-hO.x,-pw.y,pw.x,0,-gw.y,gw.x,0,-hO.y,hO.x,0];return!qrt(t,QZ,JZ,qZ,lve)||(t=[1,0,0,0,1,0,0,0,1],!qrt(t,QZ,JZ,qZ,lve))?!1:(uve.crossVectors(pw,gw),t=[uve.x,uve.y,uve.z],qrt(t,QZ,JZ,qZ,lve))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,q9).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(q9).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(J9[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),J9[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),J9[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),J9[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),J9[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),J9[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),J9[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),J9[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(J9),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const J9=[new er,new er,new er,new er,new er,new er,new er,new er],q9=new er,KZ=new c0,QZ=new er,JZ=new er,qZ=new er,pw=new er,gw=new er,hO=new er,qre=new er,lve=new er,uve=new er,fO=new er;function qrt(i,e,t,r,n){for(let s=0,a=i.length-3;s<=a;s+=3){fO.fromArray(i,s);const o=n.x*Math.abs(fO.x)+n.y*Math.abs(fO.y)+n.z*Math.abs(fO.z),l=e.dot(fO),u=t.dot(fO),c=r.dot(fO);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>o)return!1}return!0}const BTn=new c0,$re=new er,$rt=new er;class W3{constructor(e=new er,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const r=this.center;t!==void 0?r.copy(t):BTn.setFromPoints(e).getCenter(r);let n=0;for(let s=0,a=e.length;s<a;s++)n=Math.max(n,r.distanceToSquared(e[s]));return this.radius=Math.sqrt(n),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const r=this.center.distanceToSquared(e);return t.copy(e),r>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;$re.subVectors(e,this.center);const t=$re.lengthSq();if(t>this.radius*this.radius){const r=Math.sqrt(t),n=(r-this.radius)*.5;this.center.addScaledVector($re,n/r),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):($rt.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint($re.copy(e.center).add($rt)),this.expandByPoint($re.copy(e.center).sub($rt))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const $9=new er,eit=new er,cve=new er,mw=new er,tit=new er,dve=new er,rit=new er;class xw{constructor(e=new er,t=new er(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,$9)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=$9.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):($9.copy(this.origin).addScaledVector(this.direction,t),$9.distanceToSquared(e))}distanceSqToSegment(e,t,r,n){eit.copy(e).add(t).multiplyScalar(.5),cve.copy(t).sub(e).normalize(),mw.copy(this.origin).sub(eit);const s=e.distanceTo(t)*.5,a=-this.direction.dot(cve),o=mw.dot(this.direction),l=-mw.dot(cve),u=mw.lengthSq(),c=Math.abs(1-a*a);let d,h,p,g;if(c>0)if(d=a*l-o,h=a*o-l,g=s*c,d>=0)if(h>=-g)if(h<=g){const x=1/c;d*=x,h*=x,p=d*(d+a*h+2*o)+h*(a*d+h+2*l)+u}else h=s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;else h=-s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;else h<=-g?(d=Math.max(0,-(-a*s+o)),h=d>0?-s:Math.min(Math.max(-s,-l),s),p=-d*d+h*(h+2*l)+u):h<=g?(d=0,h=Math.min(Math.max(-s,-l),s),p=h*(h+2*l)+u):(d=Math.max(0,-(a*s+o)),h=d>0?s:Math.min(Math.max(-s,-l),s),p=-d*d+h*(h+2*l)+u);else h=a>0?-s:s,d=Math.max(0,-(a*h+o)),p=-d*d+h*(h+2*l)+u;return r&&r.copy(this.origin).addScaledVector(this.direction,d),n&&n.copy(eit).addScaledVector(cve,h),p}intersectSphere(e,t){$9.subVectors(e.center,this.origin);const r=$9.dot(this.direction),n=$9.dot($9)-r*r,s=e.radius*e.radius;if(n>s)return null;const a=Math.sqrt(s-n),o=r-a,l=r+a;return l<0?null:o<0?this.at(l,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null}intersectPlane(e,t){const r=this.distanceToPlane(e);return r===null?null:this.at(r,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let r,n,s,a,o,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,h=this.origin;return u>=0?(r=(e.min.x-h.x)*u,n=(e.max.x-h.x)*u):(r=(e.max.x-h.x)*u,n=(e.min.x-h.x)*u),c>=0?(s=(e.min.y-h.y)*c,a=(e.max.y-h.y)*c):(s=(e.max.y-h.y)*c,a=(e.min.y-h.y)*c),r>a||s>n||((s>r||isNaN(r))&&(r=s),(a<n||isNaN(n))&&(n=a),d>=0?(o=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(o=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),r>l||o>n)||((o>r||r!==r)&&(r=o),(l<n||n!==n)&&(n=l),n<0)?null:this.at(r>=0?r:n,t)}intersectsBox(e){return this.intersectBox(e,$9)!==null}intersectTriangle(e,t,r,n,s){tit.subVectors(t,e),dve.subVectors(r,e),rit.crossVectors(tit,dve);let a=this.direction.dot(rit),o;if(a>0){if(n)return null;o=1}else if(a<0)o=-1,a=-a;else return null;mw.subVectors(this.origin,e);const l=o*this.direction.dot(dve.crossVectors(mw,dve));if(l<0)return null;const u=o*this.direction.dot(tit.cross(mw));if(u<0||l+u>a)return null;const c=-o*mw.dot(rit);return c<0?null:this.at(c/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class vo{constructor(e,t,r,n,s,a,o,l,u,c,d,h,p,g,x,v){vo.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,r,n,s,a,o,l,u,c,d,h,p,g,x,v)}set(e,t,r,n,s,a,o,l,u,c,d,h,p,g,x,v){const y=this.elements;return y[0]=e,y[4]=t,y[8]=r,y[12]=n,y[1]=s,y[5]=a,y[9]=o,y[13]=l,y[2]=u,y[6]=c,y[10]=d,y[14]=h,y[3]=p,y[7]=g,y[11]=x,y[15]=v,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new vo().fromArray(this.elements)}copy(e){const t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this}copyPosition(e){const t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,r){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,r=e.elements,n=1/$Z.setFromMatrixColumn(e,0).length(),s=1/$Z.setFromMatrixColumn(e,1).length(),a=1/$Z.setFromMatrixColumn(e,2).length();return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=0,t[4]=r[4]*s,t[5]=r[5]*s,t[6]=r[6]*s,t[7]=0,t[8]=r[8]*a,t[9]=r[9]*a,t[10]=r[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,r=e.x,n=e.y,s=e.z,a=Math.cos(r),o=Math.sin(r),l=Math.cos(n),u=Math.sin(n),c=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const h=a*c,p=a*d,g=o*c,x=o*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=p+g*u,t[5]=h-x*u,t[9]=-o*l,t[2]=x-h*u,t[6]=g+p*u,t[10]=a*l}else if(e.order==="YXZ"){const h=l*c,p=l*d,g=u*c,x=u*d;t[0]=h+x*o,t[4]=g*o-p,t[8]=a*u,t[1]=a*d,t[5]=a*c,t[9]=-o,t[2]=p*o-g,t[6]=x+h*o,t[10]=a*l}else if(e.order==="ZXY"){const h=l*c,p=l*d,g=u*c,x=u*d;t[0]=h-x*o,t[4]=-a*d,t[8]=g+p*o,t[1]=p+g*o,t[5]=a*c,t[9]=x-h*o,t[2]=-a*u,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const h=a*c,p=a*d,g=o*c,x=o*d;t[0]=l*c,t[4]=g*u-p,t[8]=h*u+x,t[1]=l*d,t[5]=x*u+h,t[9]=p*u-g,t[2]=-u,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const h=a*l,p=a*u,g=o*l,x=o*u;t[0]=l*c,t[4]=x-h*d,t[8]=g*d+p,t[1]=d,t[5]=a*c,t[9]=-o*c,t[2]=-u*c,t[6]=p*d+g,t[10]=h-x*d}else if(e.order==="XZY"){const h=a*l,p=a*u,g=o*l,x=o*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=h*d+x,t[5]=a*c,t[9]=p*d-g,t[2]=g*d-p,t[6]=o*c,t[10]=x*d+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(PTn,e,MTn)}lookAt(e,t,r){const n=this.elements;return mA.subVectors(e,t),mA.lengthSq()===0&&(mA.z=1),mA.normalize(),vw.crossVectors(r,mA),vw.lengthSq()===0&&(Math.abs(r.z)===1?mA.x+=1e-4:mA.z+=1e-4,mA.normalize(),vw.crossVectors(r,mA)),vw.normalize(),hve.crossVectors(mA,vw),n[0]=vw.x,n[4]=hve.x,n[8]=mA.x,n[1]=vw.y,n[5]=hve.y,n[9]=mA.y,n[2]=vw.z,n[6]=hve.z,n[10]=mA.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const r=e.elements,n=t.elements,s=this.elements,a=r[0],o=r[4],l=r[8],u=r[12],c=r[1],d=r[5],h=r[9],p=r[13],g=r[2],x=r[6],v=r[10],y=r[14],I=r[3],S=r[7],T=r[11],E=r[15],B=n[0],P=n[4],M=n[8],O=n[12],k=n[1],V=n[5],U=n[9],z=n[13],Z=n[2],j=n[6],K=n[10],J=n[14],q=n[3],ie=n[7],ne=n[11],le=n[15];return s[0]=a*B+o*k+l*Z+u*q,s[4]=a*P+o*V+l*j+u*ie,s[8]=a*M+o*U+l*K+u*ne,s[12]=a*O+o*z+l*J+u*le,s[1]=c*B+d*k+h*Z+p*q,s[5]=c*P+d*V+h*j+p*ie,s[9]=c*M+d*U+h*K+p*ne,s[13]=c*O+d*z+h*J+p*le,s[2]=g*B+x*k+v*Z+y*q,s[6]=g*P+x*V+v*j+y*ie,s[10]=g*M+x*U+v*K+y*ne,s[14]=g*O+x*z+v*J+y*le,s[3]=I*B+S*k+T*Z+E*q,s[7]=I*P+S*V+T*j+E*ie,s[11]=I*M+S*U+T*K+E*ne,s[15]=I*O+S*z+T*J+E*le,this}multiplyScalar(e){const 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}determinant(){const e=this.elements,t=e[0],r=e[4],n=e[8],s=e[12],a=e[1],o=e[5],l=e[9],u=e[13],c=e[2],d=e[6],h=e[10],p=e[14],g=e[3],x=e[7],v=e[11],y=e[15];return g*(+s*l*d-n*u*d-s*o*h+r*u*h+n*o*p-r*l*p)+x*(+t*l*p-t*u*h+s*a*h-n*a*p+n*u*c-s*l*c)+v*(+t*u*d-t*o*p-s*a*d+r*a*p+s*o*c-r*u*c)+y*(-n*o*c-t*l*d+t*o*h+n*a*d-r*a*h+r*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,r){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=r),this}invert(){const e=this.elements,t=e[0],r=e[1],n=e[2],s=e[3],a=e[4],o=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],p=e[11],g=e[12],x=e[13],v=e[14],y=e[15],I=d*v*u-x*h*u+x*l*p-o*v*p-d*l*y+o*h*y,S=g*h*u-c*v*u-g*l*p+a*v*p+c*l*y-a*h*y,T=c*x*u-g*d*u+g*o*p-a*x*p-c*o*y+a*d*y,E=g*d*l-c*x*l-g*o*h+a*x*h+c*o*v-a*d*v,B=t*I+r*S+n*T+s*E;if(B===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/B;return e[0]=I*P,e[1]=(x*h*s-d*v*s-x*n*p+r*v*p+d*n*y-r*h*y)*P,e[2]=(o*v*s-x*l*s+x*n*u-r*v*u-o*n*y+r*l*y)*P,e[3]=(d*l*s-o*h*s-d*n*u+r*h*u+o*n*p-r*l*p)*P,e[4]=S*P,e[5]=(c*v*s-g*h*s+g*n*p-t*v*p-c*n*y+t*h*y)*P,e[6]=(g*l*s-a*v*s-g*n*u+t*v*u+a*n*y-t*l*y)*P,e[7]=(a*h*s-c*l*s+c*n*u-t*h*u-a*n*p+t*l*p)*P,e[8]=T*P,e[9]=(g*d*s-c*x*s-g*r*p+t*x*p+c*r*y-t*d*y)*P,e[10]=(a*x*s-g*o*s+g*r*u-t*x*u-a*r*y+t*o*y)*P,e[11]=(c*o*s-a*d*s-c*r*u+t*d*u+a*r*p-t*o*p)*P,e[12]=E*P,e[13]=(c*x*n-g*d*n+g*r*h-t*x*h-c*r*v+t*d*v)*P,e[14]=(g*o*n-a*x*n-g*r*l+t*x*l+a*r*v-t*o*v)*P,e[15]=(a*d*n-c*o*n+c*r*l-t*d*l-a*r*h+t*o*h)*P,this}scale(e){const t=this.elements,r=e.x,n=e.y,s=e.z;return t[0]*=r,t[4]*=n,t[8]*=s,t[1]*=r,t[5]*=n,t[9]*=s,t[2]*=r,t[6]*=n,t[10]*=s,t[3]*=r,t[7]*=n,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n))}makeTranslation(e,t,r){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const r=Math.cos(t),n=Math.sin(t),s=1-r,a=e.x,o=e.y,l=e.z,u=s*a,c=s*o;return this.set(u*a+r,u*o-n*l,u*l+n*o,0,u*o+n*l,c*o+r,c*l-n*a,0,u*l-n*o,c*l+n*a,s*l*l+r,0,0,0,0,1),this}makeScale(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,t,r,n,s,a){return this.set(1,r,s,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,r){const n=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,u=s+s,c=a+a,d=o+o,h=s*u,p=s*c,g=s*d,x=a*c,v=a*d,y=o*d,I=l*u,S=l*c,T=l*d,E=r.x,B=r.y,P=r.z;return n[0]=(1-(x+y))*E,n[1]=(p+T)*E,n[2]=(g-S)*E,n[3]=0,n[4]=(p-T)*B,n[5]=(1-(h+y))*B,n[6]=(v+I)*B,n[7]=0,n[8]=(g+S)*P,n[9]=(v-I)*P,n[10]=(1-(h+x))*P,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,r){const n=this.elements;let s=$Z.set(n[0],n[1],n[2]).length();const a=$Z.set(n[4],n[5],n[6]).length(),o=$Z.set(n[8],n[9],n[10]).length();this.determinant()<0&&(s=-s),e.x=n[12],e.y=n[13],e.z=n[14],YD.copy(this);const u=1/s,c=1/a,d=1/o;return YD.elements[0]*=u,YD.elements[1]*=u,YD.elements[2]*=u,YD.elements[4]*=c,YD.elements[5]*=c,YD.elements[6]*=c,YD.elements[8]*=d,YD.elements[9]*=d,YD.elements[10]*=d,t.setFromRotationMatrix(YD),r.x=s,r.y=a,r.z=o,this}makePerspective(e,t,r,n,s,a,o=Q9){const l=this.elements,u=2*s/(t-e),c=2*s/(r-n),d=(t+e)/(t-e),h=(r+n)/(r-n);let p,g;if(o===Q9)p=-(a+s)/(a-s),g=-2*a*s/(a-s);else if(o===ave)p=-a/(a-s),g=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return l[0]=u,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,r,n,s,a,o=Q9){const l=this.elements,u=1/(t-e),c=1/(r-n),d=1/(a-s),h=(t+e)*u,p=(r+n)*c;let g,x;if(o===Q9)g=(a+s)*d,x=-2*d;else if(o===ave)g=s*d,x=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=x,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,r=e.elements;for(let n=0;n<16;n++)if(t[n]!==r[n])return!1;return!0}fromArray(e,t=0){for(let r=0;r<16;r++)this.elements[r]=e[r+t];return this}toArray(e=[],t=0){const r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}}const $Z=new er,YD=new vo,PTn=new er(0,0,0),MTn=new er(1,1,1),vw=new er,hve=new er,mA=new er,R4r=new vo,w4r=new yI;class eie{constructor(e=0,t=0,r=0,n=eie.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=r,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,r,n=this._order){return this._x=e,this._y=t,this._z=r,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,r=!0){const n=e.elements,s=n[0],a=n[4],o=n[8],l=n[1],u=n[5],c=n[9],d=n[2],h=n[6],p=n[10];switch(t){case"XYZ":this._y=Math.asin(Kg(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Kg(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(Kg(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Kg(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Kg(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-Kg(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,u),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-c,p),this._y=0);break;default:}return this._order=t,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,r){return R4r.makeRotationFromQuaternion(e),this.setFromRotationMatrix(R4r,t,r)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return w4r.setFromEuler(this),this.setFromQuaternion(w4r,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}eie.DEFAULT_ORDER="XYZ";class iit{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let NTn=0;const F4r=new er,ez=new yI,eT=new vo,fve=new er,tie=new er,OTn=new er,LTn=new yI,B4r=new er(1,0,0),P4r=new er(0,1,0),M4r=new er(0,0,1),kTn={type:"added"},N4r={type:"removed"};class lf extends dO{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:NTn++}),this.uuid=xI(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=lf.DEFAULT_UP.clone();const e=new er,t=new eie,r=new yI,n=new er(1,1,1);function s(){r.setFromEuler(t,!1)}function a(){t.setFromQuaternion(r,void 0,!1)}t._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new vo},normalMatrix:{value:new cc}}),this.matrix=new vo,this.matrixWorld=new vo,this.matrixAutoUpdate=lf.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=lf.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.layers=new iit,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ez.setFromAxisAngle(e,t),this.quaternion.multiply(ez),this}rotateOnWorldAxis(e,t){return ez.setFromAxisAngle(e,t),this.quaternion.premultiply(ez),this}rotateX(e){return this.rotateOnAxis(B4r,e)}rotateY(e){return this.rotateOnAxis(P4r,e)}rotateZ(e){return this.rotateOnAxis(M4r,e)}translateOnAxis(e,t){return F4r.copy(e).applyQuaternion(this.quaternion),this.position.add(F4r.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(B4r,e)}translateY(e){return this.translateOnAxis(P4r,e)}translateZ(e){return this.translateOnAxis(M4r,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(eT.copy(this.matrixWorld).invert())}lookAt(e,t,r){e.isVector3?fve.copy(e):fve.set(e,t,r);const n=this.parent;this.updateWorldMatrix(!0,!1),tie.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?eT.lookAt(tie,fve,this.up):eT.lookAt(fve,tie,this.up),this.quaternion.setFromRotationMatrix(eT),n&&(eT.extractRotation(n.matrixWorld),ez.setFromRotationMatrix(eT),this.quaternion.premultiply(ez.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?this:(e&&e.isObject3D&&(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(kTn)),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(N4r)),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(N4r)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),eT.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),eT.multiply(e.parent.matrixWorld)),e.applyMatrix4(eT),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let r=0,n=this.children.length;r<n;r++){const a=this.children[r].getObjectByProperty(e,t);if(a!==void 0)return a}}getObjectsByProperty(e,t){let r=[];this[e]===t&&r.push(this);for(let n=0,s=this.children.length;n<s;n++){const a=this.children[n].getObjectsByProperty(e,t);a.length>0&&(r=r.concat(a))}return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(tie,e,OTn),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(tie,LTn,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let r=0,n=t.length;r<n;r++)t[r].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let r=0,n=t.length;r<n;r++){const s=t[r];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const r=this.parent;if(e===!0&&r!==null&&r.matrixWorldAutoUpdate===!0&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),t===!0){const n=this.children;for(let s=0,a=n.length;s<a;s++){const o=n[s];o.matrixWorldAutoUpdate===!0&&o.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const n={};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.castShadow===!0&&(n.castShadow=!0),this.receiveShadow===!0&&(n.receiveShadow=!0),this.visible===!1&&(n.visible=!1),this.frustumCulled===!1&&(n.frustumCulled=!1),this.renderOrder!==0&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(n.instanceColor=this.instanceColor.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const d=l[u];s(e.shapes,d)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let l=0,u=this.material.length;l<u;l++)o.push(s(e.materials,this.material[l]));n.material=o}else n.material=s(e.materials,this.material);if(this.children.length>0){n.children=[];for(let o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let o=0;o<this.animations.length;o++){const l=this.animations[o];n.animations.push(s(e.animations,l))}}if(t){const o=a(e.geometries),l=a(e.materials),u=a(e.textures),c=a(e.images),d=a(e.shapes),h=a(e.skeletons),p=a(e.animations),g=a(e.nodes);o.length>0&&(r.geometries=o),l.length>0&&(r.materials=l),u.length>0&&(r.textures=u),c.length>0&&(r.images=c),d.length>0&&(r.shapes=d),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),g.length>0&&(r.nodes=g)}return r.object=n,r;function a(o){const l=[];for(const u in o){const c=o[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,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.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let r=0;r<e.children.length;r++){const n=e.children[r];this.add(n.clone())}return this}}lf.DEFAULT_UP=new er(0,1,0),lf.DEFAULT_MATRIX_AUTO_UPDATE=!0,lf.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const jD=new er,tT=new er,nit=new er,rT=new er,tz=new er,rz=new er,O4r=new er,sit=new er,ait=new er,oit=new er;let pve=!1;class L2{constructor(e=new er,t=new er,r=new er){this.a=e,this.b=t,this.c=r}static getNormal(e,t,r,n){n.subVectors(r,t),jD.subVectors(e,t),n.cross(jD);const s=n.lengthSq();return s>0?n.multiplyScalar(1/Math.sqrt(s)):n.set(0,0,0)}static getBarycoord(e,t,r,n,s){jD.subVectors(n,t),tT.subVectors(r,t),nit.subVectors(e,t);const a=jD.dot(jD),o=jD.dot(tT),l=jD.dot(nit),u=tT.dot(tT),c=tT.dot(nit),d=a*u-o*o;if(d===0)return s.set(-2,-1,-1);const h=1/d,p=(u*l-o*c)*h,g=(a*c-o*l)*h;return s.set(1-p-g,g,p)}static containsPoint(e,t,r,n){return this.getBarycoord(e,t,r,n,rT),rT.x>=0&&rT.y>=0&&rT.x+rT.y<=1}static getUV(e,t,r,n,s,a,o,l){return pve===!1&&(pve=!0),this.getInterpolation(e,t,r,n,s,a,o,l)}static getInterpolation(e,t,r,n,s,a,o,l){return this.getBarycoord(e,t,r,n,rT),l.setScalar(0),l.addScaledVector(s,rT.x),l.addScaledVector(a,rT.y),l.addScaledVector(o,rT.z),l}static isFrontFacing(e,t,r,n){return jD.subVectors(r,t),tT.subVectors(e,t),jD.cross(tT).dot(n)<0}set(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this}setFromPointsAndIndices(e,t,r,n){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,r,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return jD.subVectors(this.c,this.b),tT.subVectors(this.a,this.b),jD.cross(tT).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return L2.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return L2.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,r,n,s){return pve===!1&&(pve=!0),L2.getInterpolation(e,this.a,this.b,this.c,t,r,n,s)}getInterpolation(e,t,r,n,s){return L2.getInterpolation(e,this.a,this.b,this.c,t,r,n,s)}containsPoint(e){return L2.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return L2.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const r=this.a,n=this.b,s=this.c;let a,o;tz.subVectors(n,r),rz.subVectors(s,r),sit.subVectors(e,r);const l=tz.dot(sit),u=rz.dot(sit);if(l<=0&&u<=0)return t.copy(r);ait.subVectors(e,n);const c=tz.dot(ait),d=rz.dot(ait);if(c>=0&&d<=c)return t.copy(n);const h=l*d-c*u;if(h<=0&&l>=0&&c<=0)return a=l/(l-c),t.copy(r).addScaledVector(tz,a);oit.subVectors(e,s);const p=tz.dot(oit),g=rz.dot(oit);if(g>=0&&p<=g)return t.copy(s);const x=p*u-l*g;if(x<=0&&u>=0&&g<=0)return o=u/(u-g),t.copy(r).addScaledVector(rz,o);const v=c*g-p*d;if(v<=0&&d-c>=0&&p-g>=0)return O4r.subVectors(s,n),o=(d-c)/(d-c+(p-g)),t.copy(n).addScaledVector(O4r,o);const y=1/(v+x+h);return a=x*y,o=h*y,t.copy(r).addScaledVector(tz,a).addScaledVector(rz,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let GTn=0;class KD extends dO{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:GTn++}),this.uuid=xI(),this.name="",this.type="Material",this.blending=VZ,this.side=zD,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=FEr,this.blendDst=BEr,this.blendEquation=WZ,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Frt,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=eTn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Hrt,this.stencilZFail=Hrt,this.stencilZPass=Hrt,this.stencilWrite=!1,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.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const r=e[t];if(r===void 0)continue;const n=this[t];n!==void 0&&(n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r)}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==VZ&&(r.blending=this.blending),this.side!==zD&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.colorWrite=this.colorWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=this.alphaHash),this.alphaToCoverage===!0&&(r.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(r.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=this.flatShading),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function n(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=n(e.textures),a=n(e.images);s.length>0&&(r.textures=s),a.length>0&&(r.images=a)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,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.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let r=null;if(t!==null){const n=t.length;r=new Array(n);for(let s=0;s!==n;++s)r[s]=t[s].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,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.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const L4r={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,mediumpurple: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},QD={h:0,s:0,l:0},gve={h:0,s:0,l:0};function lit(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class _s{constructor(e,t,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,r)}set(e,t,r){if(t===void 0&&r===void 0){const n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Vl){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,XD.toWorkingColorSpace(this,t),this}setRGB(e,t,r,n=XD.workingColorSpace){return this.r=e,this.g=t,this.b=r,XD.toWorkingColorSpace(this,n),this}setHSL(e,t,r,n=XD.workingColorSpace){if(e=Xrt(e,1),t=Kg(t,0,1),r=Kg(r,0,1),t===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+t):r+t-r*t,a=2*r-s;this.r=lit(a,s,e+1/3),this.g=lit(a,s,e),this.b=lit(a,s,e-1/3)}return XD.toWorkingColorSpace(this,n),this}setStyle(e,t=Vl){function r(s){s!==void 0&&parseFloat(s)<1}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=n[1],o=n[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=n[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Vl){const r=L4r[e.toLowerCase()];return r!==void 0&&this.setHex(r,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=YZ(e.r),this.g=YZ(e.g),this.b=YZ(e.b),this}copyLinearToSRGB(e){return this.r=Krt(e.r),this.g=Krt(e.g),this.b=Krt(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Vl){return XD.fromWorkingColorSpace(Jx.copy(this),e),Math.round(Kg(Jx.r*255,0,255))*65536+Math.round(Kg(Jx.g*255,0,255))*256+Math.round(Kg(Jx.b*255,0,255))}getHexString(e=Vl){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=XD.workingColorSpace){XD.fromWorkingColorSpace(Jx.copy(this),t);const r=Jx.r,n=Jx.g,s=Jx.b,a=Math.max(r,n,s),o=Math.min(r,n,s);let l,u;const c=(o+a)/2;if(o===a)l=0,u=0;else{const d=a-o;switch(u=c<=.5?d/(a+o):d/(2-a-o),a){case r:l=(n-s)/d+(n<s?6:0);break;case n:l=(s-r)/d+2;break;case s:l=(r-n)/d+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=XD.workingColorSpace){return XD.fromWorkingColorSpace(Jx.copy(this),t),e.r=Jx.r,e.g=Jx.g,e.b=Jx.b,e}getStyle(e=Vl){XD.fromWorkingColorSpace(Jx.copy(this),e);const t=Jx.r,r=Jx.g,n=Jx.b;return e!==Vl?`color(${e} ${t.toFixed(3)} ${r.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(r*255)},${Math.round(n*255)})`}offsetHSL(e,t,r){return this.getHSL(QD),QD.h+=e,QD.s+=t,QD.l+=r,this.setHSL(QD.h,QD.s,QD.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(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(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(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}lerpColors(e,t,r){return this.r=e.r+(t.r-e.r)*r,this.g=e.g+(t.g-e.g)*r,this.b=e.b+(t.b-e.b)*r,this}lerpHSL(e,t){this.getHSL(QD),e.getHSL(gve);const r=Kre(QD.h,gve.h,t),n=Kre(QD.s,gve.s,t),s=Kre(QD.l,gve.l,t);return this.setHSL(r,n,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,r=this.g,n=this.b,s=e.elements;return this.r=s[0]*t+s[3]*r+s[6]*n,this.g=s[1]*t+s[4]*r+s[7]*n,this.b=s[2]*t+s[5]*r+s[8]*n,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Jx=new _s;_s.NAMES=L4r;class Ef extends KD{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _s(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=PEr,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(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.fog=e.fog,this}}const Qg=new er,mve=new En;class d0{constructor(e,t,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=r,this.usage=Zrt,this.updateRange={offset:0,count:-1},this.gpuType=P4,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(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.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,r){e*=this.itemSize,r*=t.itemSize;for(let n=0,s=this.itemSize;n<s;n++)this.array[e+n]=t.array[r+n];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,r=this.count;t<r;t++)mve.fromBufferAttribute(this,t),mve.applyMatrix3(e),this.setXY(t,mve.x,mve.y);else if(this.itemSize===3)for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.applyMatrix3(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}applyMatrix4(e){for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.applyMatrix4(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}applyNormalMatrix(e){for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.applyNormalMatrix(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}transformDirection(e){for(let t=0,r=this.count;t<r;t++)Qg.fromBufferAttribute(this,t),Qg.transformDirection(e),this.setXYZ(t,Qg.x,Qg.y,Qg.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let r=this.array[e*this.itemSize+t];return this.normalized&&(r=O4(r,this.array)),r}setComponent(e,t,r){return this.normalized&&(r=Wh(r,this.array)),this.array[e*this.itemSize+t]=r,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=O4(t,this.array)),t}setX(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=O4(t,this.array)),t}setY(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=O4(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=O4(t,this.array)),t}setW(e,t){return this.normalized&&(t=Wh(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,r){return e*=this.itemSize,this.normalized&&(t=Wh(t,this.array),r=Wh(r,this.array)),this.array[e+0]=t,this.array[e+1]=r,this}setXYZ(e,t,r,n){return e*=this.itemSize,this.normalized&&(t=Wh(t,this.array),r=Wh(r,this.array),n=Wh(n,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this}setXYZW(e,t,r,n,s){return e*=this.itemSize,this.normalized&&(t=Wh(t,this.array),r=Wh(r,this.array),n=Wh(n,this.array),s=Wh(s,this.array)),this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Zrt&&(e.usage=this.usage),(this.updateRange.offset!==0||this.updateRange.count!==-1)&&(e.updateRange=this.updateRange),e}}class k4r extends d0{constructor(e,t,r){super(new Uint16Array(e),t,r)}}class G4r extends d0{constructor(e,t,r){super(new Uint32Array(e),t,r)}}class td extends d0{constructor(e,t,r){super(new Float32Array(e),t,r)}}let VTn=0;const CI=new vo,uit=new lf,iz=new er,xA=new c0,rie=new c0,Rm=new er;class Td extends dO{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:VTn++}),this.uuid=xI(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(I4r(e)?G4r:k4r)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,r=0){this.groups.push({start:e,count:t,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const r=this.attributes.normal;if(r!==void 0){const s=new cc().getNormalMatrix(e);r.applyNormalMatrix(s),r.needsUpdate=!0}const n=this.attributes.tangent;return n!==void 0&&(n.transformDirection(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return CI.makeRotationFromQuaternion(e),this.applyMatrix4(CI),this}rotateX(e){return CI.makeRotationX(e),this.applyMatrix4(CI),this}rotateY(e){return CI.makeRotationY(e),this.applyMatrix4(CI),this}rotateZ(e){return CI.makeRotationZ(e),this.applyMatrix4(CI),this}translate(e,t,r){return CI.makeTranslation(e,t,r),this.applyMatrix4(CI),this}scale(e,t,r){return CI.makeScale(e,t,r),this.applyMatrix4(CI),this}lookAt(e){return uit.lookAt(e),uit.updateMatrix(),this.applyMatrix4(uit.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(iz).negate(),this.translate(iz.x,iz.y,iz.z),this}setFromPoints(e){const t=[];for(let r=0,n=e.length;r<n;r++){const s=e[r];t.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new td(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new c0);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){this.boundingBox.set(new er(-1/0,-1/0,-1/0),new er(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let r=0,n=t.length;r<n;r++){const s=t[r];xA.setFromBufferAttribute(s),this.morphTargetsRelative?(Rm.addVectors(this.boundingBox.min,xA.min),this.boundingBox.expandByPoint(Rm),Rm.addVectors(this.boundingBox.max,xA.max),this.boundingBox.expandByPoint(Rm)):(this.boundingBox.expandByPoint(xA.min),this.boundingBox.expandByPoint(xA.max))}}else this.boundingBox.makeEmpty();isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new W3);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){this.boundingSphere.set(new er,1/0);return}if(e){const r=this.boundingSphere.center;if(xA.setFromBufferAttribute(e),t)for(let s=0,a=t.length;s<a;s++){const o=t[s];rie.setFromBufferAttribute(o),this.morphTargetsRelative?(Rm.addVectors(xA.min,rie.min),xA.expandByPoint(Rm),Rm.addVectors(xA.max,rie.max),xA.expandByPoint(Rm)):(xA.expandByPoint(rie.min),xA.expandByPoint(rie.max))}xA.getCenter(r);let n=0;for(let s=0,a=e.count;s<a;s++)Rm.fromBufferAttribute(e,s),n=Math.max(n,r.distanceToSquared(Rm));if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s],l=this.morphTargetsRelative;for(let u=0,c=o.count;u<c;u++)Rm.fromBufferAttribute(o,u),l&&(iz.fromBufferAttribute(e,u),Rm.add(iz)),n=Math.max(n,r.distanceToSquared(Rm))}this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0)return;const r=e.array,n=t.position.array,s=t.normal.array,a=t.uv.array,o=n.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new d0(new Float32Array(4*o),4));const l=this.getAttribute("tangent").array,u=[],c=[];for(let k=0;k<o;k++)u[k]=new er,c[k]=new er;const d=new er,h=new er,p=new er,g=new En,x=new En,v=new En,y=new er,I=new er;function S(k,V,U){d.fromArray(n,k*3),h.fromArray(n,V*3),p.fromArray(n,U*3),g.fromArray(a,k*2),x.fromArray(a,V*2),v.fromArray(a,U*2),h.sub(d),p.sub(d),x.sub(g),v.sub(g);const z=1/(x.x*v.y-v.x*x.y);isFinite(z)&&(y.copy(h).multiplyScalar(v.y).addScaledVector(p,-x.y).multiplyScalar(z),I.copy(p).multiplyScalar(x.x).addScaledVector(h,-v.x).multiplyScalar(z),u[k].add(y),u[V].add(y),u[U].add(y),c[k].add(I),c[V].add(I),c[U].add(I))}let T=this.groups;T.length===0&&(T=[{start:0,count:r.length}]);for(let k=0,V=T.length;k<V;++k){const U=T[k],z=U.start,Z=U.count;for(let j=z,K=z+Z;j<K;j+=3)S(r[j+0],r[j+1],r[j+2])}const E=new er,B=new er,P=new er,M=new er;function O(k){P.fromArray(s,k*3),M.copy(P);const V=u[k];E.copy(V),E.sub(P.multiplyScalar(P.dot(V))).normalize(),B.crossVectors(M,V);const z=B.dot(c[k])<0?-1:1;l[k*4]=E.x,l[k*4+1]=E.y,l[k*4+2]=E.z,l[k*4+3]=z}for(let k=0,V=T.length;k<V;++k){const U=T[k],z=U.start,Z=U.count;for(let j=z,K=z+Z;j<K;j+=3)O(r[j+0]),O(r[j+1]),O(r[j+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new d0(new Float32Array(t.count*3),3),this.setAttribute("normal",r);else for(let h=0,p=r.count;h<p;h++)r.setXYZ(h,0,0,0);const n=new er,s=new er,a=new er,o=new er,l=new er,u=new er,c=new er,d=new er;if(e)for(let h=0,p=e.count;h<p;h+=3){const g=e.getX(h+0),x=e.getX(h+1),v=e.getX(h+2);n.fromBufferAttribute(t,g),s.fromBufferAttribute(t,x),a.fromBufferAttribute(t,v),c.subVectors(a,s),d.subVectors(n,s),c.cross(d),o.fromBufferAttribute(r,g),l.fromBufferAttribute(r,x),u.fromBufferAttribute(r,v),o.add(c),l.add(c),u.add(c),r.setXYZ(g,o.x,o.y,o.z),r.setXYZ(x,l.x,l.y,l.z),r.setXYZ(v,u.x,u.y,u.z)}else for(let h=0,p=t.count;h<p;h+=3)n.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),a.fromBufferAttribute(t,h+2),c.subVectors(a,s),d.subVectors(n,s),c.cross(d),r.setXYZ(h+0,c.x,c.y,c.z),r.setXYZ(h+1,c.x,c.y,c.z),r.setXYZ(h+2,c.x,c.y,c.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,r=e.count;t<r;t++)Rm.fromBufferAttribute(e,t),Rm.normalize(),e.setXYZ(t,Rm.x,Rm.y,Rm.z)}toNonIndexed(){function e(o,l){const u=o.array,c=o.itemSize,d=o.normalized,h=new u.constructor(l.length*c);let p=0,g=0;for(let x=0,v=l.length;x<v;x++){o.isInterleavedBufferAttribute?p=l[x]*o.data.stride+o.offset:p=l[x]*c;for(let y=0;y<c;y++)h[g++]=u[p++]}return new d0(h,c,d)}if(this.index===null)return this;const t=new Td,r=this.index.array,n=this.attributes;for(const o in n){const l=n[o],u=e(l,r);t.setAttribute(o,u)}const s=this.morphAttributes;for(const o in s){const l=[],u=s[o];for(let c=0,d=u.length;c<d;c++){const h=u[c],p=e(h,r);l.push(p)}t.morphAttributes[o]=l}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,l=a.length;o<l;o++){const u=a[o];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,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),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const r=this.attributes;for(const l in r){const u=r[l];e.data.attributes[l]=u.toJSON(e.data)}const n={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,h=u.length;d<h;d++){const p=u[d];c.push(p.toJSON(e.data))}c.length>0&&(n[l]=c,s=!0)}s&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(t));const n=e.attributes;for(const u in n){const c=n[u];this.setAttribute(u,c.clone(t))}const s=e.morphAttributes;for(const u in s){const c=[],d=s[u];for(let h=0,p=d.length;h<p;h++)c.push(d[h].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let u=0,c=a.length;u<c;u++){const d=a[u];this.addGroup(d.start,d.count,d.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const V4r=new vo,pO=new xw,xve=new W3,W4r=new er,nz=new er,sz=new er,az=new er,cit=new er,vve=new er,yve=new En,Cve=new En,Ave=new En,U4r=new er,H4r=new er,Z4r=new er,bve=new er,Ive=new er;class Ku extends lf{constructor(e=new Td,t=new Ef){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,r=Object.keys(t);if(r.length>0){const n=t[r[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=n.length;s<a;s++){const o=n[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,t){const r=this.geometry,n=r.attributes.position,s=r.morphAttributes.position,a=r.morphTargetsRelative;t.fromBufferAttribute(n,e);const o=this.morphTargetInfluences;if(s&&o){vve.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const c=o[l],d=s[l];c!==0&&(cit.fromBufferAttribute(d,e),a?vve.addScaledVector(cit,c):vve.addScaledVector(cit.sub(t),c))}t.add(vve)}return t}raycast(e,t){const r=this.geometry,n=this.material,s=this.matrixWorld;n!==void 0&&(r.boundingSphere===null&&r.computeBoundingSphere(),xve.copy(r.boundingSphere),xve.applyMatrix4(s),pO.copy(e.ray).recast(e.near),!(xve.containsPoint(pO.origin)===!1&&(pO.intersectSphere(xve,W4r)===null||pO.origin.distanceToSquared(W4r)>(e.far-e.near)**2))&&(V4r.copy(s).invert(),pO.copy(e.ray).applyMatrix4(V4r),!(r.boundingBox!==null&&pO.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,t,pO)))}_computeIntersections(e,t,r){let n;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,u=s.attributes.uv,c=s.attributes.uv1,d=s.attributes.normal,h=s.groups,p=s.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,x=h.length;g<x;g++){const v=h[g],y=a[v.materialIndex],I=Math.max(v.start,p.start),S=Math.min(o.count,Math.min(v.start+v.count,p.start+p.count));for(let T=I,E=S;T<E;T+=3){const B=o.getX(T),P=o.getX(T+1),M=o.getX(T+2);n=_ve(this,y,e,r,u,c,d,B,P,M),n&&(n.faceIndex=Math.floor(T/3),n.face.materialIndex=v.materialIndex,t.push(n))}}else{const g=Math.max(0,p.start),x=Math.min(o.count,p.start+p.count);for(let v=g,y=x;v<y;v+=3){const I=o.getX(v),S=o.getX(v+1),T=o.getX(v+2);n=_ve(this,a,e,r,u,c,d,I,S,T),n&&(n.faceIndex=Math.floor(v/3),t.push(n))}}else if(l!==void 0)if(Array.isArray(a))for(let g=0,x=h.length;g<x;g++){const v=h[g],y=a[v.materialIndex],I=Math.max(v.start,p.start),S=Math.min(l.count,Math.min(v.start+v.count,p.start+p.count));for(let T=I,E=S;T<E;T+=3){const B=T,P=T+1,M=T+2;n=_ve(this,y,e,r,u,c,d,B,P,M),n&&(n.faceIndex=Math.floor(T/3),n.face.materialIndex=v.materialIndex,t.push(n))}}else{const g=Math.max(0,p.start),x=Math.min(l.count,p.start+p.count);for(let v=g,y=x;v<y;v+=3){const I=v,S=v+1,T=v+2;n=_ve(this,a,e,r,u,c,d,I,S,T),n&&(n.faceIndex=Math.floor(v/3),t.push(n))}}}}function WTn(i,e,t,r,n,s,a,o){let l;if(e.side===fy?l=r.intersectTriangle(a,s,n,!0,o):l=r.intersectTriangle(n,s,a,e.side===zD,o),l===null)return null;Ive.copy(o),Ive.applyMatrix4(i.matrixWorld);const u=t.ray.origin.distanceTo(Ive);return u<t.near||u>t.far?null:{distance:u,point:Ive.clone(),object:i}}function _ve(i,e,t,r,n,s,a,o,l,u){i.getVertexPosition(o,nz),i.getVertexPosition(l,sz),i.getVertexPosition(u,az);const c=WTn(i,e,t,r,nz,sz,az,bve);if(c){n&&(yve.fromBufferAttribute(n,o),Cve.fromBufferAttribute(n,l),Ave.fromBufferAttribute(n,u),c.uv=L2.getInterpolation(bve,nz,sz,az,yve,Cve,Ave,new En)),s&&(yve.fromBufferAttribute(s,o),Cve.fromBufferAttribute(s,l),Ave.fromBufferAttribute(s,u),c.uv1=L2.getInterpolation(bve,nz,sz,az,yve,Cve,Ave,new En),c.uv2=c.uv1),a&&(U4r.fromBufferAttribute(a,o),H4r.fromBufferAttribute(a,l),Z4r.fromBufferAttribute(a,u),c.normal=L2.getInterpolation(bve,nz,sz,az,U4r,H4r,Z4r,new er),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const d={a:o,b:l,c:u,normal:new er,materialIndex:0};L2.getNormal(nz,sz,az,d.normal),c.face=d}return c}class gO extends Td{constructor(e=1,t=1,r=1,n=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:r,widthSegments:n,heightSegments:s,depthSegments:a};const o=this;n=Math.floor(n),s=Math.floor(s),a=Math.floor(a);const l=[],u=[],c=[],d=[];let h=0,p=0;g("z","y","x",-1,-1,r,t,e,a,s,0),g("z","y","x",1,-1,r,t,-e,a,s,1),g("x","z","y",1,1,e,r,t,n,a,2),g("x","z","y",1,-1,e,r,-t,n,a,3),g("x","y","z",1,-1,e,t,r,n,s,4),g("x","y","z",-1,-1,e,t,-r,n,s,5),this.setIndex(l),this.setAttribute("position",new td(u,3)),this.setAttribute("normal",new td(c,3)),this.setAttribute("uv",new td(d,2));function g(x,v,y,I,S,T,E,B,P,M,O){const k=T/P,V=E/M,U=T/2,z=E/2,Z=B/2,j=P+1,K=M+1;let J=0,q=0;const ie=new er;for(let ne=0;ne<K;ne++){const le=ne*V-z;for(let de=0;de<j;de++){const he=de*k-U;ie[x]=he*I,ie[v]=le*S,ie[y]=Z,u.push(ie.x,ie.y,ie.z),ie[x]=0,ie[v]=0,ie[y]=B>0?1:-1,c.push(ie.x,ie.y,ie.z),d.push(de/P),d.push(1-ne/M),J+=1}}for(let ne=0;ne<M;ne++)for(let le=0;le<P;le++){const de=h+le+j*ne,he=h+le+j*(ne+1),ge=h+(le+1)+j*(ne+1),ce=h+(le+1)+j*ne;l.push(de,he,ce),l.push(he,ge,ce),q+=6}o.addGroup(p,q,O),p+=q,h+=J}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new gO(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function oz(i){const e={};for(const t in i){e[t]={};for(const r in i[t]){const n=i[t][r];n&&(n.isColor||n.isMatrix3||n.isMatrix4||n.isVector2||n.isVector3||n.isVector4||n.isTexture||n.isQuaternion)?n.isRenderTargetTexture?e[t][r]=null:e[t][r]=n.clone():Array.isArray(n)?e[t][r]=n.slice():e[t][r]=n}}return e}function gy(i){const e={};for(let t=0;t<i.length;t++){const r=oz(i[t]);for(const n in r)e[n]=r[n]}return e}function UTn(i){const e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function z4r(i){return i.getRenderTarget()===null?i.outputColorSpace:N4}const L4={clone:oz,merge:gy};var HTn=`void main() {
|
|
33869
33869
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
33870
33870
|
}`,ZTn=`void main() {
|
|
33871
33871
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|