qt-human 4.4.2 → 4.5.0

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.
@@ -1 +1 @@
1
- import*as t from"@tensorflow-models/pose-detection";import"@tensorflow/tfjs-backend-webgl";import*as e from"@tensorflow/tfjs-core";import*as i from"@vladmandic/face-api";import{h as s}from"./human-core-B5XXN8k3.js";import"./shared-OkYqVHlV.js";import"./render-XYHbtvY-.js";import"three";import"three/examples/jsm/controls/OrbitControls.js";import"three/examples/jsm/loaders/RGBELoader.js";import"three/examples/jsm/loaders/GLTFLoader.js";import"three/examples/jsm/loaders/KTX2Loader.js";import"three/examples/jsm/libs/meshopt_decoder.module.js";import"three/examples/jsm/loaders/DRACOLoader.js";import"three/addons/controls/OrbitControls.js";class a{video;stream=null;facingMode;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"user";this.video=t,this.facingMode=e}async open(){return this.stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:this.facingMode},audio:!1}),this.video.srcObject=this.stream,await this.video.play(),!0}close(){this.stream?.getTracks().forEach((t=>t.stop())),this.stream=null,this.video.srcObject=null}switch(t){return this.close(),this.facingMode=t,this.open()}getVideoEl(){return this.video}getStream(){return this.stream}isOpen(){return null!==this.stream}}class n{baselineWidth=60;lastState="stable";threshold;callback;constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.2;this.threshold=t}onChange(t){this.callback=t}update(t){const e=t.find((t=>"left_shoulder"===t.name)),i=t.find((t=>"right_shoulder"===t.name));if(!e||!i)return;const s=e.x-i.x,a=e.y-i.y,n=Math.sqrt(s*s+a*a);if(null===this.baselineWidth)return void(this.baselineWidth=n);let o="stable";n>this.baselineWidth*this.threshold?o="near":n<this.baselineWidth/this.threshold-20&&(o="far"),"stable"!==o&&o!==this.lastState&&(this.lastState=o,this.callback?.(o))}}const o="";const r={detection:class{detector=null;mediaStrea=null;interval=null;proximityDetector;constructor(){this.proximityDetector=new n}async init(i){this.mediaStrea=i,await e.setBackend("webgl"),await e.ready(),this.detector=await t.createDetector(t.SupportedModels.MoveNet,{modelType:"SinglePose.Lightning"})}on(t){this.interval&&clearInterval(this.interval),this.proximityDetector.onChange(t),this.interval=setInterval((async()=>{const t=await this.detect(this.mediaStrea.video);t.length>0&&this.proximityDetector.update(t[0].keypoints)}),300)}async detect(t){if(!this.detector)throw new Error("PoseDetector not initialized");return await this.detector.estimatePoses(t)}async destroy(){this.interval&&(clearInterval(this.interval),this.interval=null),this.detector&&(await this.detector.dispose(),this.detector=null),this.mediaStrea=null}},face:class{name="face";isInitialized=!1;interval=null;canvas=null;constructor(){}async initFaceAPI(){await e.setBackend("webgl"),await e.ready(),await i.nets.faceLandmark68Net.loadFromUri("/models"),await i.nets.ssdMobilenetv1.loadFromUri("/models"),await i.nets.faceRecognitionNet.loadFromUri("/models")}async startFaceRecognition(t,e,a){this.interval&&clearInterval(this.interval);const{duration:n=3e3,minConfidence:o=.6,maxResults:r=5,drawDetections:l=!1,drawFaceLandmarks:c=!1}=e;!1===this.isInitialized&&(await this.initFaceAPI(),this.isInitialized=!0);const h=l||c,d=t.getVideoEl();let m=null,u={width:0,height:0};return h&&(m=i.createCanvasFromMedia(d),this.canvas=m,d.parentElement?(m.style.cssText="position: absolute;left:0;top:0;z-index:99;",d.parentElement?.appendChild(m)):(m.style.cssText="position: fixed;left:0;top:0;z-index:99;",document.body.appendChild(m)),u={width:d.clientWidth,height:d.clientHeight},i.matchDimensions(m,u)),this.interval=setInterval((async()=>{const t=await i.detectAllFaces(d,new i.SsdMobilenetv1Options({minConfidence:o,maxResults:r})).withFaceLandmarks().withFaceDescriptors();if(t.length>0){t.length;const e=new i.Box({x:0,y:0,width:d.clientWidth,height:d.clientHeight}),n=await this.cropFaceToBlob(d,e);try{const t=await(t=>{const e=new FormData;return e.append("file",t,`qthuman_face_${Date.now()}.png`),s.post("/human-auth/faces/recognition",e,{headers:{"Content-Type":"multipart/form-data"}})})(n);0===t.code&&a(t.data)}catch(t){console.error("人脸识别请求失败:",t),this.interval&&clearInterval(this.interval)}}if(h&&m){m.getContext("2d",{willReadFrequently:!0})?.clearRect(0,0,d.clientWidth,d.clientHeight);const e=i.resizeResults(t,u);l&&i.draw.drawDetections(m,e),c&&i.draw.drawFaceLandmarks(m,e)}}),n),!0}expandBox(t,e,s){const a=Math.max(0,t.x-e),n=Math.max(0,t.y-e),o=Math.min(s.videoWidth-a,t.width+2*e),r=Math.min(s.videoHeight-n,t.height+2*e);return new i.Box({x:a,y:n,width:o,height:r})}cropFaceToBase64(t,e){const i=document.createElement("canvas");i.width=e.width,i.height=e.height;return i.getContext("2d").drawImage(t,0,0,e.width,e.height),i.toDataURL("image/png")}cropFaceToBlob(t,e){const i=document.createElement("canvas");i.width=e.width,i.height=e.height;return i.getContext("2d").drawImage(t,0,0,e.width,e.height),new Promise((t=>{i.toBlob((e=>{t(e)}),"image/png")}))}async stopFaceRecognition(){return this.interval&&clearInterval(this.interval),this.interval=null,!0}destroy(){this.interval&&(clearInterval(this.interval),this.interval=null),this.canvas&&(this.canvas.parentElement?.removeChild(this.canvas),this.canvas=null),this.isInitialized=!1}},expression:class{name="expression";isInitialized=!1;isDetecting=!1;running=!1;timeoutId=null;lastTriggerTime=0;lastSmileCount=0;lastTotalFaces=0;async initFaceAPI(t){await e.setBackend("webgl"),await e.ready(),await i.nets.ssdMobilenetv1.loadFromUri(t),await i.nets.faceExpressionNet.loadFromUri(t)}async startSmileDetection(t,e,s,a){this.stopSmileDetection();const{smileThreshold:n=.7,cooldownMs:r=3e4,modelUri:l=`${o}/models`,maxFaces:c=10}=e;this.isInitialized||(await this.initFaceAPI(l),this.isInitialized=!0);const h=t.getVideoEl();this.running=!0;const d=async()=>{if(this.running&&!this.isDetecting){this.isDetecting=!0;try{const t=await i.detectAllFaces(h,new i.SsdMobilenetv1Options({minConfidence:.5,maxResults:c})).withFaceExpressions(),e=t.length,o=t.filter((t=>t.expressions.happy>=n)).length,l=e>0?t.reduce(((t,e)=>Math.max(t,e.expressions.happy)),0):0,d=Date.now();o>0&&d-this.lastTriggerTime>=r&&(this.lastTriggerTime=d,s()),e>0?a({smileCount:o,totalFaces:e,maxHappiness:l,timestamp:d}):this.lastTotalFaces>0&&a({smileCount:0,totalFaces:0,maxHappiness:0,timestamp:d}),this.lastSmileCount=o,this.lastTotalFaces=e}catch(t){console.error("[ExpressionFeature] Detection error:",t)}finally{this.isDetecting=!1,this.running&&(this.timeoutId=setTimeout(d,1e3))}}};return this.timeoutId=setTimeout(d,0),!0}stopSmileDetection(){return this.running=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isDetecting=!1,this.lastSmileCount=0,this.lastTotalFaces=0,!0}destroy(){this.stopSmileDetection(),this.isInitialized=!1}}};class l{manager;features=new Map;container;video;constructor(t){const e="string"==typeof t.el?document.getElementById(t.el):t.el;if(!e)throw new Error("video 容器初始化错误");this.container=e;const i=document.createElement("video");i.style.cssText="object-fit: cover;width:100%;height:100%;",i.muted=!0,e?.appendChild(i),this.video=i,this.manager=new a(i,t.facingMode),(t.features||[]).forEach((e=>{const i=r[e];if(i){const s=new i(t.overlayImage);this.features.set(e,s)}}))}async open(){return await this.manager.open()}isOpen(){return this.manager.isOpen()}close(){this.manager.close();for(const t of this.features.values())t.destroy&&t.destroy()}async takePhoto(){const t=this.features.get("photo");if(!t)throw new Error("Photo feature not enabled");return t.takePhoto(this.manager)}async switchCamera(t){await this.manager.switch(t)}async startFaceRecognition(t,e){const i=this.features.get("face");if(!i)throw new Error("FaceFeature not enabled");return i.startFaceRecognition(this.manager,t,e)}async stopFaceRecognition(){const t=this.features.get("face");if(!t)throw new Error("FaceFeature not enabled");return t.stopFaceRecognition()}async startBodyDetect(t){const e=this.features.get("detection");if(!e)throw new Error("PoseDetector feature not enabled");if(!this.video)throw new Error("video not enabled");return await e.init(this.manager),e.on(t),!0}async stopBodyDetect(){const t=this.features.get("detection");if(!t)throw new Error("PoseDetector feature not enabled");if(!this.video)throw new Error("video not enabled");return t.stopBodyDetect()}async startSmileDetection(t,e,i){const s=this.features.get("expression");if(!s)throw new Error("ExpressionFeature not enabled");return s.startSmileDetection(this.manager,t,e,i)}stopSmileDetection(){const t=this.features.get("expression");if(!t)throw new Error("ExpressionFeature not enabled");return t.stopSmileDetection()}destroy(){this.close(),this.container.innerHTML=""}}export{l as CameraSDK};
1
+ import*as t from"@tensorflow-models/pose-detection";import"@tensorflow/tfjs-backend-webgl";import*as e from"@tensorflow/tfjs-core";import*as i from"@vladmandic/face-api";import{i as s}from"./human-core-CfQtjNXk.js";import"./shared-RQecCCsQ.js";import"./render-DEY2rB8i.js";import"three";import"three/examples/jsm/controls/OrbitControls.js";import"three/examples/jsm/loaders/RGBELoader.js";import"three/examples/jsm/loaders/GLTFLoader.js";import"three/examples/jsm/loaders/KTX2Loader.js";import"three/examples/jsm/libs/meshopt_decoder.module.js";import"three/examples/jsm/loaders/DRACOLoader.js";import"three/addons/controls/OrbitControls.js";class a{video;stream=null;facingMode;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"user";this.video=t,this.facingMode=e}async open(){return this.stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:this.facingMode},audio:!1}),this.video.srcObject=this.stream,await this.video.play(),!0}close(){this.stream?.getTracks().forEach((t=>t.stop())),this.stream=null,this.video.srcObject=null}switch(t){return this.close(),this.facingMode=t,this.open()}getVideoEl(){return this.video}getStream(){return this.stream}isOpen(){return null!==this.stream}}class n{baselineWidth=60;lastState="stable";threshold;callback;constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.2;this.threshold=t}onChange(t){this.callback=t}update(t){const e=t.find((t=>"left_shoulder"===t.name)),i=t.find((t=>"right_shoulder"===t.name));if(!e||!i)return;const s=e.x-i.x,a=e.y-i.y,n=Math.sqrt(s*s+a*a);if(null===this.baselineWidth)return void(this.baselineWidth=n);let o="stable";n>this.baselineWidth*this.threshold?o="near":n<this.baselineWidth/this.threshold-20&&(o="far"),"stable"!==o&&o!==this.lastState&&(this.lastState=o,this.callback?.(o))}}const o="";const r={detection:class{detector=null;mediaStrea=null;interval=null;proximityDetector;constructor(){this.proximityDetector=new n}async init(i){this.mediaStrea=i,await e.setBackend("webgl"),await e.ready(),this.detector=await t.createDetector(t.SupportedModels.MoveNet,{modelType:"SinglePose.Lightning"})}on(t){this.interval&&clearInterval(this.interval),this.proximityDetector.onChange(t),this.interval=setInterval((async()=>{const t=await this.detect(this.mediaStrea.video);t.length>0&&this.proximityDetector.update(t[0].keypoints)}),300)}async detect(t){if(!this.detector)throw new Error("PoseDetector not initialized");return await this.detector.estimatePoses(t)}async destroy(){this.interval&&(clearInterval(this.interval),this.interval=null),this.detector&&(await this.detector.dispose(),this.detector=null),this.mediaStrea=null}},face:class{name="face";isInitialized=!1;interval=null;canvas=null;constructor(){}async initFaceAPI(){await e.setBackend("webgl"),await e.ready(),await i.nets.faceLandmark68Net.loadFromUri("/models"),await i.nets.ssdMobilenetv1.loadFromUri("/models"),await i.nets.faceRecognitionNet.loadFromUri("/models")}async startFaceRecognition(t,e,a){this.interval&&clearInterval(this.interval);const{duration:n=3e3,minConfidence:o=.6,maxResults:r=5,drawDetections:l=!1,drawFaceLandmarks:c=!1}=e;!1===this.isInitialized&&(await this.initFaceAPI(),this.isInitialized=!0);const h=l||c,d=t.getVideoEl();let m=null,u={width:0,height:0};return h&&(m=i.createCanvasFromMedia(d),this.canvas=m,d.parentElement?(m.style.cssText="position: absolute;left:0;top:0;z-index:99;",d.parentElement?.appendChild(m)):(m.style.cssText="position: fixed;left:0;top:0;z-index:99;",document.body.appendChild(m)),u={width:d.clientWidth,height:d.clientHeight},i.matchDimensions(m,u)),this.interval=setInterval((async()=>{const t=await i.detectAllFaces(d,new i.SsdMobilenetv1Options({minConfidence:o,maxResults:r})).withFaceLandmarks().withFaceDescriptors();if(t.length>0){t.length;const e=new i.Box({x:0,y:0,width:d.clientWidth,height:d.clientHeight}),n=await this.cropFaceToBlob(d,e);try{const t=await(t=>{const e=new FormData;return e.append("file",t,`qthuman_face_${Date.now()}.png`),s.post("/human-auth/faces/recognition",e,{headers:{"Content-Type":"multipart/form-data"}})})(n);0===t.code&&a(t.data)}catch(t){console.error("人脸识别请求失败:",t),this.interval&&clearInterval(this.interval)}}if(h&&m){m.getContext("2d",{willReadFrequently:!0})?.clearRect(0,0,d.clientWidth,d.clientHeight);const e=i.resizeResults(t,u);l&&i.draw.drawDetections(m,e),c&&i.draw.drawFaceLandmarks(m,e)}}),n),!0}expandBox(t,e,s){const a=Math.max(0,t.x-e),n=Math.max(0,t.y-e),o=Math.min(s.videoWidth-a,t.width+2*e),r=Math.min(s.videoHeight-n,t.height+2*e);return new i.Box({x:a,y:n,width:o,height:r})}cropFaceToBase64(t,e){const i=document.createElement("canvas");i.width=e.width,i.height=e.height;return i.getContext("2d").drawImage(t,0,0,e.width,e.height),i.toDataURL("image/png")}cropFaceToBlob(t,e){const i=document.createElement("canvas");i.width=e.width,i.height=e.height;return i.getContext("2d").drawImage(t,0,0,e.width,e.height),new Promise((t=>{i.toBlob((e=>{t(e)}),"image/png")}))}async stopFaceRecognition(){return this.interval&&clearInterval(this.interval),this.interval=null,!0}destroy(){this.interval&&(clearInterval(this.interval),this.interval=null),this.canvas&&(this.canvas.parentElement?.removeChild(this.canvas),this.canvas=null),this.isInitialized=!1}},expression:class{name="expression";isInitialized=!1;isDetecting=!1;running=!1;timeoutId=null;lastTriggerTime=0;lastSmileCount=0;lastTotalFaces=0;async initFaceAPI(t){await e.setBackend("webgl"),await e.ready(),await i.nets.ssdMobilenetv1.loadFromUri(t),await i.nets.faceExpressionNet.loadFromUri(t)}async startSmileDetection(t,e,s,a){this.stopSmileDetection();const{smileThreshold:n=.7,cooldownMs:r=3e4,modelUri:l=`${o}/models`,maxFaces:c=10}=e;this.isInitialized||(await this.initFaceAPI(l),this.isInitialized=!0);const h=t.getVideoEl();this.running=!0;const d=async()=>{if(this.running&&!this.isDetecting){this.isDetecting=!0;try{const t=await i.detectAllFaces(h,new i.SsdMobilenetv1Options({minConfidence:.5,maxResults:c})).withFaceExpressions(),e=t.length,o=t.filter((t=>t.expressions.happy>=n)).length,l=e>0?t.reduce(((t,e)=>Math.max(t,e.expressions.happy)),0):0,d=Date.now();o>0&&d-this.lastTriggerTime>=r&&(this.lastTriggerTime=d,s()),e>0?a({smileCount:o,totalFaces:e,maxHappiness:l,timestamp:d}):this.lastTotalFaces>0&&a({smileCount:0,totalFaces:0,maxHappiness:0,timestamp:d}),this.lastSmileCount=o,this.lastTotalFaces=e}catch(t){console.error("[ExpressionFeature] Detection error:",t)}finally{this.isDetecting=!1,this.running&&(this.timeoutId=setTimeout(d,1e3))}}};return this.timeoutId=setTimeout(d,0),!0}stopSmileDetection(){return this.running=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isDetecting=!1,this.lastSmileCount=0,this.lastTotalFaces=0,!0}destroy(){this.stopSmileDetection(),this.isInitialized=!1}}};class l{manager;features=new Map;container;video;constructor(t){const e="string"==typeof t.el?document.getElementById(t.el):t.el;if(!e)throw new Error("video 容器初始化错误");this.container=e;const i=document.createElement("video");i.style.cssText="object-fit: cover;width:100%;height:100%;",i.muted=!0,e?.appendChild(i),this.video=i,this.manager=new a(i,t.facingMode),(t.features||[]).forEach((e=>{const i=r[e];if(i){const s=new i(t.overlayImage);this.features.set(e,s)}}))}async open(){return await this.manager.open()}isOpen(){return this.manager.isOpen()}close(){this.manager.close();for(const t of this.features.values())t.destroy&&t.destroy()}async takePhoto(){const t=this.features.get("photo");if(!t)throw new Error("Photo feature not enabled");return t.takePhoto(this.manager)}async switchCamera(t){await this.manager.switch(t)}async startFaceRecognition(t,e){const i=this.features.get("face");if(!i)throw new Error("FaceFeature not enabled");return i.startFaceRecognition(this.manager,t,e)}async stopFaceRecognition(){const t=this.features.get("face");if(!t)throw new Error("FaceFeature not enabled");return t.stopFaceRecognition()}async startBodyDetect(t){const e=this.features.get("detection");if(!e)throw new Error("PoseDetector feature not enabled");if(!this.video)throw new Error("video not enabled");return await e.init(this.manager),e.on(t),!0}async stopBodyDetect(){const t=this.features.get("detection");if(!t)throw new Error("PoseDetector feature not enabled");if(!this.video)throw new Error("video not enabled");return t.stopBodyDetect()}async startSmileDetection(t,e,i){const s=this.features.get("expression");if(!s)throw new Error("ExpressionFeature not enabled");return s.startSmileDetection(this.manager,t,e,i)}stopSmileDetection(){const t=this.features.get("expression");if(!t)throw new Error("ExpressionFeature not enabled");return t.stopSmileDetection()}destroy(){this.close(),this.container.innerHTML=""}}export{l as CameraSDK};
@@ -0,0 +1 @@
1
+ import*as t from"three";import{m as e,d as i,E as n,a as r,r as s}from"./shared-RQecCCsQ.js";import{c as o,g as a,b as h,B as l}from"./human-core-CfQtjNXk.js";import{OrbitControls as c}from"three/examples/jsm/controls/OrbitControls.js";import{RGBELoader as d}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFLoader as u}from"three/examples/jsm/loaders/GLTFLoader.js";import{KTX2Loader as p}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as m}from"three/examples/jsm/libs/meshopt_decoder.module.js";import{DRACOLoader as g}from"three/examples/jsm/loaders/DRACOLoader.js";import{OrbitControls as f}from"three/addons/controls/OrbitControls.js";function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var y,b,w,A,x,M,C,E,S,T,k,L,R,O,F,P,B,D={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},z={duration:.5,overwrite:!1,delay:0},G=1e8,I=1e-8,H=2*Math.PI,N=H/4,V=0,j=Math.sqrt,W=Math.cos,Y=Math.sin,$=function(t){return"string"==typeof t},X=function(t){return"function"==typeof t},U=function(t){return"number"==typeof t},q=function(t){return void 0===t},J=function(t){return"object"==typeof t},Q=function(t){return!1!==t},Z=function(){return"undefined"!=typeof window},K=function(t){return X(t)||$(t)},tt="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},et=Array.isArray,it=/(?:-?\.?\d|\.)+/gi,nt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,rt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,st=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ot=/[+-]=-?[.\d]+/,at=/[^,'"\[\]\s]+/gi,ht=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,lt={},ct={},dt=function(t){return(ct=Ht(t,lt))&&Ni},ut=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},pt=function(t,e){return!e&&console.warn(t)},mt=function(t,e){return t&&(lt[t]=e)&&ct&&(ct[t]=e)||lt},gt=function(){return 0},ft={suppressEvents:!0,isStart:!0,kill:!1},_t={suppressEvents:!0,kill:!1},vt={suppressEvents:!0},yt={},bt=[],wt={},At={},xt={},Mt=30,Ct=[],Et="",St=function(t){var e,i,n=t[0];if(J(n)||X(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(i=Ct.length;i--&&!Ct[i].targetTest(n););e=Ct[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new ei(t[i],e)))||t.splice(i,1);return t},Tt=function(t){return t._gsap||St(ve(t))[0]._gsap},kt=function(t,e,i){return(i=t[e])&&X(i)?t[e]():q(i)&&t.getAttribute&&t.getAttribute(e)||i},Lt=function(t,e){return(t=t.split(",")).forEach(e)||t},Rt=function(t){return Math.round(1e5*t)/1e5||0},Ot=function(t){return Math.round(1e7*t)/1e7||0},Ft=function(t,e){var i=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===i?t+n:"-"===i?t-n:"*"===i?t*n:t/n},Pt=function(t,e){for(var i=e.length,n=0;t.indexOf(e[n])<0&&++n<i;);return n<i},Bt=function(){var t,e,i=bt.length,n=bt.slice(0);for(wt={},bt.length=0,t=0;t<i;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},Dt=function(t,e,i,n){bt.length&&!b&&Bt(),t.render(e,i,b&&e<0&&(t._initted||t._startAt)),bt.length&&!b&&Bt()},zt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(at).length<2?e:$(t)?t.trim():t},Gt=function(t){return t},It=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},Ht=function(t,e){for(var i in e)t[i]=e[i];return t},Nt=function t(e,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=J(i[n])?t(e[n]||(e[n]={}),i[n]):i[n]);return e},Vt=function(t,e){var i,n={};for(i in t)i in e||(n[i]=t[i]);return n},jt=function(t){var e,i=t.parent||A,n=t.keyframes?(e=et(t.keyframes),function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}):It;if(Q(t.inherit))for(;i;)n(t,i.vars.defaults),i=i.parent||i._dp;return t},Wt=function(t,e,i,n,r){var s,o=t[n];if(r)for(s=e[r];o&&o[r]>s;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[n]=e,e._prev=o,e.parent=e._dp=t,e},Yt=function(t,e,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=e._prev,s=e._next;r?r._next=s:t[i]===e&&(t[i]=s),s?s._prev=r:t[n]===e&&(t[n]=r),e._next=e._prev=e.parent=null},$t=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Xt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},Ut=function(t,e,i,n){return t._startAt&&(b?t._startAt.revert(_t):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},qt=function t(e){return!e||e._ts&&t(e.parent)},Jt=function(t){return t._repeat?Qt(t._tTime,t=t.duration()+t._rDelay)*t:0},Qt=function(t,e){var i=Math.floor(t/=e);return t&&i===t?i-1:i},Zt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Kt=function(t){return t._end=Ot(t._start+(t._tDur/Math.abs(t._ts||t._rts||I)||0))},te=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Ot(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Kt(t),i._dirty||Xt(i,t)),t},ee=function(t,e){var i;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(i=Zt(t.rawTime(),e),(!e._dur||pe(0,e.totalDuration(),i)-e._tTime>I)&&e.render(i,!0)),Xt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-1e-8}},ie=function(t,e,i,n){return e.parent&&$t(e),e._start=Ot((U(i)?i:i||t!==A?ce(t,i,e):t._time)+e._delay),e._end=Ot(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Wt(t,e,"_first","_last",t._sort?"_start":0),oe(e)||(t._recent=e),n||ee(t,e),t._ts<0&&te(t,t._tTime),t},ne=function(t,e){return(lt.ScrollTrigger||ut("scrollTrigger",e))&&lt.ScrollTrigger.create(e,t)},re=function(t,e,i,n,r){return li(t,e,r),t._initted?!i&&t._pt&&!b&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&S!==Ve.frame?(bt.push(t),t._lazy=[r,n],1):void 0:1},se=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},oe=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},ae=function(t,e,i,n){var r=t._repeat,s=Ot(e)||0,o=t._tTime/t._tDur;return o&&!n&&(t._time*=s/t._dur),t._dur=s,t._tDur=r?r<0?1e10:Ot(s*(r+1)+t._rDelay*r):s,o>0&&!n&&te(t,t._tTime=t._tDur*o),t.parent&&Kt(t),i||Xt(t.parent,t),t},he=function(t){return t instanceof ni?Xt(t):ae(t,t._dur)},le={_start:0,endTime:gt,totalDuration:gt},ce=function t(e,i,n){var r,s,o,a=e.labels,h=e._recent||le,l=e.duration()>=G?h.endTime(!1):e._dur;return $(i)&&(isNaN(i)||i in a)?(s=i.charAt(0),o="%"===i.substr(-1),r=i.indexOf("="),"<"===s||">"===s?(r>=0&&(i=i.replace(/=/,"")),("<"===s?h._start:h.endTime(h._repeat>=0))+(parseFloat(i.substr(1))||0)*(o?(r<0?h:n).totalDuration()/100:1)):r<0?(i in a||(a[i]=l),a[i]):(s=parseFloat(i.charAt(r-1)+i.substr(r+1)),o&&n&&(s=s/100*(et(n)?n[0]:n).totalDuration()),r>1?t(e,i.substr(0,r-1),n)+s:l+s)):null==i?l:+i},de=function(t,e,i){var n,r,s=U(e[1]),o=(s?2:1)+(t<2?0:1),a=e[o];if(s&&(a.duration=e[1]),a.parent=i,t){for(n=a,r=i;r&&!("immediateRender"in n);)n=r.vars.defaults||{},r=Q(r.vars.inherit)&&r.parent;a.immediateRender=Q(n.immediateRender),t<2?a.runBackwards=1:a.startAt=e[o-1]}return new mi(e[0],a,e[o+1])},ue=function(t,e){return t||0===t?e(t):e},pe=function(t,e,i){return i<t?t:i>e?e:i},me=function(t,e){return $(t)&&(e=ht.exec(t))?e[1]:""},ge=[].slice,fe=function(t,e){return t&&J(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&J(t[0]))&&!t.nodeType&&t!==x},_e=function(t,e,i){return void 0===i&&(i=[]),t.forEach((function(t){var n;return $(t)&&!e||fe(t,1)?(n=i).push.apply(n,ve(t)):i.push(t)}))||i},ve=function(t,e,i){return w&&!e&&w.selector?w.selector(t):!$(t)||i||!M&&je()?et(t)?_e(t,i):fe(t)?ge.call(t,0):t?[t]:[]:ge.call((e||C).querySelectorAll(t),0)},ye=function(t){return t=ve(t)[0]||pt("Invalid scope")||{},function(e){var i=t.current||t.nativeElement||t;return ve(e,i.querySelectorAll?i:i===t?pt("Invalid scope")||C.createElement("div"):t)}},be=function(t){return t.sort((function(){return.5-Math.random()}))},we=function(t){if(X(t))return t;var e=J(t)?t:{each:t},i=Je(e.ease),n=e.from||0,r=parseFloat(e.base)||0,s={},o=n>0&&n<1,a=isNaN(n)||o,h=e.axis,l=n,c=n;return $(n)?l=c={center:.5,edges:.5,end:1}[n]||0:!o&&a&&(l=n[0],c=n[1]),function(t,o,d){var u,p,m,g,f,_,v,y,b,w=(d||e).length,A=s[w];if(!A){if(!(b="auto"===e.grid?0:(e.grid||[1,G])[1])){for(v=-1e8;v<(v=d[b++].getBoundingClientRect().left)&&b<w;);b<w&&b--}for(A=s[w]=[],u=a?Math.min(b,w)*l-.5:n%b,p=b===G?0:a?w*c/b-.5:n/b|0,v=0,y=G,_=0;_<w;_++)m=_%b-u,g=p-(_/b|0),A[_]=f=h?Math.abs("y"===h?g:m):j(m*m+g*g),f>v&&(v=f),f<y&&(y=f);"random"===n&&be(A),A.max=v-y,A.min=y,A.v=w=(parseFloat(e.amount)||parseFloat(e.each)*(b>w?w-1:h?"y"===h?w/b:b:Math.max(b,w/b))||0)*("edges"===n?-1:1),A.b=w<0?r-w:r,A.u=me(e.amount||e.each)||0,i=i&&w<0?Ue(i):i}return w=(A[t]-A.min)/A.max||0,Ot(A.b+(i?i(w):w)*A.v)+A.u}},Ae=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var n=Ot(Math.round(parseFloat(i)/t)*t*e);return(n-n%1)/e+(U(i)?0:me(i))}},xe=function(t,e){var i,n,r=et(t);return!r&&J(t)&&(i=r=t.radius||G,t.values?(t=ve(t.values),(n=!U(t[0]))&&(i*=i)):t=Ae(t.increment)),ue(e,r?X(t)?function(e){return n=t(e),Math.abs(n-e)<=i?n:e}:function(e){for(var r,s,o=parseFloat(n?e.x:e),a=parseFloat(n?e.y:0),h=G,l=0,c=t.length;c--;)(r=n?(r=t[c].x-o)*r+(s=t[c].y-a)*s:Math.abs(t[c]-o))<h&&(h=r,l=c);return l=!i||h<=i?t[l]:e,n||l===e||U(e)?l:l+me(e)}:Ae(t))},Me=function(t,e,i,n){return ue(et(t)?!e:!0===i?!!(i=0):!n,(function(){return et(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+.99*i))/i)*i*n)/n}))},Ce=function(t,e,i){return ue(i,(function(i){return t[~~e(i)]}))},Ee=function(t){for(var e,i,n,r,s=0,o="";~(e=t.indexOf("random(",s));)n=t.indexOf(")",e),r="["===t.charAt(e+7),i=t.substr(e+7,n-e-7).match(r?at:it),o+=t.substr(s,e-s)+Me(r?i:+i[0],r?0:+i[1],+i[2]||1e-5),s=n+1;return o+t.substr(s,t.length-s)},Se=function(t,e,i,n,r){var s=e-t,o=n-i;return ue(r,(function(e){return i+((e-t)/s*o||0)}))},Te=function(t,e,i){var n,r,s,o=t.labels,a=G;for(n in o)(r=o[n]-e)<0==!!i&&r&&a>(r=Math.abs(r))&&(s=n,a=r);return s},ke=function(t,e,i){var n,r,s,o=t.vars,a=o[e],h=w,l=t._ctx;if(a)return n=o[e+"Params"],r=o.callbackScope||t,i&&bt.length&&Bt(),l&&(w=l),s=n?a.apply(r,n):a.call(r),w=h,s},Le=function(t){return $t(t),t.scrollTrigger&&t.scrollTrigger.kill(!!b),t.progress()<1&&ke(t,"onInterrupt"),t},Re=[],Oe=function(t){if(t)if(t=!t.name&&t.default||t,Z()||t.headless){var e=t.name,i=X(t),n=e&&!i&&t.init?function(){this._props=[]}:t,r={init:gt,render:xi,add:ai,kill:Ci,modifier:Mi,rawVars:0},s={targetTest:0,get:0,getSetter:yi,aliases:{},register:0};if(je(),t!==n){if(At[e])return;It(n,It(Vt(t,r),s)),Ht(n.prototype,Ht(r,Vt(t,s))),At[n.prop=e]=n,t.targetTest&&(Ct.push(n),yt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}mt(e,n),t.register&&t.register(Ni,n,Ti)}else Re.push(t)},Fe=255,Pe={aqua:[0,Fe,Fe],lime:[0,Fe,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Fe],navy:[0,0,128],white:[Fe,Fe,Fe],olive:[128,128,0],yellow:[Fe,Fe,0],orange:[Fe,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Fe,0,0],pink:[Fe,192,203],cyan:[0,Fe,Fe],transparent:[Fe,Fe,Fe,0]},Be=function(t,e,i){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)*Fe+.5|0},De=function(t,e,i){var n,r,s,o,a,h,l,c,d,u,p=t?U(t)?[t>>16,t>>8&Fe,t&Fe]:0:Pe.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Pe[t])p=Pe[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),r=t.charAt(2),s=t.charAt(3),t="#"+n+n+r+r+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&Fe,p&Fe,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&Fe,t&Fe]}else if("hsl"===t.substr(0,3))if(p=u=t.match(it),e){if(~t.indexOf("="))return p=t.match(nt),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,a=+p[1]/100,n=2*(h=+p[2]/100)-(r=h<=.5?h*(a+1):h+a-h*a),p.length>3&&(p[3]*=1),p[0]=Be(o+1/3,n,r),p[1]=Be(o,n,r),p[2]=Be(o-1/3,n,r);else p=t.match(it)||Pe.transparent;p=p.map(Number)}return e&&!u&&(n=p[0]/Fe,r=p[1]/Fe,s=p[2]/Fe,h=((l=Math.max(n,r,s))+(c=Math.min(n,r,s)))/2,l===c?o=a=0:(d=l-c,a=h>.5?d/(2-l-c):d/(l+c),o=l===n?(r-s)/d+(r<s?6:0):l===r?(s-n)/d+2:(n-r)/d+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*a+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p},ze=function(t){var e=[],i=[],n=-1;return t.split(Ie).forEach((function(t){var r=t.match(rt)||[];e.push.apply(e,r),i.push(n+=r.length+1)})),e.c=i,e},Ge=function(t,e,i){var n,r,s,o,a="",h=(t+a).match(Ie),l=e?"hsla(":"rgba(",c=0;if(!h)return t;if(h=h.map((function(t){return(t=De(t,e,1))&&l+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),i&&(s=ze(t),(n=i.c).join(a)!==s.c.join(a)))for(o=(r=t.replace(Ie,"1").split(rt)).length-1;c<o;c++)a+=r[c]+(~n.indexOf(c)?h.shift()||l+"0,0,0,0)":(s.length?s:h.length?h:i).shift());if(!r)for(o=(r=t.split(Ie)).length-1;c<o;c++)a+=r[c]+h[c];return a+r[o]},Ie=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Pe)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),He=/hsl[a]?\(/,Ne=function(t){var e,i=t.join(" ");if(Ie.lastIndex=0,Ie.test(i))return e=He.test(i),t[1]=Ge(t[1],e),t[0]=Ge(t[0],e,ze(t[1])),!0},Ve=function(){var t,e,i,n,r,s,o=Date.now,a=500,h=33,l=o(),c=l,d=1e3/240,u=d,p=[],m=function i(m){var g,f,_,v,y=o()-c,b=!0===m;if((y>a||y<0)&&(l+=y-h),((g=(_=(c+=y)-l)-u)>0||b)&&(v=++n.frame,r=_-1e3*n.time,n.time=_/=1e3,u+=g+(g>=d?4:d-g),f=1),b||(t=e(i)),f)for(s=0;s<p.length;s++)p[s](_,r,v,m)};return n={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(t){return r/(1e3/(t||60))},wake:function(){E&&(!M&&Z()&&(x=M=window,C=x.document||{},lt.gsap=Ni,(x.gsapVersions||(x.gsapVersions=[])).push(Ni.version),dt(ct||x.GreenSockGlobals||!x.gsap&&x||{}),Re.forEach(Oe)),i="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=i||function(t){return setTimeout(t,u-1e3*n.time+1|0)},k=1,m(2))},sleep:function(){(i?cancelAnimationFrame:clearTimeout)(t),k=0,e=gt},lagSmoothing:function(t,e){a=t||1/0,h=Math.min(e||33,a)},fps:function(t){d=1e3/(t||240),u=1e3*n.time+d},add:function(t,e,i){var r=e?function(e,i,s,o){t(e,i,s,o),n.remove(r)}:t;return n.remove(t),p[i?"unshift":"push"](r),je(),r},remove:function(t,e){~(e=p.indexOf(t))&&p.splice(e,1)&&s>=e&&s--},_listeners:p}}(),je=function(){return!k&&Ve.wake()},We={},Ye=/^[\d.\-M][\d.\-,\s]/,$e=/["']/g,Xe=function(t){for(var e,i,n,r={},s=t.substr(1,t.length-3).split(":"),o=s[0],a=1,h=s.length;a<h;a++)i=s[a],e=a!==h-1?i.lastIndexOf(","):i.length,n=i.substr(0,e),r[o]=isNaN(n)?n.replace($e,"").trim():+n,o=i.substr(e+1).trim();return r},Ue=function(t){return function(e){return 1-t(1-e)}},qe=function t(e,i){for(var n,r=e._first;r;)r instanceof ni?t(r,i):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===i||(r.timeline?t(r.timeline,i):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=i)),r=r._next},Je=function(t,e){return t&&(X(t)?t:We[t]||function(t){var e,i,n,r,s=(t+"").split("("),o=We[s[0]];return o&&s.length>1&&o.config?o.config.apply(null,~t.indexOf("{")?[Xe(s[1])]:(e=t,i=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",i),e.substring(i,~r&&r<n?e.indexOf(")",n+1):n)).split(",").map(zt)):We._CE&&Ye.test(t)?We._CE("",t):o}(t))||e},Qe=function(t,e,i,n){void 0===i&&(i=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var r,s={easeIn:e,easeOut:i,easeInOut:n};return Lt(t,(function(t){for(var e in We[t]=lt[t]=s,We[r=t.toLowerCase()]=i,s)We[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=We[t+"."+e]=s[e]})),s},Ze=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Ke=function t(e,i,n){var r=i>=1?i:1,s=(n||(e?.3:.45))/(i<1?i:1),o=s/H*(Math.asin(1/r)||0),a=function(t){return 1===t?1:r*Math.pow(2,-10*t)*Y((t-o)*s)+1},h="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:Ze(a);return s=H/s,h.config=function(i,n){return t(e,i,n)},h},ti=function t(e,i){void 0===i&&(i=1.70158);var n=function(t){return t?--t*t*((i+1)*t+i)+1:0},r="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:Ze(n);return r.config=function(i){return t(e,i)},r};Lt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;Qe(t+",Power"+(i-1),e?function(t){return Math.pow(t,i)}:function(t){return t},(function(t){return 1-Math.pow(1-t,i)}),(function(t){return t<.5?Math.pow(2*t,i)/2:1-Math.pow(2*(1-t),i)/2}))})),We.Linear.easeNone=We.none=We.Linear.easeIn,Qe("Elastic",Ke("in"),Ke("out"),Ke()),L=7.5625,F=2*(O=1/(R=2.75)),P=2.5*O,Qe("Bounce",(function(t){return 1-B(1-t)}),B=function(t){return t<O?L*t*t:t<F?L*Math.pow(t-1.5/R,2)+.75:t<P?L*(t-=2.25/R)*t+.9375:L*Math.pow(t-2.625/R,2)+.984375}),Qe("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),Qe("Circ",(function(t){return-(j(1-t*t)-1)})),Qe("Sine",(function(t){return 1===t?1:1-W(t*N)})),Qe("Back",ti("in"),ti("out"),ti()),We.SteppedEase=We.steps=lt.SteppedEase={config:function(t,e){void 0===t&&(t=1);var i=1/t,n=t+(e?0:1),r=e?1:0;return function(t){return((n*pe(0,.99999999,t)|0)+r)*i}}},z.ease=We["quad.out"],Lt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return Et+=t+","+t+"Params,"}));var ei=function(t,e){this.id=V++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:kt,this.set=e?e.getSetter:yi},ii=function(){function t(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,ae(this,+t.duration,1,1),this.data=t.data,w&&(this._ctx=w,w.data.push(this)),k||Ve.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,ae(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(je(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(te(this,t),!i._dp||i.parent||ee(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&ie(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===I||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Dt(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Jt(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Jt(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*i,e):this._repeat?Qt(this._tTime,i)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var i=this.parent&&this._ts?Zt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(pe(-Math.abs(this._delay),this._tDur,i),!1!==e),Kt(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(je(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==I&&(this._tTime-=I)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&ie(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(Q(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Zt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=vt);var e=b;return b=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),b=e,this},e.globalTime=function(t){for(var e=this,i=arguments.length?t:e.rawTime();e;)i=e._start+i/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):i},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,he(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,he(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(ce(this,t),Q(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,Q(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<this.endTime(!0)-I))},e.eventCallback=function(t,e,i){var n=this.vars;return arguments.length>1?(e?(n[t]=e,i&&(n[t+"Params"]=i),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this;return new Promise((function(i){var n=X(t)?t:Gt,r=function(){var t=e.then;e.then=null,X(n)&&(n=n(e))&&(n.then||n===e)&&(e.then=t),i(n),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?r():e._prom=r}))},e.kill=function(){Le(this)},t}();It(ii.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:-1e-8,_prom:0,_ps:!1,_rts:1});var ni=function(t){function e(e,i){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).labels={},n.smoothChildTiming=!!e.smoothChildTiming,n.autoRemoveChildren=!!e.autoRemoveChildren,n._sort=Q(e.sortChildren),A&&ie(e.parent||A,_(n),i),e.reversed&&n.reverse(),e.paused&&n.paused(!0),e.scrollTrigger&&ne(_(n),e.scrollTrigger),n}v(e,t);var i=e.prototype;return i.to=function(t,e,i){return de(0,arguments,this),this},i.from=function(t,e,i){return de(1,arguments,this),this},i.fromTo=function(t,e,i,n){return de(2,arguments,this),this},i.set=function(t,e,i){return e.duration=0,e.parent=this,jt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new mi(t,e,ce(this,i),1),this},i.call=function(t,e,i){return ie(this,mi.delayedCall(0,t,e),i)},i.staggerTo=function(t,e,i,n,r,s,o){return i.duration=e,i.stagger=i.stagger||n,i.onComplete=s,i.onCompleteParams=o,i.parent=this,new mi(t,i,ce(this,r)),this},i.staggerFrom=function(t,e,i,n,r,s,o){return i.runBackwards=1,jt(i).immediateRender=Q(i.immediateRender),this.staggerTo(t,e,i,n,r,s,o)},i.staggerFromTo=function(t,e,i,n,r,s,o,a){return n.startAt=i,jt(n).immediateRender=Q(n.immediateRender),this.staggerTo(t,e,n,r,s,o,a)},i.render=function(t,e,i){var n,r,s,o,a,h,l,c,d,u,p,m,g=this._time,f=this._dirty?this.totalDuration():this._tDur,_=this._dur,v=t<=0?0:Ot(t),y=this._zTime<0!=t<0&&(this._initted||!_);if(this!==A&&v>f&&t>=0&&(v=f),v!==this._tTime||i||y){if(g!==this._time&&_&&(v+=this._time-g,t+=this._time-g),n=v,d=this._start,h=!(c=this._ts),y&&(_||(g=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(p=this._yoyo,a=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*a+t,e,i);if(n=Ot(v%a),v===f?(o=this._repeat,n=_):((o=~~(v/a))&&o===v/a&&(n=_,o--),n>_&&(n=_)),u=Qt(this._tTime,a),!g&&this._tTime&&u!==o&&this._tTime-u*a-this._dur<=0&&(u=o),p&&1&o&&(n=_-n,m=1),o!==u&&!this._lock){var w=p&&1&u,x=w===(p&&1&o);if(o<u&&(w=!w),g=w?0:v%_?_:v,this._lock=1,this.render(g||(m?0:Ot(o*a)),e,!_)._lock=0,this._tTime=v,!e&&this.parent&&ke(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),g&&g!==this._time||h!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(_=this._dur,f=this._tDur,x&&(this._lock=2,g=w?_:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;qe(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(l=function(t,e,i){var n;if(i>e)for(n=t._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}}(this,Ot(g),Ot(n)),l&&(v-=n-(n=l._start))),this._tTime=v,this._time=n,this._act=!c,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,g=0),!g&&n&&!e&&!o&&(ke(this,"onStart"),this._tTime!==v))return this;if(n>=g&&t>=0)for(r=this._first;r;){if(s=r._next,(r._act||n>=r._start)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,e,i),n!==this._time||!this._ts&&!h){l=0,s&&(v+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var M=t<0?t:n;r;){if(s=r._prev,(r._act||M<=r._end)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(M-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(M-r._start)*r._ts,e,i||b&&(r._initted||r._startAt)),n!==this._time||!this._ts&&!h){l=0,s&&(v+=this._zTime=M?-1e-8:I);break}}r=s}}if(l&&!e&&(this.pause(),l.render(n>=g?0:-1e-8)._zTime=n>=g?1:-1,this._ts))return this._start=d,Kt(this),this.render(t,e,i);this._onUpdate&&!e&&ke(this,"onUpdate",!0),(v===f&&this._tTime>=this.totalDuration()||!v&&g)&&(d!==this._start&&Math.abs(c)===Math.abs(this._ts)||this._lock||((t||!_)&&(v===f&&this._ts>0||!v&&this._ts<0)&&$t(this,1),e||t<0&&!g||!v&&!g&&f||(ke(this,v===f&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(v<f&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(t,e){var i=this;if(U(e)||(e=ce(this,e,t)),!(t instanceof ii)){if(et(t))return t.forEach((function(t){return i.add(t,e)})),this;if($(t))return this.addLabel(t,e);if(!X(t))return this;t=mi.delayedCall(0,t)}return this!==t?ie(this,t,e):this},i.getChildren=function(t,e,i,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=-1e8);for(var r=[],s=this._first;s;)s._start>=n&&(s instanceof mi?e&&r.push(s):(i&&r.push(s),t&&r.push.apply(r,s.getChildren(!0,e,i)))),s=s._next;return r},i.getById=function(t){for(var e=this.getChildren(1,1,1),i=e.length;i--;)if(e[i].vars.id===t)return e[i]},i.remove=function(t){return $(t)?this.removeLabel(t):X(t)?this.killTweensOf(t):(Yt(this,t),t===this._recent&&(this._recent=this._last),Xt(this))},i.totalTime=function(e,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ot(Ve.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,i),this._forcing=0,this):this._tTime},i.addLabel=function(t,e){return this.labels[t]=ce(this,e),this},i.removeLabel=function(t){return delete this.labels[t],this},i.addPause=function(t,e,i){var n=mi.delayedCall(0,e||gt,i);return n.data="isPause",this._hasPause=1,ie(this,n,ce(this,t))},i.removePause=function(t){var e=this._first;for(t=ce(this,t);e;)e._start===t&&"isPause"===e.data&&$t(e),e=e._next},i.killTweensOf=function(t,e,i){for(var n=this.getTweensOf(t,i),r=n.length;r--;)ri!==n[r]&&n[r].kill(t,e);return this},i.getTweensOf=function(t,e){for(var i,n=[],r=ve(t),s=this._first,o=U(e);s;)s instanceof mi?Pt(s._targets,r)&&(o?(!ri||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&n.push(s):(i=s.getTweensOf(r,e)).length&&n.push.apply(n,i),s=s._next;return n},i.tweenTo=function(t,e){e=e||{};var i,n=this,r=ce(n,t),s=e,o=s.startAt,a=s.onStart,h=s.onStartParams,l=s.immediateRender,c=mi.to(n,It({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(o&&"time"in o?o.time:n._time))/n.timeScale())||I,onStart:function(){if(n.pause(),!i){var t=e.duration||Math.abs((r-(o&&"time"in o?o.time:n._time))/n.timeScale());c._dur!==t&&ae(c,t,0,1).render(c._time,!0,!0),i=1}a&&a.apply(c,h||[])}},e));return l?c.render(0):c},i.tweenFromTo=function(t,e,i){return this.tweenTo(e,It({startAt:{time:ce(this,t)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(t){return void 0===t&&(t=this._time),Te(this,ce(this,t))},i.previousLabel=function(t){return void 0===t&&(t=this._time),Te(this,ce(this,t),1)},i.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+I)},i.shiftChildren=function(t,e,i){void 0===i&&(i=0);for(var n,r=this._first,s=this.labels;r;)r._start>=i&&(r._start+=t,r._end+=t),r=r._next;if(e)for(n in s)s[n]>=i&&(s[n]+=t);return Xt(this)},i.invalidate=function(e){var i=this._first;for(this._lock=0;i;)i.invalidate(e),i=i._next;return t.prototype.invalidate.call(this,e)},i.clear=function(t){void 0===t&&(t=!0);for(var e,i=this._first;i;)e=i._next,this.remove(i),i=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Xt(this)},i.totalDuration=function(t){var e,i,n,r=0,s=this,o=s._last,a=G;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(n=s.parent;o;)e=o._prev,o._dirty&&o.totalDuration(),(i=o._start)>a&&s._sort&&o._ts&&!s._lock?(s._lock=1,ie(s,o,i-o._delay,1)._lock=0):a=i,i<0&&o._ts&&(r-=i,(!n&&!s._dp||n&&n.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),a=0),o._end>r&&o._ts&&(r=o._end),o=e;ae(s,s===A&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(A._ts&&(Dt(A,Zt(t,A)),S=Ve.frame),Ve.frame>=Mt){Mt+=D.autoSleep||120;var e=A._first;if((!e||!e._ts)&&D.autoSleep&&Ve._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ve.sleep()}}},e}(ii);It(ni.prototype,{_lock:0,_hasPause:0,_forcing:0});var ri,si,oi=function(t,e,i,n,r,s,o){var a,h,l,c,d,u,p,m,g=new Ti(this._pt,t,e,0,1,Ai,null,r),f=0,_=0;for(g.b=i,g.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=Ee(n)),s&&(s(m=[i,n],t,e),i=m[0],n=m[1]),h=i.match(st)||[];a=st.exec(n);)c=a[0],d=n.substring(f,a.index),l?l=(l+1)%5:"rgba("===d.substr(-5)&&(l=1),c!==h[_++]&&(u=parseFloat(h[_-1])||0,g._pt={_next:g._pt,p:d||1===_?d:",",s:u,c:"="===c.charAt(1)?Ft(u,c)-u:parseFloat(c)-u,m:l&&l<4?Math.round:0},f=st.lastIndex);return g.c=f<n.length?n.substring(f,n.length):"",g.fp=o,(ot.test(n)||p)&&(g.e=0),this._pt=g,g},ai=function(t,e,i,n,r,s,o,a,h,l){X(n)&&(n=n(r||0,t,s));var c,d=t[e],u="get"!==i?i:X(d)?h?t[e.indexOf("set")||!X(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():d,p=X(d)?h?_i:fi:gi;if($(n)&&(~n.indexOf("random(")&&(n=Ee(n)),"="===n.charAt(1)&&((c=Ft(u,n)+(me(u)||0))||0===c)&&(n=c)),!l||u!==n||si)return isNaN(u*n)||""===n?(!d&&!(e in t)&&ut(e,n),oi.call(this,t,e,u,n,p,a||D.stringFilter,h)):(c=new Ti(this._pt,t,e,+u||0,n-(u||0),"boolean"==typeof d?wi:bi,0,p),h&&(c.fp=h),o&&c.modifier(o,this,t),this._pt=c)},hi=function(t,e,i,n,r,s){var o,a,h,l;if(At[t]&&!1!==(o=new At[t]).init(r,o.rawVars?e[t]:function(t,e,i,n,r){if(X(t)&&(t=di(t,r,e,i,n)),!J(t)||t.style&&t.nodeType||et(t)||tt(t))return $(t)?di(t,r,e,i,n):t;var s,o={};for(s in t)o[s]=di(t[s],r,e,i,n);return o}(e[t],n,r,s,i),i,n,s)&&(i._pt=a=new Ti(i._pt,r,t,0,1,o.render,o,0,o.priority),i!==T))for(h=i._ptLookup[i._targets.indexOf(r)],l=o._props.length;l--;)h[o._props[l]]=a;return o},li=function t(e,i,n){var r,s,o,a,h,l,c,d,u,p,m,g,f,_=e.vars,v=_.ease,w=_.startAt,x=_.immediateRender,M=_.lazy,C=_.onUpdate,E=_.runBackwards,S=_.yoyoEase,T=_.keyframes,k=_.autoRevert,L=e._dur,R=e._startAt,O=e._targets,F=e.parent,P=F&&"nested"===F.data?F.vars.targets:O,B="auto"===e._overwrite&&!y,D=e.timeline;if(D&&(!T||!v)&&(v="none"),e._ease=Je(v,z.ease),e._yEase=S?Ue(Je(!0===S?v:S,z.ease)):0,S&&e._yoyo&&!e._repeat&&(S=e._yEase,e._yEase=e._ease,e._ease=S),e._from=!D&&!!_.runBackwards,!D||T&&!_.stagger){if(g=(d=O[0]?Tt(O[0]).harness:0)&&_[d.prop],r=Vt(_,yt),R&&(R._zTime<0&&R.progress(1),i<0&&E&&x&&!k?R.render(-1,!0):R.revert(E&&L?_t:ft),R._lazy=0),w){if($t(e._startAt=mi.set(O,It({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!R&&Q(M),startAt:null,delay:0,onUpdate:C&&function(){return ke(e,"onUpdate")},stagger:0},w))),e._startAt._dp=0,e._startAt._sat=e,i<0&&(b||!x&&!k)&&e._startAt.revert(_t),x&&L&&i<=0&&n<=0)return void(i&&(e._zTime=i))}else if(E&&L&&!R)if(i&&(x=!1),o=It({overwrite:!1,data:"isFromStart",lazy:x&&!R&&Q(M),immediateRender:x,stagger:0,parent:F},r),g&&(o[d.prop]=g),$t(e._startAt=mi.set(O,o)),e._startAt._dp=0,e._startAt._sat=e,i<0&&(b?e._startAt.revert(_t):e._startAt.render(-1,!0)),e._zTime=i,x){if(!i)return}else t(e._startAt,I,I);for(e._pt=e._ptCache=0,M=L&&Q(M)||M&&!L,s=0;s<O.length;s++){if(c=(h=O[s])._gsap||St(O)[s]._gsap,e._ptLookup[s]=p={},wt[c.id]&&bt.length&&Bt(),m=P===O?s:P.indexOf(h),d&&!1!==(u=new d).init(h,g||r,e,m,P)&&(e._pt=a=new Ti(e._pt,h,u.name,0,1,u.render,u,0,u.priority),u._props.forEach((function(t){p[t]=a})),u.priority&&(l=1)),!d||g)for(o in r)At[o]&&(u=hi(o,r,e,m,h,P))?u.priority&&(l=1):p[o]=a=ai.call(e,h,o,"get",r[o],m,P,0,_.stringFilter);e._op&&e._op[s]&&e.kill(h,e._op[s]),B&&e._pt&&(ri=e,A.killTweensOf(h,p,e.globalTime(i)),f=!e.parent,ri=0),e._pt&&M&&(wt[c.id]=1)}l&&Si(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!f,T&&i<=0&&D.render(G,!0,!0)},ci=function(t,e,i,n){var r,s,o=e.ease||n||"power1.inOut";if(et(e))s=i[t]||(i[t]=[]),e.forEach((function(t,i){return s.push({t:i/(e.length-1)*100,v:t,e:o})}));else for(r in e)s=i[r]||(i[r]=[]),"ease"===r||s.push({t:parseFloat(t),v:e[r],e:o})},di=function(t,e,i,n,r){return X(t)?t.call(e,i,n,r):$(t)&&~t.indexOf("random(")?Ee(t):t},ui=Et+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",pi={};Lt(ui+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return pi[t]=1}));var mi=function(t){function e(e,i,n,r){var s;"number"==typeof i&&(n.duration=i,i=n,n=null);var o,a,h,l,c,d,u,p,m=(s=t.call(this,r?i:jt(i))||this).vars,g=m.duration,f=m.delay,v=m.immediateRender,b=m.stagger,w=m.overwrite,x=m.keyframes,M=m.defaults,C=m.scrollTrigger,E=m.yoyoEase,S=i.parent||A,T=(et(e)||tt(e)?U(e[0]):"length"in i)?[e]:ve(e);if(s._targets=T.length?St(T):pt("GSAP target "+e+" not found. https://gsap.com",!D.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=w,x||b||K(g)||K(f)){if(i=s.vars,(o=s.timeline=new ni({data:"nested",defaults:M||{},targets:S&&"nested"===S.data?S.vars.targets:T})).kill(),o.parent=o._dp=_(s),o._start=0,b||K(g)||K(f)){if(l=T.length,u=b&&we(b),J(b))for(c in b)~ui.indexOf(c)&&(p||(p={}),p[c]=b[c]);for(a=0;a<l;a++)(h=Vt(i,pi)).stagger=0,E&&(h.yoyoEase=E),p&&Ht(h,p),d=T[a],h.duration=+di(g,_(s),a,d,T),h.delay=(+di(f,_(s),a,d,T)||0)-s._delay,!b&&1===l&&h.delay&&(s._delay=f=h.delay,s._start+=f,h.delay=0),o.to(d,h,u?u(a,d,T):0),o._ease=We.none;o.duration()?g=f=0:s.timeline=0}else if(x){jt(It(o.vars.defaults,{ease:"none"})),o._ease=Je(x.ease||i.ease||"none");var k,L,R,O=0;if(et(x))x.forEach((function(t){return o.to(T,t,">")})),o.duration();else{for(c in h={},x)"ease"===c||"easeEach"===c||ci(c,x[c],h,x.easeEach);for(c in h)for(k=h[c].sort((function(t,e){return t.t-e.t})),O=0,a=0;a<k.length;a++)(R={ease:(L=k[a]).e,duration:(L.t-(a?k[a-1].t:0))/100*g})[c]=L.v,o.to(T,R,O),O+=R.duration;o.duration()<g&&o.to({},{duration:g-o.duration()})}}g||s.duration(g=o.duration())}else s.timeline=0;return!0!==w||y||(ri=_(s),A.killTweensOf(T),ri=0),ie(S,_(s),n),i.reversed&&s.reverse(),i.paused&&s.paused(!0),(v||!g&&!x&&s._start===Ot(S._time)&&Q(v)&&qt(_(s))&&"nested"!==S.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-f)||0)),C&&ne(_(s),C),s}v(e,t);var i=e.prototype;return i.render=function(t,e,i){var n,r,s,o,a,h,l,c,d,u=this._time,p=this._tDur,m=this._dur,g=t<0,f=t>p-I&&!g?p:t<I?0:t;if(m){if(f!==this._tTime||!t||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(n=f,c=this.timeline,this._repeat){if(o=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*o+t,e,i);if(n=Ot(f%o),f===p?(s=this._repeat,n=m):((s=~~(f/o))&&s===Ot(f/o)&&(n=m,s--),n>m&&(n=m)),(h=this._yoyo&&1&s)&&(d=this._yEase,n=m-n),a=Qt(this._tTime,o),n===u&&!i&&this._initted&&s===a)return this._tTime=f,this;s!==a&&(c&&this._yEase&&qe(c,h),this.vars.repeatRefresh&&!h&&!this._lock&&this._time!==o&&this._initted&&(this._lock=i=1,this.render(Ot(o*s),!0).invalidate()._lock=0))}if(!this._initted){if(re(this,g?t:n,i,e,f))return this._tTime=0,this;if(!(u===this._time||i&&this.vars.repeatRefresh&&s!==a))return this;if(m!==this._dur)return this.render(t,e,i)}if(this._tTime=f,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(d||this._ease)(n/m),this._from&&(this.ratio=l=1-l),n&&!u&&!e&&!s&&(ke(this,"onStart"),this._tTime!==f))return this;for(r=this._pt;r;)r.r(l,r.d),r=r._next;c&&c.render(t<0?t:c._dur*c._ease(n/this._dur),e,i)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&Ut(this,t,0,i),ke(this,"onUpdate")),this._repeat&&s!==a&&this.vars.onRepeat&&!e&&this.parent&&ke(this,"onRepeat"),f!==this._tDur&&f||this._tTime!==f||(g&&!this._onUpdate&&Ut(this,t,0,!0),(t||!m)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&$t(this,1),e||g&&!u||!(f||u||h)||(ke(this,f===p?"onComplete":"onReverseComplete",!0),this._prom&&!(f<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,i,n){var r,s,o,a=t.ratio,h=e<0||!e&&(!t._start&&se(t)&&(t._initted||!oe(t))||(t._ts<0||t._dp._ts<0)&&!oe(t))?0:1,l=t._rDelay,c=0;if(l&&t._repeat&&(c=pe(0,t._tDur,e),s=Qt(c,l),t._yoyo&&1&s&&(h=1-h),s!==Qt(t._tTime,l)&&(a=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==a||b||n||t._zTime===I||!e&&t._zTime){if(!t._initted&&re(t,e,n,i,c))return;for(o=t._zTime,t._zTime=e||(i?I:0),i||(i=e&&!o),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=c,r=t._pt;r;)r.r(h,r.d),r=r._next;e<0&&Ut(t,e,0,!0),t._onUpdate&&!i&&ke(t,"onUpdate"),c&&t._repeat&&!i&&t.parent&&ke(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&$t(t,1),i||b||(ke(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,i);return this},i.targets=function(){return this._targets},i.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},i.resetTo=function(t,e,i,n,r){k||Ve.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||li(this,s),function(t,e,i,n,r,s,o,a){var h,l,c,d,u=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!u)for(u=t._ptCache[e]=[],c=t._ptLookup,d=t._targets.length;d--;){if((h=c[d][e])&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return si=1,t.vars[e]="+=0",li(t,o),si=0,a?pt(e+" not eligible for reset"):1;u.push(h)}for(d=u.length;d--;)(h=(l=u[d])._pt||l).s=!n&&0!==n||r?h.s+(n||0)+s*h.c:n,h.c=i-h.s,l.e&&(l.e=Rt(i)+me(l.e)),l.b&&(l.b=h.s+me(l.b))}(this,t,e,i,n,this._ease(s/this._dur),s,r)?this.resetTo(t,e,i,n,1):(te(this,0),this.parent||Wt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Le(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,ri&&!0!==ri.vars.overwrite)._first||Le(this),this.parent&&i!==this.timeline.totalDuration()&&ae(this,this._dur*this.timeline._tDur/i,0,1),this}var n,r,s,o,a,h,l,c=this._targets,d=t?ve(t):c,u=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var i=t.length,n=i===e.length;n&&i--&&t[i]===e[i];);return i<0}(c,d))return"all"===e&&(this._pt=0),Le(this);for(n=this._op=this._op||[],"all"!==e&&($(e)&&(a={},Lt(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var i,n,r,s,o=t[0]?Tt(t[0]).harness:0,a=o&&o.aliases;if(!a)return e;for(n in i=Ht({},e),a)if(n in i)for(r=(s=a[n].split(",")).length;r--;)i[s[r]]=i[n];return i}(c,e)),l=c.length;l--;)if(~d.indexOf(c[l]))for(a in r=u[l],"all"===e?(n[l]=e,o=r,s={}):(s=n[l]=n[l]||{},o=e),o)(h=r&&r[a])&&("kill"in h.d&&!0!==h.d.kill(a)||Yt(this,h,"_pt"),delete r[a]),"all"!==s&&(s[a]=1);return this._initted&&!this._pt&&p&&Le(this),this},e.to=function(t,i){return new e(t,i,arguments[2])},e.from=function(t,e){return de(1,arguments)},e.delayedCall=function(t,i,n,r){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:r})},e.fromTo=function(t,e,i){return de(2,arguments)},e.set=function(t,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(t,i)},e.killTweensOf=function(t,e,i){return A.killTweensOf(t,e,i)},e}(ii);It(mi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Lt("staggerTo,staggerFrom,staggerFromTo",(function(t){mi[t]=function(){var e=new ni,i=ge.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var gi=function(t,e,i){return t[e]=i},fi=function(t,e,i){return t[e](i)},_i=function(t,e,i,n){return t[e](n.fp,i)},vi=function(t,e,i){return t.setAttribute(e,i)},yi=function(t,e){return X(t[e])?fi:q(t[e])&&t.setAttribute?vi:gi},bi=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},wi=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Ai=function(t,e){var i=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*t):Math.round(1e4*(i.s+i.c*t))/1e4)+n,i=i._next;n+=e.c}e.set(e.t,e.p,n,e)},xi=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},Mi=function(t,e,i,n){for(var r,s=this._pt;s;)r=s._next,s.p===n&&s.modifier(t,e,i),s=r},Ci=function(t){for(var e,i,n=this._pt;n;)i=n._next,n.p===t&&!n.op||n.op===t?Yt(this,n,"_pt"):n.dep||(e=1),n=i;return!e},Ei=function(t,e,i,n){n.mSet(t,e,n.m.call(n.tween,i,n.mt),n)},Si=function(t){for(var e,i,n,r,s=t._pt;s;){for(e=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:r)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:r=s,s=e}t._pt=n},Ti=function(){function t(t,e,i,n,r,s,o,a,h){this.t=e,this.s=n,this.c=r,this.p=i,this.r=s||bi,this.d=o||this,this.set=a||gi,this.pr=h||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,i){this.mSet=this.mSet||this.set,this.set=Ei,this.m=t,this.mt=i,this.tween=e},t}();Lt(Et+"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(t){return yt[t]=1})),lt.TweenMax=lt.TweenLite=mi,lt.TimelineLite=lt.TimelineMax=ni,A=new ni({sortChildren:!1,defaults:z,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),D.stringFilter=Ne;var ki=[],Li={},Ri=[],Oi=0,Fi=0,Pi=function(t){return(Li[t]||Ri).map((function(t){return t()}))},Bi=function(){var t=Date.now(),e=[];t-Oi>2&&(Pi("matchMediaInit"),ki.forEach((function(t){var i,n,r,s,o=t.queries,a=t.conditions;for(n in o)(i=x.matchMedia(o[n]).matches)&&(r=1),i!==a[n]&&(a[n]=i,s=1);s&&(t.revert(),r&&e.push(t))})),Pi("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),Oi=t,Pi("matchMedia"))},Di=function(){function t(t,e){this.selector=e&&ye(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Fi++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,i){X(t)&&(i=e,e=t,t=X);var n=this,r=function(){var t,r=w,s=n.selector;return r&&r!==n&&r.data.push(n),i&&(n.selector=ye(i)),w=n,t=e.apply(n,arguments),X(t)&&n._r.push(t),w=r,n.selector=s,n.isReverted=!1,t};return n.last=r,t===X?r(n,(function(t){return n.add(null,t)})):t?n[t]=r:r},e.ignore=function(t){var e=w;w=null,t(this),w=e},e.getTweens=function(){var e=[];return this.data.forEach((function(i){return i instanceof t?e.push.apply(e,i.getTweens()):i instanceof mi&&!(i.parent&&"nested"===i.parent.data)&&e.push(i)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var i=this;if(t?function(){for(var e,n=i.getTweens(),r=i.data.length;r--;)"isFlip"===(e=i.data[r]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),r=i.data.length;r--;)(e=i.data[r])instanceof ni?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof mi)&&e.revert&&e.revert(t);i._r.forEach((function(e){return e(t,i)})),i.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=ki.length;n--;)ki[n].id===this.id&&ki.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),zi=function(){function t(t){this.contexts=[],this.scope=t,w&&w.data.push(this)}var e=t.prototype;return e.add=function(t,e,i){J(t)||(t={matches:t});var n,r,s,o=new Di(0,i||this.scope),a=o.conditions={};for(r in w&&!o.selector&&(o.selector=w.selector),this.contexts.push(o),e=o.add("onMatch",e),o.queries=t,t)"all"===r?s=1:(n=x.matchMedia(t[r]))&&(ki.indexOf(o)<0&&ki.push(o),(a[r]=n.matches)&&(s=1),n.addListener?n.addListener(Bi):n.addEventListener("change",Bi));return s&&e(o,(function(t){return o.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Gi={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach((function(t){return Oe(t)}))},timeline:function(t){return new ni(t)},getTweensOf:function(t,e){return A.getTweensOf(t,e)},getProperty:function(t,e,i,n){$(t)&&(t=ve(t)[0]);var r=Tt(t||{}).get,s=i?Gt:zt;return"native"===i&&(i=""),t?e?s((At[e]&&At[e].get||r)(t,e,i,n)):function(e,i,n){return s((At[e]&&At[e].get||r)(t,e,i,n))}:t},quickSetter:function(t,e,i){if((t=ve(t)).length>1){var n=t.map((function(t){return Ni.quickSetter(t,e,i)})),r=n.length;return function(t){for(var e=r;e--;)n[e](t)}}t=t[0]||{};var s=At[e],o=Tt(t),a=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(e){var n=new s;T._pt=0,n.init(t,i?e+i:e,T,0,[t]),n.render(1,n),T._pt&&xi(1,T)}:o.set(t,a);return s?h:function(e){return h(t,a,i?e+i:e,o,1)}},quickTo:function(t,e,i){var n,r=Ni.to(t,Ht(((n={})[e]="+=0.1",n.paused=!0,n),i||{})),s=function(t,i,n){return r.resetTo(e,t,i,n)};return s.tween=r,s},isTweening:function(t){return A.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Je(t.ease,z.ease)),Nt(z,t||{})},config:function(t){return Nt(D,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,n=t.plugins,r=t.defaults,s=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!At[t]&&!lt[t]&&pt(e+" effect requires "+t+" plugin.")})),xt[e]=function(t,e,n){return i(ve(t),It(e||{},r),n)},s&&(ni.prototype[e]=function(t,i,n){return this.add(xt[e](t,J(i)?i:(n=i)&&{},this),n)})},registerEase:function(t,e){We[t]=Je(e)},parseEase:function(t,e){return arguments.length?Je(t,e):We},getById:function(t){return A.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var i,n,r=new ni(t);for(r.smoothChildTiming=Q(t.smoothChildTiming),A.remove(r),r._dp=0,r._time=r._tTime=A._time,i=A._first;i;)n=i._next,!e&&!i._dur&&i instanceof mi&&i.vars.onComplete===i._targets[0]||ie(r,i,i._start-i._delay),i=n;return ie(A,r,0),r},context:function(t,e){return t?new Di(t,e):w},matchMedia:function(t){return new zi(t)},matchMediaRefresh:function(){return ki.forEach((function(t){var e,i,n=t.conditions;for(i in n)n[i]&&(n[i]=!1,e=1);e&&t.revert()}))||Bi()},addEventListener:function(t,e){var i=Li[t]||(Li[t]=[]);~i.indexOf(e)||i.push(e)},removeEventListener:function(t,e){var i=Li[t],n=i&&i.indexOf(e);n>=0&&i.splice(n,1)},utils:{wrap:function t(e,i,n){var r=i-e;return et(e)?Ce(e,t(0,e.length),i):ue(n,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,i,n){var r=i-e,s=2*r;return et(e)?Ce(e,t(0,e.length-1),i):ue(n,(function(t){return e+((t=(s+(t-e)%s)%s||0)>r?s-t:t)}))},distribute:we,random:Me,snap:xe,normalize:function(t,e,i){return Se(t,e,0,1,i)},getUnit:me,clamp:function(t,e,i){return ue(i,(function(i){return pe(t,e,i)}))},splitColor:De,toArray:ve,selector:ye,mapRange:Se,pipe:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(i){return t(parseFloat(i))+(e||me(i))}},interpolate:function t(e,i,n,r){var s=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!s){var o,a,h,l,c,d=$(e),u={};if(!0===n&&(r=1)&&(n=null),d)e={p:e},i={p:i};else if(et(e)&&!et(i)){for(h=[],l=e.length,c=l-2,a=1;a<l;a++)h.push(t(e[a-1],e[a]));l--,s=function(t){t*=l;var e=Math.min(c,~~t);return h[e](t-e)},n=i}else r||(e=Ht(et(e)?[]:{},e));if(!h){for(o in i)ai.call(u,e,o,"get",i[o]);s=function(t){return xi(t,u)||(d?e.p:e)}}}return ue(n,s)},shuffle:be},install:dt,effects:xt,ticker:Ve,updateRoot:ni.updateRoot,plugins:At,globalTimeline:A,core:{PropTween:Ti,globals:mt,Tween:mi,Timeline:ni,Animation:ii,getCache:Tt,_removeLinkedListItem:Yt,reverting:function(){return b},context:function(t){return t&&w&&(w.data.push(t),t._ctx=w),w},suppressOverwrites:function(t){return y=t}}};Lt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Gi[t]=mi[t]})),Ve.add(ni.updateRoot),T=Gi.to({},{duration:0});var Ii=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},Hi=function(t,e){return{name:t,rawVars:1,init:function(t,i,n){n._onInit=function(t){var n,r;if($(i)&&(n={},Lt(i,(function(t){return n[t]=1})),i=n),e){for(r in n={},i)n[r]=e(i[r]);i=n}!function(t,e){var i,n,r,s=t._targets;for(i in e)for(n=s.length;n--;)(r=t._ptLookup[n][i])&&(r=r.d)&&(r._pt&&(r=Ii(r,i)),r&&r.modifier&&r.modifier(e[i],t,s[n],i))}(t,i)}}}},Ni=Gi.registerPlugin({name:"attr",init:function(t,e,i,n,r){var s,o,a;for(s in this.tween=i,e)a=t.getAttribute(s)||"",(o=this.add(t,"setAttribute",(a||0)+"",e[s],n,r,0,0,s)).op=s,o.b=a,this._props.push(s)},render:function(t,e){for(var i=e._pt;i;)b?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i],0,0,0,0,0,1)}},Hi("roundProps",Ae),Hi("modifiers"),Hi("snap",xe))||Gi;mi.version=ni.version=Ni.version="3.12.5",E=1,Z()&&je(),We.Power0,We.Power1,We.Power2,We.Power3,We.Power4,We.Linear,We.Quad,We.Cubic,We.Quart,We.Quint,We.Strong,We.Elastic,We.Back,We.SteppedEase,We.Bounce,We.Sine,We.Expo,We.Circ;var Vi,ji,Wi,Yi,$i,Xi,Ui,qi,Ji={},Qi=180/Math.PI,Zi=Math.PI/180,Ki=Math.atan2,tn=/([A-Z])/g,en=/(left|right|width|margin|padding|x)/i,nn=/[\s,\(]\S/,rn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},sn=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},on=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},an=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},hn=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},ln=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},cn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},dn=function(t,e,i){return t.style[e]=i},un=function(t,e,i){return t.style.setProperty(e,i)},pn=function(t,e,i){return t._gsap[e]=i},mn=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},gn=function(t,e,i,n,r){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},fn=function(t,e,i,n,r){var s=t._gsap;s[e]=i,s.renderTransform(r,s)},_n="transform",vn=_n+"Origin",yn=function t(e,i){var n=this,r=this.target,s=r.style,o=r._gsap;if(e in Ji&&s){if(this.tfm=this.tfm||{},"transform"===e)return rn.transform.split(",").forEach((function(e){return t.call(n,e,i)}));if(~(e=rn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=zn(r,t)})):this.tfm[e]=o.x?o[e]:zn(r,e),e===vn&&(this.tfm.zOrigin=o.zOrigin),this.props.indexOf(_n)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(vn,i,"")),e=_n}(s||i)&&this.props.push(e,i,s[e])},bn=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},wn=function(){var t,e,i=this.props,n=this.target,r=n.style,s=n._gsap;for(t=0;t<i.length;t+=3)i[t+1]?n[i[t]]=i[t+2]:i[t+2]?r[i[t]]=i[t+2]:r.removeProperty("--"===i[t].substr(0,2)?i[t]:i[t].replace(tn,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)s[e]=this.tfm[e];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(t=Ui())&&t.isStart||r[_n]||(bn(r),s.zOrigin&&r[vn]&&(r[vn]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},An=function(t,e){var i={target:t,props:[],revert:wn,save:yn};return t._gsap||Ni.core.getCache(t),e&&e.split(",").forEach((function(t){return i.save(t)})),i},xn=function(t,e){var i=ji.createElementNS?ji.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):ji.createElement(t);return i&&i.style?i:ji.createElement(t)},Mn=function t(e,i,n){var r=getComputedStyle(e);return r[i]||r.getPropertyValue(i.replace(tn,"-$1").toLowerCase())||r.getPropertyValue(i)||!n&&t(e,En(i)||i,1)||""},Cn="O,Moz,ms,Ms,Webkit".split(","),En=function(t,e,i){var n=(e||$i).style,r=5;if(t in n&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);r--&&!(Cn[r]+t in n););return r<0?null:(3===r?"ms":r>=0?Cn[r]:"")+t},Sn=function(){"undefined"!=typeof window&&window.document&&(Vi=window,ji=Vi.document,Wi=ji.documentElement,$i=xn("div")||{style:{}},xn("div"),_n=En(_n),vn=_n+"Origin",$i.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",qi=!!En("perspective"),Ui=Ni.core.reverting,Yi=1)},Tn=function t(e){var i,n=xn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,o=this.style.cssText;if(Wi.appendChild(n),n.appendChild(this),this.style.display="block",e)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(i=this._gsapBBox());return r&&(s?r.insertBefore(this,s):r.appendChild(this)),Wi.removeChild(n),this.style.cssText=o,i},kn=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},Ln=function(t){var e;try{e=t.getBBox()}catch(i){e=Tn.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Tn||(e=Tn.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+kn(t,["x","cx","x1"])||0,y:+kn(t,["y","cy","y1"])||0,width:0,height:0}},Rn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Ln(t))},On=function(t,e){if(e){var i,n=t.style;e in Ji&&e!==vn&&(e=_n),n.removeProperty?("ms"!==(i=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty("--"===i?e:e.replace(tn,"-$1").toLowerCase())):n.removeAttribute(e)}},Fn=function(t,e,i,n,r,s){var o=new Ti(t._pt,e,i,0,1,s?cn:ln);return t._pt=o,o.b=n,o.e=r,t._props.push(i),o},Pn={deg:1,rad:1,turn:1},Bn={grid:1,flex:1},Dn=function t(e,i,n,r){var s,o,a,h,l=parseFloat(n)||0,c=(n+"").trim().substr((l+"").length)||"px",d=$i.style,u=en.test(i),p="svg"===e.tagName.toLowerCase(),m=(p?"client":"offset")+(u?"Width":"Height"),g=100,f="px"===r,_="%"===r;if(r===c||!l||Pn[r]||Pn[c])return l;if("px"!==c&&!f&&(l=t(e,i,n,"px")),h=e.getCTM&&Rn(e),(_||"%"===c)&&(Ji[i]||~i.indexOf("adius")))return s=h?e.getBBox()[u?"width":"height"]:e[m],Rt(_?l/s*g:l/100*s);if(d[u?"width":"height"]=g+(f?c:r),o=~i.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,h&&(o=(e.ownerSVGElement||{}).parentNode),o&&o!==ji&&o.appendChild||(o=ji.body),(a=o._gsap)&&_&&a.width&&u&&a.time===Ve.time&&!a.uncache)return Rt(l/a.width*g);if(!_||"height"!==i&&"width"!==i)(_||"%"===c)&&!Bn[Mn(o,"display")]&&(d.position=Mn(e,"position")),o===e&&(d.position="static"),o.appendChild($i),s=$i[m],o.removeChild($i),d.position="absolute";else{var v=e.style[i];e.style[i]=g+r,s=e[m],v?e.style[i]=v:On(e,i)}return u&&_&&((a=Tt(o)).time=Ve.time,a.width=o[m]),Rt(f?s*l/g:s&&l?g/s*l:0)},zn=function(t,e,i,n){var r;return Yi||Sn(),e in rn&&"transform"!==e&&~(e=rn[e]).indexOf(",")&&(e=e.split(",")[0]),Ji[e]&&"transform"!==e?(r=Un(t,n),r="transformOrigin"!==e?r[e]:r.svg?r.origin:qn(Mn(t,vn))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=Nn[e]&&Nn[e](t,e,i)||Mn(t,e)||kt(t,e)||("opacity"===e?1:0)),i&&!~(r+"").trim().indexOf(" ")?Dn(t,e,r,i)+i:r},Gn=function(t,e,i,n){if(!i||"none"===i){var r=En(e,t,1),s=r&&Mn(t,r,1);s&&s!==i?(e=r,i=s):"borderColor"===e&&(i=Mn(t,"borderTopColor"))}var o,a,h,l,c,d,u,p,m,g,f,_=new Ti(this._pt,t.style,e,0,1,Ai),v=0,y=0;if(_.b=i,_.e=n,i+="","auto"===(n+="")&&(d=t.style[e],t.style[e]=n,n=Mn(t,e)||n,d?t.style[e]=d:On(t,e)),Ne(o=[i,n]),n=o[1],h=(i=o[0]).match(rt)||[],(n.match(rt)||[]).length){for(;a=rt.exec(n);)u=a[0],m=n.substring(v,a.index),c?c=(c+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(c=1),u!==(d=h[y++]||"")&&(l=parseFloat(d)||0,f=d.substr((l+"").length),"="===u.charAt(1)&&(u=Ft(l,u)+f),p=parseFloat(u),g=u.substr((p+"").length),v=rt.lastIndex-g.length,g||(g=g||D.units[e]||f,v===n.length&&(n+=g,_.e+=g)),f!==g&&(l=Dn(t,e,d,g)||0),_._pt={_next:_._pt,p:m||1===y?m:",",s:l,c:p-l,m:c&&c<4||"zIndex"===e?Math.round:0});_.c=v<n.length?n.substring(v,n.length):""}else _.r="display"===e&&"none"===n?cn:ln;return ot.test(n)&&(_.e=0),this._pt=_,_},In={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Hn=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i,n,r,s=e.t,o=s.style,a=e.u,h=s._gsap;if("all"===a||!0===a)o.cssText="",n=1;else for(r=(a=a.split(",")).length;--r>-1;)i=a[r],Ji[i]&&(n=1,i="transformOrigin"===i?vn:_n),On(s,i);n&&(On(s,_n),h&&(h.svg&&s.removeAttribute("transform"),Un(s,1),h.uncache=1,bn(o)))}},Nn={clearProps:function(t,e,i,n,r){if("isFromStart"!==r.data){var s=t._pt=new Ti(t._pt,e,i,0,0,Hn);return s.u=n,s.pr=-10,s.tween=r,t._props.push(i),1}}},Vn=[1,0,0,1,0,0],jn={},Wn=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Yn=function(t){var e=Mn(t,_n);return Wn(e)?Vn:e.substr(7).match(nt).map(Rt)},$n=function(t,e){var i,n,r,s,o=t._gsap||Tt(t),a=t.style,h=Yn(t);return o.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(h=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?Vn:h:(h!==Vn||t.offsetParent||t===Wi||o.svg||(r=a.display,a.display="block",(i=t.parentNode)&&t.offsetParent||(s=1,n=t.nextElementSibling,Wi.appendChild(t)),h=Yn(t),r?a.display=r:On(t,"display"),s&&(n?i.insertBefore(t,n):i?i.appendChild(t):Wi.removeChild(t))),e&&h.length>6?[h[0],h[1],h[4],h[5],h[12],h[13]]:h)},Xn=function(t,e,i,n,r,s){var o,a,h,l=t._gsap,c=r||$n(t,!0),d=l.xOrigin||0,u=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=c[0],f=c[1],_=c[2],v=c[3],y=c[4],b=c[5],w=e.split(" "),A=parseFloat(w[0])||0,x=parseFloat(w[1])||0;i?c!==Vn&&(a=g*v-f*_)&&(h=A*(-f/a)+x*(g/a)-(g*b-f*y)/a,A=A*(v/a)+x*(-_/a)+(_*b-v*y)/a,x=h):(A=(o=Ln(t)).x+(~w[0].indexOf("%")?A/100*o.width:A),x=o.y+(~(w[1]||w[0]).indexOf("%")?x/100*o.height:x)),n||!1!==n&&l.smooth?(y=A-d,b=x-u,l.xOffset=p+(y*g+b*_)-y,l.yOffset=m+(y*f+b*v)-b):l.xOffset=l.yOffset=0,l.xOrigin=A,l.yOrigin=x,l.smooth=!!n,l.origin=e,l.originIsAbsolute=!!i,t.style[vn]="0px 0px",s&&(Fn(s,l,"xOrigin",d,A),Fn(s,l,"yOrigin",u,x),Fn(s,l,"xOffset",p,l.xOffset),Fn(s,l,"yOffset",m,l.yOffset)),t.setAttribute("data-svg-origin",A+" "+x)},Un=function(t,e){var i=t._gsap||new ei(t);if("x"in i&&!e&&!i.uncache)return i;var n,r,s,o,a,h,l,c,d,u,p,m,g,f,_,v,y,b,w,A,x,M,C,E,S,T,k,L,R,O,F,P,B=t.style,z=i.scaleX<0,G="px",I="deg",H=getComputedStyle(t),N=Mn(t,vn)||"0";return n=r=s=h=l=c=d=u=p=0,o=a=1,i.svg=!(!t.getCTM||!Rn(t)),H.translate&&("none"===H.translate&&"none"===H.scale&&"none"===H.rotate||(B[_n]=("none"!==H.translate?"translate3d("+(H.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==H.rotate?"rotate("+H.rotate+") ":"")+("none"!==H.scale?"scale("+H.scale.split(" ").join(",")+") ":"")+("none"!==H[_n]?H[_n]:"")),B.scale=B.rotate=B.translate="none"),f=$n(t,i.svg),i.svg&&(i.uncache?(S=t.getBBox(),N=i.xOrigin-S.x+"px "+(i.yOrigin-S.y)+"px",E=""):E=!e&&t.getAttribute("data-svg-origin"),Xn(t,E||N,!!E||i.originIsAbsolute,!1!==i.smooth,f)),m=i.xOrigin||0,g=i.yOrigin||0,f!==Vn&&(b=f[0],w=f[1],A=f[2],x=f[3],n=M=f[4],r=C=f[5],6===f.length?(o=Math.sqrt(b*b+w*w),a=Math.sqrt(x*x+A*A),h=b||w?Ki(w,b)*Qi:0,(d=A||x?Ki(A,x)*Qi+h:0)&&(a*=Math.abs(Math.cos(d*Zi))),i.svg&&(n-=m-(m*b+g*A),r-=g-(m*w+g*x))):(P=f[6],O=f[7],k=f[8],L=f[9],R=f[10],F=f[11],n=f[12],r=f[13],s=f[14],l=(_=Ki(P,R))*Qi,_&&(E=M*(v=Math.cos(-_))+k*(y=Math.sin(-_)),S=C*v+L*y,T=P*v+R*y,k=M*-y+k*v,L=C*-y+L*v,R=P*-y+R*v,F=O*-y+F*v,M=E,C=S,P=T),c=(_=Ki(-A,R))*Qi,_&&(v=Math.cos(-_),F=x*(y=Math.sin(-_))+F*v,b=E=b*v-k*y,w=S=w*v-L*y,A=T=A*v-R*y),h=(_=Ki(w,b))*Qi,_&&(E=b*(v=Math.cos(_))+w*(y=Math.sin(_)),S=M*v+C*y,w=w*v-b*y,C=C*v-M*y,b=E,M=S),l&&Math.abs(l)+Math.abs(h)>359.9&&(l=h=0,c=180-c),o=Rt(Math.sqrt(b*b+w*w+A*A)),a=Rt(Math.sqrt(C*C+P*P)),_=Ki(M,C),d=Math.abs(_)>2e-4?_*Qi:0,p=F?1/(F<0?-F:F):0),i.svg&&(E=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Wn(Mn(t,_n)),E&&t.setAttribute("transform",E))),Math.abs(d)>90&&Math.abs(d)<270&&(z?(o*=-1,d+=h<=0?180:-180,h+=h<=0?180:-180):(a*=-1,d+=d<=0?180:-180)),e=e||i.uncache,i.x=n-((i.xPercent=n&&(!e&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+G,i.y=r-((i.yPercent=r&&(!e&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+G,i.z=s+G,i.scaleX=Rt(o),i.scaleY=Rt(a),i.rotation=Rt(h)+I,i.rotationX=Rt(l)+I,i.rotationY=Rt(c)+I,i.skewX=d+I,i.skewY=u+I,i.transformPerspective=p+G,(i.zOrigin=parseFloat(N.split(" ")[2])||!e&&i.zOrigin||0)&&(B[vn]=qn(N)),i.xOffset=i.yOffset=0,i.force3D=D.force3D,i.renderTransform=i.svg?ir:qi?er:Qn,i.uncache=0,i},qn=function(t){return(t=t.split(" "))[0]+" "+t[1]},Jn=function(t,e,i){var n=me(e);return Rt(parseFloat(e)+parseFloat(Dn(t,"x",i+"px",n)))+n},Qn=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,er(t,e)},Zn="0deg",Kn="0px",tr=") ",er=function(t,e){var i=e||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,a=i.z,h=i.rotation,l=i.rotationY,c=i.rotationX,d=i.skewX,u=i.skewY,p=i.scaleX,m=i.scaleY,g=i.transformPerspective,f=i.force3D,_=i.target,v=i.zOrigin,y="",b="auto"===f&&t&&1!==t||!0===f;if(v&&(c!==Zn||l!==Zn)){var w,A=parseFloat(l)*Zi,x=Math.sin(A),M=Math.cos(A);A=parseFloat(c)*Zi,w=Math.cos(A),s=Jn(_,s,x*w*-v),o=Jn(_,o,-Math.sin(A)*-v),a=Jn(_,a,M*w*-v+v)}g!==Kn&&(y+="perspective("+g+tr),(n||r)&&(y+="translate("+n+"%, "+r+"%) "),(b||s!==Kn||o!==Kn||a!==Kn)&&(y+=a!==Kn||b?"translate3d("+s+", "+o+", "+a+") ":"translate("+s+", "+o+tr),h!==Zn&&(y+="rotate("+h+tr),l!==Zn&&(y+="rotateY("+l+tr),c!==Zn&&(y+="rotateX("+c+tr),d===Zn&&u===Zn||(y+="skew("+d+", "+u+tr),1===p&&1===m||(y+="scale("+p+", "+m+tr),_.style[_n]=y||"translate(0, 0)"},ir=function(t,e){var i,n,r,s,o,a=e||this,h=a.xPercent,l=a.yPercent,c=a.x,d=a.y,u=a.rotation,p=a.skewX,m=a.skewY,g=a.scaleX,f=a.scaleY,_=a.target,v=a.xOrigin,y=a.yOrigin,b=a.xOffset,w=a.yOffset,A=a.forceCSS,x=parseFloat(c),M=parseFloat(d);u=parseFloat(u),p=parseFloat(p),(m=parseFloat(m))&&(p+=m=parseFloat(m),u+=m),u||p?(u*=Zi,p*=Zi,i=Math.cos(u)*g,n=Math.sin(u)*g,r=Math.sin(u-p)*-f,s=Math.cos(u-p)*f,p&&(m*=Zi,o=Math.tan(p-m),r*=o=Math.sqrt(1+o*o),s*=o,m&&(o=Math.tan(m),i*=o=Math.sqrt(1+o*o),n*=o)),i=Rt(i),n=Rt(n),r=Rt(r),s=Rt(s)):(i=g,s=f,n=r=0),(x&&!~(c+"").indexOf("px")||M&&!~(d+"").indexOf("px"))&&(x=Dn(_,"x",c,"px"),M=Dn(_,"y",d,"px")),(v||y||b||w)&&(x=Rt(x+v-(v*i+y*r)+b),M=Rt(M+y-(v*n+y*s)+w)),(h||l)&&(o=_.getBBox(),x=Rt(x+h/100*o.width),M=Rt(M+l/100*o.height)),o="matrix("+i+","+n+","+r+","+s+","+x+","+M+")",_.setAttribute("transform",o),A&&(_.style[_n]=o)},nr=function(t,e,i,n,r){var s,o,a=360,h=$(r),l=parseFloat(r)*(h&&~r.indexOf("rad")?Qi:1)-n,c=n+l+"deg";return h&&("short"===(s=r.split("_")[1])&&(l%=a)!==l%180&&(l+=l<0?a:-360),"cw"===s&&l<0?l=(l+36e9)%a-~~(l/a)*a:"ccw"===s&&l>0&&(l=(l-36e9)%a-~~(l/a)*a)),t._pt=o=new Ti(t._pt,e,i,n,l,on),o.e=c,o.u="deg",t._props.push(i),o},rr=function(t,e){for(var i in e)t[i]=e[i];return t},sr=function(t,e,i){var n,r,s,o,a,h,l,c=rr({},i._gsap),d=i.style;for(r in c.svg?(s=i.getAttribute("transform"),i.setAttribute("transform",""),d[_n]=e,n=Un(i,1),On(i,_n),i.setAttribute("transform",s)):(s=getComputedStyle(i)[_n],d[_n]=e,n=Un(i,1),d[_n]=s),Ji)(s=c[r])!==(o=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(a=me(s)!==(l=me(o))?Dn(i,r,s,l):parseFloat(s),h=parseFloat(o),t._pt=new Ti(t._pt,n,r,a,h-a,sn),t._pt.u=l||0,t._props.push(r));rr(n,c)};Lt("padding,margin,Width,Radius",(function(t,e){var i="Top",n="Right",r="Bottom",s="Left",o=(e<3?[i,n,r,s]:[i+s,i+n,r+n,r+s]).map((function(i){return e<2?t+i:"border"+i+t}));Nn[e>1?"border"+t:t]=function(t,e,i,n,r){var s,a;if(arguments.length<4)return s=o.map((function(e){return zn(t,e,i)})),5===(a=s.join(" ")).split(s[0]).length?s[0]:a;s=(n+"").split(" "),a={},o.forEach((function(t,e){return a[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,a,r)}}));var or,ar,hr,lr={name:"css",register:Sn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,n,r){var s,o,a,h,l,c,d,u,p,m,g,f,_,v,y,b,w,A,x,M,C=this._props,E=t.style,S=i.vars.startAt;for(d in Yi||Sn(),this.styles=this.styles||An(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==d&&(o=e[d],!At[d]||!hi(d,e,i,n,t,r)))if(l=typeof o,c=Nn[d],"function"===l&&(l=typeof(o=o.call(i,n,t,r))),"string"===l&&~o.indexOf("random(")&&(o=Ee(o)),c)c(this,t,d,o,i)&&(y=1);else if("--"===d.substr(0,2))s=(getComputedStyle(t).getPropertyValue(d)+"").trim(),o+="",Ie.lastIndex=0,Ie.test(s)||(u=me(s),p=me(o)),p?u!==p&&(s=Dn(t,d,s,p)+p):u&&(o+=u),this.add(E,"setProperty",s,o,n,r,0,0,d),C.push(d),b.push(d,0,E[d]);else if("undefined"!==l){if(S&&d in S?(s="function"==typeof S[d]?S[d].call(i,n,t,r):S[d],$(s)&&~s.indexOf("random(")&&(s=Ee(s)),me(s+"")||"auto"===s||(s+=D.units[d]||me(zn(t,d))||""),"="===(s+"").charAt(1)&&(s=zn(t,d))):s=zn(t,d),h=parseFloat(s),(m="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),a=parseFloat(o),d in rn&&("autoAlpha"===d&&(1===h&&"hidden"===zn(t,"visibility")&&a&&(h=0),b.push("visibility",0,E.visibility),Fn(this,E,"visibility",h?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==d&&"transform"!==d&&~(d=rn[d]).indexOf(",")&&(d=d.split(",")[0])),g=d in Ji)if(this.styles.save(d),f||((_=t._gsap).renderTransform&&!e.parseTransform||Un(t,e.parseTransform),v=!1!==e.smoothOrigin&&_.smooth,(f=this._pt=new Ti(this._pt,E,_n,0,1,_.renderTransform,_,0,-1)).dep=1),"scale"===d)this._pt=new Ti(this._pt,_,"scaleY",_.scaleY,(m?Ft(_.scaleY,m+a):a)-_.scaleY||0,sn),this._pt.u=0,C.push("scaleY",d),d+="X";else{if("transformOrigin"===d){b.push(vn,0,E[vn]),A=void 0,x=void 0,M=void 0,A=(w=o).split(" "),x=A[0],M=A[1]||"50%","top"!==x&&"bottom"!==x&&"left"!==M&&"right"!==M||(w=x,x=M,M=w),A[0]=In[x]||x,A[1]=In[M]||M,o=A.join(" "),_.svg?Xn(t,o,0,v,0,this):((p=parseFloat(o.split(" ")[2])||0)!==_.zOrigin&&Fn(this,_,"zOrigin",_.zOrigin,p),Fn(this,E,d,qn(s),qn(o)));continue}if("svgOrigin"===d){Xn(t,o,1,v,0,this);continue}if(d in jn){nr(this,_,d,h,m?Ft(h,m+o):o);continue}if("smoothOrigin"===d){Fn(this,_,"smooth",_.smooth,o);continue}if("force3D"===d){_[d]=o;continue}if("transform"===d){sr(this,o,t);continue}}else d in E||(d=En(d)||d);if(g||(a||0===a)&&(h||0===h)&&!nn.test(o)&&d in E)a||(a=0),(u=(s+"").substr((h+"").length))!==(p=me(o)||(d in D.units?D.units[d]:u))&&(h=Dn(t,d,s,p)),this._pt=new Ti(this._pt,g?_:E,d,h,(m?Ft(h,m+a):a)-h,g||"px"!==p&&"zIndex"!==d||!1===e.autoRound?sn:hn),this._pt.u=p||0,u!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=an);else if(d in E)Gn.call(this,t,d,s,m?m+o:o);else if(d in t)this.add(t,d,s||t[d],m?m+o:o,n,r);else if("parseTransform"!==d){ut(d,o);continue}g||(d in E?b.push(d,0,E[d]):b.push(d,1,s||t[d])),C.push(d)}y&&Si(this)},render:function(t,e){if(e.tween._time||!Ui())for(var i=e._pt;i;)i.r(t,i.d),i=i._next;else e.styles.revert()},get:zn,aliases:rn,getSetter:function(t,e,i){var n=rn[e];return n&&n.indexOf(",")<0&&(e=n),e in Ji&&e!==vn&&(t._gsap.x||zn(t,"x"))?i&&Xi===i?"scale"===e?mn:pn:(Xi=i||{})&&("scale"===e?gn:fn):t.style&&!q(t.style[e])?dn:~e.indexOf("-")?un:yi(t,e)},core:{_removeProperty:On,_getMatrix:$n}};Ni.utils.checkPrefix=En,Ni.core.getStyleSaver=An,hr=Lt((or="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(ar="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Ji[t]=1})),Lt(ar,(function(t){D.units[t]="deg",jn[t]=1})),rn[hr[13]]=or+","+ar,Lt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");rn[e[1]]=hr[e[0]]})),Lt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){D.units[t]="px"})),Ni.registerPlugin(lr);var cr=Ni.registerPlugin(lr)||Ni;cr.core.Tween;class dr{constructor(t,e,i,n,r="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),dr.nextNameID=dr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++dr.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(t=>t.stopPropagation())),this.domElement.addEventListener("keyup",(t=>t.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class ur extends dr{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function pr(t){let e,i;return(e=t.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!i&&"#"+i}const mr={isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:pr,toHexString:pr},gr={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},fr={isPrimitive:!1,match:t=>Array.isArray(t),fromHexString(t,e,i=1){const n=gr.fromHexString(t);e[0]=(n>>16&255)/255*i,e[1]=(n>>8&255)/255*i,e[2]=(255&n)/255*i},toHexString:([t,e,i],n=1)=>gr.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},_r={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,e,i=1){const n=gr.fromHexString(t);e.r=(n>>16&255)/255*i,e.g=(n>>8&255)/255*i,e.b=(255&n)/255*i},toHexString:({r:t,g:e,b:i},n=1)=>gr.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},vr=[mr,gr,fr,_r];class yr extends dr{constructor(t,e,i,n){var r;super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,vr.find((t=>t.match(r)))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const t=pr(this.$text.value);t&&this._setValueFromHexString(t)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class br extends dr{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(t=>{t.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class wr extends dr{constructor(t,e,i,n,r,s){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(r);const o=void 0!==s;this.step(o?s:this._getImplicitStep(),o),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=100*e+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const e=parseFloat(this.$input.value);isNaN(e)||(this._snapClampSetValue(e+t),this.$input.value=this.getValue())};let e,i,n,r,s,o=!1;const a=t=>{if(o){const n=t.clientX-e,r=t.clientY-i;Math.abs(r)>5?(t.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>5&&h()}if(!o){const e=t.clientY-n;s-=e*this._step*this._arrowKeyMultiplier(t),r+s>this._max?s=this._max-r:r+s<this._min&&(s=this._min-r),this._snapClampSetValue(r+s)}n=t.clientY},h=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",h)};this.$input.addEventListener("input",(()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.key&&this.$input.blur(),"ArrowUp"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e))),"ArrowDown"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e)*-1))})),this.$input.addEventListener("wheel",(e=>{this._inputFocused&&(e.preventDefault(),t(this._step*this._normalizeMouseWheel(e)))}),{passive:!1}),this.$input.addEventListener("mousedown",(t=>{e=t.clientX,i=n=t.clientY,o=!0,r=this.getValue(),s=0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",h)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const e=this.$slider.getBoundingClientRect();let i=((t,e,i,n,r)=>(t-e)/(i-e)*(r-n)+n)(t,e.left,e.right,this._min,this._max);this._snapClampSetValue(i)},e=e=>{t(e.clientX)},i=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",i)};let n,r,s=!1;const o=e=>{e.preventDefault(),this._setDraggingStyle(!0),t(e.touches[0].clientX),s=!1},a=e=>{if(s){const t=e.touches[0].clientX-n,i=e.touches[0].clientY-r;Math.abs(t)>Math.abs(i)?o(e):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",h))}else e.preventDefault(),t(e.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",h)},l=this._callOnFinishChange.bind(this);let c;this.$slider.addEventListener("mousedown",(n=>{this._setDraggingStyle(!0),t(n.clientX),window.addEventListener("mousemove",e),window.addEventListener("mouseup",i)})),this.$slider.addEventListener("touchstart",(t=>{t.touches.length>1||(this._hasScrollBar?(n=t.touches[0].clientX,r=t.touches[0].clientY,s=!0):o(t),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",h))}),{passive:!1}),this.$slider.addEventListener("wheel",(t=>{if(Math.abs(t.deltaX)<Math.abs(t.deltaY)&&this._hasScrollBar)return;t.preventDefault();const e=this._normalizeMouseWheel(t)*this._step;this._snapClampSetValue(this.getValue()+e),this.$input.value=this.getValue(),clearTimeout(c),c=setTimeout(l,400)}),{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10);return e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=0;return this._hasMin?e=this._min:this._hasMax&&(e=this._max),t-=e,t=Math.round(t/this._step)*this._step,t+=e,t=parseFloat(t.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class Ar extends dr{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach((t=>{const e=document.createElement("option");e.textContent=t,this.$select.appendChild(e)})),this.updateDisplay(),this}updateDisplay(){const t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=-1===e?t:this._names[e],this}}class xr extends dr{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let Mr=!1;class Cr{constructor({parent:t,autoPlace:e=void 0===t,container:i,width:n,title:r="Controls",closeFolders:s=!1,injectStyles:o=!0,touchStyles:a=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("button"),this.$title.classList.add("title"),this.$title.setAttribute("aria-expanded",!0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),a&&this.domElement.classList.add("allow-touch-styles"),!Mr&&o&&(!function(t){const e=document.createElement("style");e.innerHTML=t;const i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n font-weight: 600;\n padding: 0 var(--padding);\n width: 100%;\n text-align: left;\n background: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n border: none;\n}\n.lil-gui .controller button {\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n}\n@media (hover: hover) {\n .lil-gui .controller button:hover {\n background: var(--hover-color);\n }\n .lil-gui .controller button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui .controller button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),Mr=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=s}add(t,e,i,n,r){if(Object(i)===i)return new Ar(this,t,e,i);const s=t[e];switch(typeof s){case"number":return new wr(this,t,e,i,n,r);case"boolean":return new ur(this,t,e);case"string":return new xr(this,t,e);case"function":return new br(this,t,e)}console.error("gui.add failed\n\tproperty:",e,"\n\tobject:",t,"\n\tvalue:",s)}addColor(t,e,i=1){return new yr(this,t,e,i)}addFolder(t){const e=new Cr({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach((e=>{e instanceof br||e._name in t.controllers&&e.load(t.controllers[e._name])})),e&&t.folders&&this.folders.forEach((e=>{e._title in t.folders&&e.load(t.folders[e._title])})),this}save(t=!0){const e={controllers:{},folders:{}};return this.controllers.forEach((t=>{if(!(t instanceof br)){if(t._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);e.controllers[t._name]=t.save()}})),t&&this.folders.forEach((t=>{if(t._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);e.folders[t._title]=t.save()})),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");const i=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame((()=>{this.$children.style.height=n+"px"}))})),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach((t=>t.reset())),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((t=>t.destroy()))}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach((e=>{t=t.concat(e.controllersRecursive())})),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach((e=>{t=t.concat(e.foldersRecursive())})),t}}var Er,Sr={exports:{}};Sr.exports=(Er=function(){function t(t){return n.appendChild(t.dom),t}function e(t){for(var e=0;e<n.children.length;e++)n.children[e].style.display=e===t?"block":"none";i=t}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",(function(t){t.preventDefault(),e(++i%n.children.length)}),!1);var r=(performance||Date).now(),s=r,o=0,a=t(new Er.Panel("FPS","#0ff","#002")),h=t(new Er.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var l=t(new Er.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){r=(performance||Date).now()},end:function(){o++;var t=(performance||Date).now();if(h.update(t-r,200),t>s+1e3&&(a.update(1e3*o/(t-s),100),s=t,o=0,l)){var e=performance.memory;l.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576)}return t},update:function(){r=this.end()},domElement:n,setMode:e}},Er.Panel=function(t,e,i){var n=1/0,r=0,s=Math.round,o=s(window.devicePixelRatio||1),a=80*o,h=48*o,l=3*o,c=2*o,d=3*o,u=15*o,p=74*o,m=30*o,g=document.createElement("canvas");g.width=a,g.height=h,g.style.cssText="width:80px;height:48px";var f=g.getContext("2d");return f.font="bold "+9*o+"px Helvetica,Arial,sans-serif",f.textBaseline="top",f.fillStyle=i,f.fillRect(0,0,a,h),f.fillStyle=e,f.fillText(t,l,c),f.fillRect(d,u,p,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(d,u,p,m),{dom:g,update:function(h,_){n=Math.min(n,h),r=Math.max(r,h),f.fillStyle=i,f.globalAlpha=1,f.fillRect(0,0,a,u),f.fillStyle=e,f.fillText(s(h)+" "+t+" ("+s(n)+"-"+s(r)+")",l,c),f.drawImage(g,d+o,u,p-o,m,d,u,p-o,m),f.fillRect(d+p-o,u,o,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(d+p-o,u,o,s((1-h/_)*m))}}},Er);var Tr=a(Sr.exports);class kr{gui;scene;mixer;clips=[];gridHelper;helpers=[];stats;orbitControls;flyControls;memoryIntervalId;constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.scene=t,this.mixer=e,this.clips=i,this.orbitControls=n.orbitControls,this.flyControls=n.flyControls,this.gui=new Cr({width:300}),this.addSceneFolder(),this.addLightsFolder(),this.addCamerasFolder(),this.addModelsFolder(),this.addAnimationsFolder(),this.addDisplayFolder(),this.addControlsFolder(),this.addPerformanceFolder()}addSceneFolder(){const e=this.gui.addFolder("Scene");e.close();const i={background:this.scene.background?.getHex?.()??0};e.addColor(i,"background").onChange((e=>{this.scene.background=new t.Color(e)})),this.scene.fog instanceof t.Fog&&(e.add(this.scene.fog,"near",.1,50).name("Fog Near"),e.add(this.scene.fog,"far",1,200).name("Fog Far"))}addLightsFolder(){const e=[];if(this.scene.traverse((t=>{t.isLight&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Lights");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(`${e.type} ${e.name||n}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");if(r.add({helper:!1},"helper").onChange((i=>{if(i){let i=null;e instanceof t.PointLight&&(i=new t.PointLightHelper(e)),e instanceof t.SpotLight&&(i=new t.SpotLightHelper(e)),e instanceof t.DirectionalLight&&(i=new t.DirectionalLightHelper(e)),e instanceof t.HemisphereLight&&(i=new t.HemisphereLightHelper(e,5)),i&&(this.scene.add(i),this.helpers.push(i))}else{const t=this.helpers.find((t=>t.light===e));t&&(this.scene.remove(t),this.helpers=this.helpers.filter((e=>e!==t)))}})),"intensity"in e&&r.add(e,"intensity",0,10,.01),"color"in e){const t={color:e.color.getHex()};r.addColor(t,"color").onChange((t=>{e.color.setHex(t)}))}"position"in e&&(r.add(e.position,"x",-50,50,.1),r.add(e.position,"y",-50,50,.1),r.add(e.position,"z",-50,50,.1))}))}addCamerasFolder(){const e=[];if(this.scene.traverse((t=>{t.isCamera&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Cameras");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Camera ${n+1}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.CameraHelper(e);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.CameraHelper&&i.camera===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e instanceof t.PerspectiveCamera&&(r.add(e,"fov",10,100).onChange((()=>e.updateProjectionMatrix())),r.add(e,"near",.1,10).onChange((()=>e.updateProjectionMatrix())),r.add(e,"far",10,2e3).onChange((()=>e.updateProjectionMatrix()))),e instanceof t.OrthographicCamera&&r.add(e,"zoom",.1,10).onChange((()=>e.updateProjectionMatrix()))}))}addModelsFolder(){const e=[];if(this.scene.traverse((t=>{t.isMesh&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Models");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Mesh ${n+1}`);r.close(),r.add(e.position,"x",-10,10,.1),r.add(e.position,"y",-10,10,.1),r.add(e.position,"z",-10,10,.1),r.add(e.rotation,"x",-Math.PI,Math.PI,.01),r.add(e.rotation,"y",-Math.PI,Math.PI,.01),r.add(e.rotation,"z",-Math.PI,Math.PI,.01),r.add(e.scale,"x",.1,10,.1),r.add(e.scale,"y",.1,10,.1),r.add(e.scale,"z",.1,10,.1);if(r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.BoxHelper(e,16711680);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.BoxHelper&&i.object===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e.morphTargetInfluences&&e.morphTargetDictionary){const t=r.addFolder("Morph Targets");Object.keys(e.morphTargetDictionary).forEach((i=>{const n=e.morphTargetDictionary[i];t.add(e.morphTargetInfluences,n,0,1,.01).name(i).listen()}))}}))}addAnimationsFolder(){if(!this.mixer||0===this.clips.length)return;const t=this.gui.addFolder("Animations");t.close();const e={};this.clips.forEach((t=>{e[t.name]=this.mixer.clipAction(t)}));const i={};Object.keys(e).forEach((n=>{i[n]=!1,t.add(i,n).listen().onChange((t=>{t?e[n].reset().play():e[n].stop()}))})),t.add({stopAll:()=>Object.values(e).forEach((t=>t.stop()))},"stopAll").name("Stop All")}addDisplayFolder(){const e=this.gui.addFolder("Display");e.close();const i={autoRotate:!!this.orbitControls&&this.orbitControls.autoRotate,wireframe:!1,grid:!1,skeleton:!1};this.orbitControls&&e.add(i,"autoRotate").onChange((t=>{this.orbitControls.autoRotate=t})),e.add(i,"grid").onChange((e=>{e?(this.gridHelper=new t.GridHelper(50,50),this.scene.add(this.gridHelper),this.helpers.push(this.gridHelper)):this.gridHelper&&(this.scene.remove(this.gridHelper),this.helpers=this.helpers.filter((t=>t!==this.gridHelper)))})),e.add(i,"wireframe").onChange((t=>{this.scene.traverse((e=>{if(e.isMesh){const i=e;Array.isArray(i.material)?i.material.forEach((e=>{"wireframe"in e&&(e.wireframe=t)})):"wireframe"in i.material&&(i.material.wireframe=t)}}))})),e.add(i,"skeleton").onChange((e=>{this.scene.traverse((i=>{if(i.isSkinnedMesh)if(e){const e=new t.SkeletonHelper(i);this.scene.add(e),this.helpers.push(e)}else{const e=this.helpers.find((e=>e instanceof t.SkeletonHelper&&e.root===i));e&&(this.scene.remove(e),this.helpers=this.helpers.filter((t=>t!==e)))}}))}))}addControlsFolder(){const t=this.gui.addFolder("Controls");t.close();const e={orbitControls:!!this.orbitControls,flyControls:!!this.flyControls};t.add(e,"orbitControls").listen().onChange((t=>{this.orbitControls&&(this.orbitControls.enabled=t)})),t.add(e,"flyControls").listen().onChange((t=>{this.flyControls&&(this.flyControls.enabled=t)}))}addPerformanceFolder(){this.stats=new Tr,this.stats.showPanel(0),document.body.appendChild(this.stats.dom);const t=this.gui.addFolder("Performance");t.close();const e={fps:"0",memory:"0 MB"},i=t.add(e,"fps").name("FPS").listen(),n=t.add(e,"memory").name("Memory").listen();this.memoryIntervalId=setInterval((()=>{performance.memory&&(e.memory=`${Math.round(performance.memory.usedJSHeapSize/1048576)} MB`)}),1e3),this.update=()=>{this.stats&&this.stats.update(),e.fps=this.stats?this.stats.dom.innerText.split("\n")[0]:"0",i.updateDisplay(),n.updateDisplay()}}update(){this.stats&&this.stats.update()}dispose(){this.memoryIntervalId&&(clearInterval(this.memoryIntervalId),this.memoryIntervalId=void 0),this.gui.destroy(),this.helpers.forEach((t=>this.scene.remove(t))),this.helpers=[],this.stats&&this.stats.dom.parentElement&&document.body.removeChild(this.stats.dom)}exportScene(){return{lights:this.scene.children.filter((t=>t.isLight)).map((t=>t.toJSON())),cameras:this.scene.children.filter((t=>t.isCamera)).map((t=>t.toJSON())),scene:this.scene.toJSON()}}getGUI(){return this.gui}}class Lr{config;_container;characterGroup;lightGroup;state;objectLoader=new t.ObjectLoader;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;isNotRender=!1;constructor(t){this.config=t.config,this._container=t.container,this.characterGroup=t.characterGroup,this.lightGroup=t.lightGroup,this.state=t.state}setConfig(t){this.config=t}setContainerRef(t){this._container=t}setGroups(t,e){this.characterGroup=t,this.lightGroup=e}getSnapshot(){return{container:this.container,scene:this.scene,camera:this.camera,renderer:this.renderer,controls:this.controls,width:this.width,height:this.height,isNotRender:this.isNotRender}}init(){if(this.resolveContainer(),!this.container)return;this.container.innerHTML="",this.syncContainerSize();const{scene:e,camera:i}=this.loadScene(this.config.scene);this.scene=e||new t.Scene,this.camera=this.loadCamera()||i||this.createDefaultCamera(),this.renderer=this.createRenderer(),this.setupRenderer(),this.setupGridHelper(),this.initLights(this.config.lights||[])}resolveContainer(){if(!this._container)return this.isNotRender=!0,void(this.container=null);this.isNotRender=!1,this.container="string"==typeof this._container?document.getElementById(this._container):this._container}handleResize(){this.resolveContainer(),this.container&&this.camera&&this.renderer&&(this.syncContainerSize(),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height))}createDefaultCamera(){const e="number"==typeof this.config.camera?.fov?this.config.camera.fov:45;return new t.PerspectiveCamera(e,this.width/this.height,.1,2e3)}createRenderer(){const e=new t.WebGLRenderer({antialias:!0,alpha:!0});return e.outputColorSpace=t.SRGBColorSpace,e.toneMapping=t.ACESFilmicToneMapping,e.toneMappingExposure=1,e}updateLight(){this.lightGroup.children.forEach((t=>{t.target&&(t.target.position.copy(this.characterGroup.position),t.updateMatrixWorld(!0))}))}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.scene&&(this.scene.add(this.lightGroup),t.forEach((t=>{if(t.metadata){const e=this.objectLoader.parse(t);this.lightGroup.add(e)}else this.setLight(t)})))}loadCamera(e){if(!e)return this.createDefaultCamera();if(e.metadata){const i=this.objectLoader.parse(e);return i instanceof t.PerspectiveCamera?i:void console.warn("未找到透视摄像机")}return this.camera||(this.camera=this.createDefaultCamera()),this.setCamera(this.camera,e),this.camera}loadScene(e){if(!e)return{};const i=this.objectLoader.parse(e);let n;return i.traverse((e=>{e instanceof t.PerspectiveCamera&&(n=e)})),{scene:i,camera:n}}degree2Euler(e){return e.map((e=>t.MathUtils.degToRad(e)))}dataToMatrix4(e){const i=[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]],n=new t.Matrix4;return n.set(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]),n}setLight(e){const i=t=>{this.lightGroup.add(t)};switch(e.type){case"AmbientLight":{const n=e,r=new t.AmbientLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}case"DirectionalLight":{const n=e,r=new t.DirectionalLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position);r.castShadow=n.castShadow??!1,i(r);break}case"SpotLight":{const n=e,r=new t.SpotLight(n.color,n.intensity,n.distance,n.angle,n.penumbra,n.decay);if(r.target=this.characterGroup,n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}n.up&&r.up.set(...n.up),n.shadow&&(r.castShadow=n.castShadow??!0,n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.assign(r.shadow.camera,n.shadow.camera)),i(r);break}case"PointLight":{const n=e,r=new t.PointLight(n.color,n.intensity,n.distance,n.decay);if(r.castShadow=n.castShadow??!1,n.castShadow&&(r.receiveShadow=!0),n.shadow&&(n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.keys(n.shadow.camera).forEach((t=>{r.shadow.camera[t]=n.shadow.camera[t]}))),n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale);i(r);break}case"RectAreaLight":{const n=e,r=new t.RectAreaLight(n.color,n.intensity,n.width,n.height);r.position.set(5,5,0),n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale),i(r);break}case"HemisphereLight":{const n=e,r=new t.HemisphereLight(n.color??n.skyColor,n.groundColor,n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}default:console.warn("未找到光源数据")}}setAngleView(e){var i=this;let{camera:n}=e;if(!this.camera)return;n.matrix&&function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const r=i.dataToMatrix4(e),s=new t.Vector3,o=new t.Quaternion,a=new t.Vector3;r.decompose(s,o,a),cr.to(i.camera.position,{x:s.x,y:s.y,z:s.z,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),cr.to(i.camera.quaternion,{x:o.x,y:o.y,z:o.z,w:o.w,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),cr.to(i.characterGroup.rotation,{x:0,y:0,z:0,duration:n,ease:"power2.inOut"})}(n.matrix,n.duration)}initOrbitControls(){if(this.config.orbitControls||(this.config.orbitControls={}),this.camera&&this.renderer&&!1!==this.config.orbitControls.useOrbitControl)if(this.controls=new c(this.camera,this.renderer.domElement),this.controls.enableZoom=this.config.orbitControls.enableZoom||!0,this.controls.enablePan=this.config.orbitControls.enablePan||!0,void 0!==this.config.orbitControls.minPolarAngle&&(this.controls.minPolarAngle=this.config.orbitControls.minPolarAngle),void 0!==this.config.orbitControls.maxPolarAngle&&(this.controls.maxPolarAngle=this.config.orbitControls.maxPolarAngle),void 0!==this.config.orbitControls.minAzimuthAngle&&(this.controls.minAzimuthAngle=this.config.orbitControls.minAzimuthAngle),void 0!==this.config.orbitControls.maxAzimuthAngle&&(this.controls.maxAzimuthAngle=this.config.orbitControls.maxAzimuthAngle),this.controls.minDistance=this.config.orbitControls.minDistance||1,this.controls.maxDistance=this.config.orbitControls.maxDistance||10,this.config.orbitControls.target)this.controls.target.fromArray(this.config.orbitControls.target);else{const e=(new t.Box3).setFromObject(this.characterGroup),i=new t.Vector3;e.getCenter(i),this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.controls.target.set(i.x,i.y+.5,i.z)}}setCamera(t,e){if(!t)return void console.warn("camera is null");const{position:i,rotation:n,matrix:r,fov:s}=e;if(this.state.updateCamera=!0,s&&(t.fov=s),r){const e=this.dataToMatrix4(r);t.matrixAutoUpdate=!1,t.matrix.copy(e),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.matrixAutoUpdate=!0}else i&&t.position.set(...i),n&&t.rotation.set(...this.degree2Euler(n));this.state.updateCamera=!1}syncContainerSize(){this.container&&(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight)}setupRenderer(){this.renderer&&this.container&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setClearColor(0,0),this.container.appendChild(this.renderer.domElement))}setupGridHelper(){if(!this.config.gridHelper)return;const{size:e=10,divisions:i=10,color1:n="",color2:r=""}=this.config.gridHelper,s=new t.GridHelper(e,i,n,r);this.characterGroup.add(s)}}class Rr{config;container;characterGroup;state;getAnimationFrameId;constructor(t){this.config=t.config,this.container=t.container,this.characterGroup=t.characterGroup,this.state=t.state,this.getAnimationFrameId=t.getAnimationFrameId}setConfig(t){this.config=t}setContainer(t){this.container=t}setCharacterGroup(t){this.characterGroup=t}registerListeners(){this.container&&this.config.model?.rotate&&!1===this.config.orbitControls?.useOrbitControl&&(this.container.addEventListener("mousedown",this.mousedown),this.container.addEventListener("mouseup",this.mouseup),this.container.addEventListener("mousemove",this.mousemove),this.container.addEventListener("touchstart",this.mousedown),this.container.addEventListener("touchend",this.mouseup),this.container.addEventListener("touchmove",this.mousemove))}removeEventListeners(){this.container&&(this.container.removeEventListener("mousedown",this.mousedown),this.container.removeEventListener("mouseup",this.mouseup),this.container.removeEventListener("mousemove",this.mousemove),this.container.removeEventListener("touchstart",this.mousedown),this.container.removeEventListener("touchend",this.mouseup),this.container.removeEventListener("touchmove",this.mousemove))}mousedown=t=>{this.state.isMouseDown=!0;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY),this.state.previousMousePosition={x:e,y:i}};mouseup=()=>{this.state.isMouseDown=!1,this.state.previousMousePosition={x:0,y:0}};mousemove=t=>{if(!this.state.isMouseDown||!this.getAnimationFrameId())return;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY);const n=e-this.state.previousMousePosition.x,r=i-this.state.previousMousePosition.y;this.characterGroup.rotation.y+=.01*n;const s=this.characterGroup.rotation.x+.01*r;if(r>0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.minPolarAngle&&this.config.orbitControls.minPolarAngle>=0){const t=Math.min(1*this.config.orbitControls.minPolarAngle,Math.PI);Math.PI/2-s>=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.min(s,Math.PI/2);else if(r<0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.maxPolarAngle&&this.config.orbitControls.maxPolarAngle>=0){const t=1*this.config.orbitControls.maxPolarAngle;Math.PI/2-s<=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.max(s,-Math.PI/2);this.state.previousMousePosition={x:e,y:i}}}class Or{scene=null;camera=null;renderer=null;width=1;height=1;bgScene=null;bgCamera=null;videoElement=null;videoTexture=null;videoMesh=null;setRuntimeRefs(t){let{scene:e,camera:i,renderer:n,width:r,height:s}=t;this.scene=e,this.camera=i,this.renderer=n,this.width=r,this.height=s,this.videoMesh&&this.videoTexture&&this.updateVideoMesh()}renderBackground(){this.bgScene&&this.bgCamera&&this.renderer&&(this.renderer.autoClear=!1,this.renderer.clear(),this.renderer.render(this.bgScene,this.bgCamera))}prepareFrame(){this.videoMesh&&this.updateVideoMesh()}setBackground(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!this.scene)return;(new d).load(e,(e=>{e.mapping=t.EquirectangularReflectionMapping,this.scene&&(this.scene.background=e,this.scene.environment=e)}))}setVideoBackground(e){if(!this.scene||!this.camera)return;const i=document.createElement("video");i.crossOrigin="anonymous",i.src=e,i.loop=!0,i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.play();const n=new t.VideoTexture(i);n.minFilter=t.LinearFilter,n.magFilter=t.LinearFilter;const r=new t.PlaneGeometry(1,1),s=new t.MeshBasicMaterial({map:n}),o=new t.Mesh(r,s);this.videoElement=i,this.videoTexture=n,this.videoMesh=o,this.scene.add(o),this.updateVideoMesh()}loadCubeBackground(e){if(0===e.length)return void console.warn("没有传入天空盒图片");if(1===e.length)return void this.loadSingleBackground(e[0]);if(6!==e.length)return void console.error("需要传入6张图片,顺序为:右、左、上、下、前、后");const i=(new t.CubeTextureLoader).load(e);this.scene&&(this.scene.background=i)}updateBackgroundSize(t,e){if(!(this.bgScene&&this.bgCamera&&this.renderer&&t.image))return;this.renderer.setSize(this.width,this.height);const i=t.image.width/t.image.height,n=this.width/this.height,r=e.material;if(n>i){const t=n/i;r.map?.repeat.set(1,1/t),r.map?.offset.set(0,0)}else{const t=i/n;r.map?.repeat.set(1/t,1),r.map?.offset.set((1-1/t)/2,0)}e.scale.set(1,1,1),r.map&&(r.map.needsUpdate=!0)}setBackgroundColorOrGradient(e){this.scene&&(e.startsWith("linear-gradient")?this.setGradientBackground(e):this.scene.background=new t.Color(e))}destroy(){this.videoMesh&&this.scene&&this.scene.remove(this.videoMesh),this.videoMesh?.geometry&&this.videoMesh.geometry.dispose();const t=this.videoMesh?.material;t?.dispose(),this.videoTexture?.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.videoElement=null,this.videoTexture=null,this.videoMesh=null,this.bgScene=null,this.bgCamera=null}loadSingleBackground(e){const i=new t.TextureLoader;this.bgScene=new t.Scene,this.bgCamera=new t.OrthographicCamera(-1,1,1,-1,0,1),i.load(e,(e=>{e.colorSpace=t.SRGBColorSpace;const i=new t.MeshBasicMaterial({map:e,depthTest:!1,depthWrite:!1,transparent:!1,side:t.DoubleSide}),n=new t.Mesh(new t.PlaneGeometry(2,2),i);this.bgScene.add(n),this.updateBackgroundSize(e,n)}))}setGradientBackground(e){if(!this.scene)return;const i=document.createElement("canvas");i.width=this.width,i.height=this.height;const n=i.getContext("2d");if(!n)return;const r=e.match(/linear-gradient\(([^,]+),\s*(.+)\)/);if(!r)return void console.error("渐变格式不正确");const s=r[2].split(",").map((t=>t.trim())),o=n.createLinearGradient(0,0,i.width,i.height);s.forEach(((t,e)=>{o.addColorStop(e/(s.length-1),t)})),n.fillStyle=o,n.fillRect(0,0,i.width,i.height);const a=new t.CanvasTexture(i);this.scene.background=a}updateVideoMesh(){if(!this.videoMesh||!this.camera)return;const e=2*Math.tan(t.MathUtils.degToRad(this.camera.fov/2))*10,i=e*this.camera.aspect;this.videoMesh.geometry.dispose(),this.videoMesh.geometry=new t.PlaneGeometry(i,e);const n=new t.Vector3;this.camera.getWorldDirection(n),this.videoMesh.position.copy(this.camera.position).add(n.multiplyScalar(10)),this.videoMesh.lookAt(this.camera.position)}}class Fr{action;listener={};config={};constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.action=t,this.listener={},this.config=e({timeBeforeFinished:1},i)}on(t,e){this.listener[t]=e}update(t){const{loop:e,time:i,_loopCount:n,repetitions:r}=this.action;if(2201===e&&(r===1/0||r-n!=1))return;const s=this.action.getClip().duration,o=s-this.config.timeBeforeFinished,a=this.listener.beforeFinished;a&&i>=o&&i<o+t&&(Reflect.deleteProperty(this.listener,"beforeFinished"),a(this.action));const h=this.listener.finished;h&&i>=s&&i<s+t&&(Reflect.deleteProperty(this.listener,"finished"),h(this.action))}}class Pr{config;emit;animationGroup=new t.AnimationObjectGroup;animations=[];actions=[];animationMixer=null;onAnimationFinishedBound=()=>{};actionDefaultMap=new Map;currentTalkAnimations=[];muteActionState=!1;actionNotifier=null;autoReturnToIdle=!0;constructor(t){this.config=t.config,this.emit=t.emit}setConfig(t){this.config=t}addAnimationTarget(t){this.animationGroup.add(t)}addAnimations(t){t.forEach((t=>{this.animations.push(t);const e=h(t.code);if(e){const i=this.actionDefaultMap.get(e);i?i.push(t.code):this.actionDefaultMap.set(e,[t.code])}}))}initializeMixer(){this.animationMixer&&(this.animationMixer.stopAllAction(),this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound)),this.animationMixer=new t.AnimationMixer(this.animationGroup),this.actions=this.animations.map((t=>{const e=this.animationMixer.clipAction(t.animation);return{name:t.animation.name,code:t.code,action:e,animation:t.animation,type:t.type,text:t.text}})),this.onAnimationFinishedBound=this.animationFinished.bind(this),this.animationMixer.addEventListener("finished",this.onAnimationFinishedBound)}update(t){if(!this.animationMixer)return;this.animationMixer.update(t);(this.animationMixer._actions||[]).forEach((t=>{t.enabled||t.stop()})),this.actionNotifier?.update(t)}playAction=i((()=>{var i=this;return function(n){let r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(n)){if(0===n.length)return void console.warn("playAction: empty array provided");n.some((t=>t.includes("talk")))&&(i.currentTalkAnimations=n),r=n[Math.floor(Math.random()*n.length)],i.muteActionState}else r=n,i.muteActionState;if(i.muteActionState&&"idle"!==r&&"talk"!==r)return;const o=e(s),a=l.includes(r)?i.getDefaultAniCode(r)??r:r,h=i.actions.find((t=>t.code===a));if(h)try{const{action:e}=h,s=i.actions.find((t=>t.action.isRunning()));if(s&&s.action===e)return;const a=r.includes("talk")&&void 0===o.loop;o.loop===t.LoopRepeat||a?e.loop=t.LoopRepeat:(e.loop=t.LoopOnce,e.clampWhenFinished=!0),o.repetitions?e.setLoop(o.loop,o.repetitions):a&&e.setLoop(t.LoopRepeat,Number.MAX_SAFE_INTEGER),e.timeScale=1;const l=o.fadeDuration||.5,c=i.animationMixer;i.actions.forEach((t=>{const i=t.action;i!==e&&c._isActiveAction(i)&&i.getEffectiveWeight()>.001&&i.fadeOut(l)})),e.reset().fadeIn(l).play(),i.animationMixer?.update(0),i.actionNotifier=new Fr(e),i.actionNotifier.on("beforeFinished",(s=>{h.code,i.emit("action.beforeFinished",n),r.includes("talk")||i.autoReturnToIdle&&e.loop===t.LoopOnce&&!r.includes("idle")&&setTimeout((()=>{i.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER})}),100)}))}catch(t){console.error("Error playing action:",t)}else console.warn(`Action not found: ${a}`)}})(),50,{leading:!0});stopAllActionExcludeIdle(){}stopAllAction(){this.actions.forEach((t=>{t.action.stop(),t.action.reset()}))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.playAction("idle"),this.muteActionState=t}setAutoReturnToIdle(t){this.autoReturnToIdle=t}getModelInfo(t){const e=[],i=t=>{t.children.forEach((t=>{t.isGroup?i(t):e.push(t)}))};return i(t),{actor:t,scenes:e,animations:this.animations.map((t=>t.animation)),mixer:this.animationMixer,actions:this.actions}}getAnimations(){return this.animations}getMixer(){return this.animationMixer}destroy(){this.stopAllAction(),this.animationMixer&&(this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound),this.animationMixer=null),this.animations=[],this.actions=[],this.actionDefaultMap.clear(),this.currentTalkAnimations=[],this.actionNotifier=null,this.muteActionState=!1,this.animationGroup=new t.AnimationObjectGroup}getDefaultAniCode(t){const e=this.actionDefaultMap.get(t)||[];return 0===e.length?null:1===e.length?e[0]:e[Math.floor(Math.random()*e.length)]}animationFinished(t){const{action:e,type:i}=t;if(e._clip.name,"finished"===i&&e._clip?.name){const t=this.actions.find((t=>t.action===e))?.code??e._clip.name;this.emit("action.finished",t);if(e._clip.name.indexOf("idle")>=0)return void(this.autoReturnToIdle&&this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER}));if(e._clip.name.indexOf("talk")>=0)return;this.autoReturnToIdle&&this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER})}else;}}class Br{getBody;serverShapes=[];isPlayingServerShapes=!1;mouthBlendWeight=0;constructor(t){this.getBody=t.getBody}playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.serverShapes=t,this.isPlayingServerShapes?this.mouthBlendWeight=1:(this.isPlayingServerShapes=!0,cr.to(this,{mouthBlendWeight:1,duration:.15,ease:"power2.out"}))}stopServerShapes(){this.isPlayingServerShapes&&cr.to(this,{mouthBlendWeight:0,duration:.3,ease:"power2.inOut",onComplete:()=>{this.isPlayingServerShapes=!1,this.serverShapes=[]}})}applyBlendShapes(){if(!this.isPlayingServerShapes||0===this.serverShapes.length)return;const t=this.getBody();Object.entries(t).forEach((t=>{let[,e]=t;if(!e.mesh||!e.mesh.morphTargetInfluences||!e.mesh.morphTargetDictionary)return;const i=e.mesh.morphTargetDictionary,{prefix:n="",suffix:r=""}=e;for(const[t,s]of Object.entries(i)){const i=t.replace(n,"").replace(r,"");if(i.includes("eyeBlink")||i.includes("eyeWide")||i.includes("eyeSquint"))continue;const o=e.mesh.morphTargetInfluences[s],a=this.getShapeIndex(i);if(a>=0&&a<this.serverShapes.length){const t=this.serverShapes[a];e.mesh.morphTargetInfluences[s]=o*(1-this.mouthBlendWeight)+t*this.mouthBlendWeight}}}))}destroy(){cr.killTweensOf(this),this.serverShapes=[],this.isPlayingServerShapes=!1,this.mouthBlendWeight=0}getShapeIndex(t){return["eyeBlinkLeft","eyeLookDownLeft","eyeLookInLeft","eyeLookOutLeft","eyeLookUpLeft","eyeSquintLeft","eyeWideLeft","eyeBlinkRight","eyeLookDownRight","eyeLookInRight","eyeLookOutRight","eyeLookUpRight","eyeSquintRight","eyeWideRight","jawForward","jawLeft","jawRight","jawOpen","mouthClose","mouthFunnel","mouthPucker","mouthLeft","mouthRight","mouthSmileLeft","mouthSmileRight","mouthFrownLeft","mouthFrownRight","mouthDimpleLeft","mouthDimpleRight","mouthStretchLeft","mouthStretchRight","mouthRollLower","mouthRollUpper","mouthShrugLower","mouthShrugUpper","mouthPressLeft","mouthPressRight","mouthLowerDownLeft","mouthLowerDownRight","mouthUpperUpLeft","mouthUpperUpRight","browDownLeft","browDownRight","browInnerUp","browOuterUpLeft","browOuterUpRight","cheekPuff","cheekSquintLeft","cheekSquintRight","noseSneerLeft","noseSneerRight","tongueOut"].indexOf(t)}}class Dr{config;animationManager;getScene;getCharacterGroup;getBody;setBody;loader;ktx2Loader;model=new Map;constructor(t){this.config=t.config,this.animationManager=t.animationManager,this.getScene=t.getScene,this.getCharacterGroup=t.getCharacterGroup,this.getBody=t.getBody,this.setBody=t.setBody,this.ktx2Loader=this.createKTX2Loader(),this.loader=this.createGLTFLoader()}setConfig(t){this.config=t}detectTextureSupport(t){this.ktx2Loader.detectSupport(t)}getModelMap(){return this.model}changeBundle(t){this.loader.parse(t.buffer,"",(t=>{this.getScene()?.add(t.scene)}),(t=>{console.error("error loading GLB model:",t)}))}loadBundles(t,e){const i=[],n={};return t.forEach((r=>{n[r.bundle]={url:r.bundle,progress:0,total:0},i.push(new Promise(((i,s)=>{this.loader.parse(r.buffer,"",(s=>{i({...r,gltf:s}),function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[i]={url:i,progress:r,total:s};let o=0,a=0;t.forEach((t=>{let{bundle:e}=t;o+=n[e].total,a+=n[e].progress}));const h=Math.floor(a/o*100);e(h)}(r.bundle,1,1)}),(t=>{console.error("error loading GLB model:",t),s("Error loading GLB model")}))})))})),Promise.all(i).then((t=>(t.forEach((t=>this.mountRecord(t))),this.animationManager.initializeMixer(),t)))}loadGLBModel(t){(new u).load(t,(t=>{this.getScene()?.add(t.scene)}))}loadLowResTexture(e){const i=new t.TextureLoader;return new Promise((n=>{i.load(e,(e=>{e.minFilter=t.LinearFilter,e.generateMipmaps=!1,n(e)}))}))}addModel(t,e){const i=new u,n=new g;this.config.dracoPath,n.setDecoderPath(`${this.config.dracoPath}`),n.setDecoderConfig({type:"js"}),i.setDRACOLoader(n),i.load(e,(e=>{const i=e.scene;i.name=t,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1);const n=this.getScene();n&&(n.traverse((t=>{t.isMesh&&t.name})),n.children[1]?.children[1]?.children[0]?.add(i.children[0]))}),void 0,(t=>{console.error("An error occurred while loading the model:",t)}))}destroyModel(t,e){const i=this.getScene();if(!i)return void console.error("Scene is not initialized.");const n=[];i.traverse((t=>{if(t.isMesh){-1!==t.name.toLowerCase().indexOf("cloth")&&(t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach((t=>{t&&t.isMaterial&&e(t)})):t.material&&t.material.isMaterial&&e(t.material),t.parent&&n.push(t))}})),n.forEach((t=>{t.parent?.remove(t)}));const r=t.indexOf("apose_cloth");-1!==r&&t.substring(r)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return new Promise(((i,n)=>{this.loader.load(t,(t=>i(t)),e,(t=>{console.error("Error loading GLB model:",t),n(t)}))}))}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.loadGlb(t,e).then((t=>(this.getScene()?.add(t.scene),t)))}destroy(){this.model.clear(),this.loader=null,this.ktx2Loader&&(this.ktx2Loader.dispose(),this.ktx2Loader=null)}createGLTFLoader(){const t=new u,e=new g;return e.setDecoderPath(this.config.dracoPath||"draco/"),t.setKTX2Loader(this.ktx2Loader),t.setMeshoptDecoder(m),t.setDRACOLoader(e),t}createKTX2Loader(){const t=new p;return t.setTranscoderPath("three/examples/jsm/libs/basis/"),t}cloneTrack(e,i){return new t.NumberKeyframeTrack(i,e.times.slice(),e.values.slice())}mountRecord(t){let{code:e,gltf:i,name:n,type:r}=t;if(!i)return;const s=i.scene;s.name=e,"apose"===r?this.mountAposeScene(s):"animation"!==r&&"animation_system"!==r||this.registerAnimationClips({code:e,name:n,type:r,gltf:i}),this.model.set(e,i),this.bindBodyMeshes(e,s)}mountAposeScene(e){this.getCharacterGroup()?.add(e),this.animationManager.addAnimationTarget(e),e.traverse((e=>{e.isMesh&&(e.material.side=t.DoubleSide)}))}registerAnimationClips(t){let{code:e,name:i,type:n,gltf:r}=t;r.animations.forEach((t=>{const e=t.tracks.findIndex((t=>"BS_Mod.morphTargetInfluences"===t.name));if(e>=0){const i=t.tracks[e],n=this.config.model?.body.options.find((t=>t.key.startsWith("Head_Mod"))),r=this.config.model?.body.options.find((t=>t.key.startsWith("Eyelashes_Mod")));if(n&&r){const s=this.cloneTrack(i,`${n.key}.morphTargetInfluences`),o=this.cloneTrack(i,`${r.key}.morphTargetInfluences`);t.tracks.splice(e,1),t.tracks.push(s,o)}}}));const s=r.animations.map((t=>({code:e,animation:t,type:n,text:i})));this.animationManager.addAnimations(s)}bindBodyMeshes(t,e){if(t!==this.config.model?.body.name&&!t.includes("_mesh_body"))return;const i={...this.getBody()};this.config.model?.body.options.forEach((t=>{i[t.key]={...t,mesh:e.getObjectByName(t.name)}})),this.setBody(i)}}class zr{cleanMaterial(t){const e=t=>{["map","lightMap","bumpMap","normalMap","specularMap","envMap","aoMap","emissiveMap","metalnessMap","roughnessMap","alphaMap","displacementMap"].forEach((e=>{t[e]&&t[e].dispose()})),t.dispose()};Array.isArray(t)?t.forEach((t=>e(t))):e(t)}cleanupScene(t){t&&t.traverse((t=>{t.isMesh&&(t.geometry?.dispose(),t.material&&this.cleanMaterial(t.material))}))}}class Gr extends n{animationFrameId=0;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;depth=10;config;isNotRender=!1;clock=null;body={};characterGroup=new t.Group;lightGroup=new t.Group;state={};onWindowResizeBound=null;rotationCenter=new t.Vector3(0,0,0);_container="";gui=null;humanObj;sceneManager;interactionManager;backgroundManager;animationManager;blendShapeManager;modelRuntime;resourceCleaner;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;super(),this.humanObj=n,this.config=i,this._container=e,this.sceneManager=new Lr({config:this.config,container:this._container,characterGroup:this.characterGroup,lightGroup:this.lightGroup,state:this.state}),this.interactionManager=new Rr({config:this.config,container:this.container,characterGroup:this.characterGroup,state:this.state,getAnimationFrameId:()=>this.animationFrameId}),this.backgroundManager=new Or,this.animationManager=new Pr({config:this.config,emit:(t,e)=>this.emit(t,e)}),this.blendShapeManager=new Br({getBody:()=>this.body}),this.modelRuntime=new Dr({config:this.config,animationManager:this.animationManager,getScene:()=>this.scene,getCharacterGroup:()=>this.characterGroup,getBody:()=>this.body,setBody:t=>{this.body=t}}),this.resourceCleaner=new zr,this.setContainer(),this.isNotRender||this.init(),this.config.debug&&(window.THREE=t)}syncSceneRuntime(){const t=this.sceneManager.getSnapshot();this.container=t.container,this.scene=t.scene,this.camera=t.camera,this.renderer=t.renderer,this.controls=t.controls,this.width=t.width,this.height=t.height,this.isNotRender=t.isNotRender,this.interactionManager.setContainer(this.container),this.interactionManager.setCharacterGroup(this.characterGroup),this.backgroundManager.setRuntimeRefs({scene:this.scene,camera:this.camera,renderer:this.renderer,width:this.width,height:this.height})}init(){this.sceneManager.setConfig(this.config),this.sceneManager.setContainerRef(this._container),this.sceneManager.setGroups(this.characterGroup,this.lightGroup),this.interactionManager.setConfig(this.config),this.interactionManager.setCharacterGroup(this.characterGroup),this.animationManager.setConfig(this.config),this.modelRuntime.setConfig(this.config),this.sceneManager.init(),this.syncSceneRuntime(),this.renderer&&(this.clock=new t.Clock,this.modelRuntime.detectTextureSupport(this.renderer),this.onWindowResizeBound=this.onWindowResize.bind(this),window.addEventListener("resize",this.onWindowResizeBound,!1))}createDefaultCamera(){return this.sceneManager.createDefaultCamera()}createRenderer(){return this.sceneManager.createRenderer()}setContainer(){this.sceneManager.setContainerRef(this._container),this.sceneManager.resolveContainer(),this.syncSceneRuntime()}updateLight(){this.sceneManager.updateLight()}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.sceneManager.initLights(t),this.syncSceneRuntime()}loadCamera(t){const e=this.sceneManager.loadCamera(t);return this.syncSceneRuntime(),e}loadScene(t){return this.sceneManager.loadScene(t)}degree2Euler(t){return this.sceneManager.degree2Euler(t)}dataToMatrix4(t){return this.sceneManager.dataToMatrix4(t)}setLight(t){this.sceneManager.setLight(t)}setAngleView(t){let{camera:e}=t;this.sceneManager.setAngleView({camera:e})}async gsapContainer(t){return new Promise((e=>this.container?t.attr?(cancelAnimationFrame(this.animationFrameId),this.container.offsetWidth,this.container.offsetHeight,void cr.to(this.container,{duration:1,ease:"power2.inOut",...t.attr,onUpdate:()=>{const t=cr.getProperty(this.container,"width"),e=cr.getProperty(this.container,"height");this.width=parseFloat(`${t}`),this.height=parseFloat(`${e}`),this.renderer?.setSize(this.width,this.height),this.renderer?.render(this.scene,this.camera)},onComplete:()=>{this.onWindowResize(),this.animate(),e(!0)}})):void e(!1):(console.warn("container is null"),e(!1))))}initOrbitControls(){this.sceneManager.initOrbitControls(),this.syncSceneRuntime()}setBackground(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.backgroundManager.setBackground(t)}loadGLBModel(t){this.modelRuntime.loadGLBModel(t)}loadLowResTexture(t){return this.modelRuntime.loadLowResTexture(t)}changeBundle(t){this.modelRuntime.changeBundle(t)}loadBundles(e,i){return this.modelRuntime.loadBundles(e,i).then((e=>{if(!this.isNotRender){const{scale:e,position:i,rotation:n}=this.config.model||{};e&&this.characterGroup.scale.set(...e),i&&this.characterGroup.position.set(...i),n&&this.characterGroup.rotation.set(t.MathUtils.degToRad(n[0]),t.MathUtils.degToRad(n[1]),t.MathUtils.degToRad(n[2])),this.initOrbitControls(),this.loadCamera(this.config.camera),this.onWindowResize(),this.interactionManager.registerListeners()}this.emit("core.bundles.loaded",e)})).then((()=>{const t=this.animationManager.getMixer();return this.config.debug&&t&&(this.gui=new kr(this.scene,t,this.animationManager.getAnimations().map((t=>t.animation)))),!0})).catch((t=>(console.error("Error loading models:",t),!1)))}onWindowResize=i((()=>{this.sceneManager.handleResize(),this.syncSceneRuntime()}),300,{leading:!0});setCamera(t,e){this.sceneManager.setCamera(t,e)}animate(){if(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),!(this.clock&&this.renderer&&this.scene&&this.camera))return;const t=this.clock.getDelta();this.animationManager.update(t),this.blendShapeManager.applyBlendShapes(),this.controls?.update(),this.backgroundManager.prepareFrame(),this.backgroundManager.renderBackground(),this.renderer.render(this.scene,this.camera)}startRender(){this.characterGroup&&this.scene&&!this.animationFrameId&&(this.animationManager.getMixer()&&this.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER}),this.scene.remove(this.characterGroup),this.scene.add(this.characterGroup),this.animate())}stopRender(){this.animationFrameId&&this.characterGroup&&this.scene&&(this.scene.remove(this.characterGroup),this.animationManager.stopAllAction(),setTimeout((()=>{cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0}),100))}gsapMorph(t,e,i){const n={duration:.3,ease:"easy",onComplete:()=>{}};e.forEach(((t,e)=>{n[e]=t})),cr.to(t,n)}playAction=(()=>{var t=this;return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.animationManager.playAction(e,i)}})();setAutoReturnToIdle=t=>{this.animationManager.setAutoReturnToIdle(t)};stopAllActionExcludeIdle(){this.animationManager.stopAllActionExcludeIdle()}stopAllAction(){this.animationManager.stopAllAction()}cleanMaterial(t){this.resourceCleaner.cleanMaterial(t)}destroy(){this.isNotRender||(this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this.animationManager.destroy(),this.interactionManager.removeEventListeners(),this.onWindowResizeBound&&(window.removeEventListener("resize",this.onWindowResizeBound,!1),this.onWindowResizeBound=null),this.backgroundManager.destroy(),this.blendShapeManager.destroy(),this.modelRuntime.destroy(),this.controls&&(this.controls.dispose(),this.controls=null),this.resourceCleaner.cleanupScene(this.scene),this.gui?.dispose(),this.gui=null,this.renderer?.dispose(),this.renderer?.domElement?.parentNode&&this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.clearReferences())}clearReferences(){this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.body={},this.characterGroup=new t.Group,this.lightGroup=new t.Group,this.interactionManager.setCharacterGroup(this.characterGroup),this.sceneManager.setGroups(this.characterGroup,this.lightGroup)}async playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.blendShapeManager.playByShapes(t,e)}stopServerShapes(){this.blendShapeManager.stopServerShapes()}addModel(t,e){this.modelRuntime.addModel(t,e)}destoryModel(t){this.modelRuntime.destroyModel(t,(t=>this.cleanMaterial(t)))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.animationManager.muteAction(t)}getModelInfo(){return this.animationManager.getModelInfo(this.characterGroup)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.loadGlb(t,e)}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.addGlb(t,e)}setCharacterCenter(){if(!this.characterGroup)return;const e=this.characterGroup.children.find((t=>t.name.includes("body")));if(!e)return;const i=(new t.Box3).setFromObject(e).getCenter(new t.Vector3);this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.characterGroup.position.add(i)}setVideoBackground(t){this.backgroundManager.setVideoBackground(t)}loadCubeBackground(t){this.backgroundManager.loadCubeBackground(t)}updateBackgroundSize(t,e){this.backgroundManager.updateBackgroundSize(t,e)}setBackgroundColorOrGradient(t){this.backgroundManager.setBackgroundColorOrGradient(t)}}class Ir{hm;animationFrameId=0;container;scene;width;height;depth=1e3;zAxisNumber;camera;renderer;sphere;parameters=[];materials=[];particles_init_postion;zprogress;zprogress_second;particles_first=[];particles_second=[];constructor(e,i){this.hm=i,this.container="string"==typeof e?document.getElementById(e):e,this.width=this.container.clientWidth,this.height=this.container.clientHeight,this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4);const n=this.height/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.max(n-this.depth/2,this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0),this.initLight(),this.particles_init_postion=-this.zAxisNumber-this.depth/2,this.zprogress=this.particles_init_postion,this.zprogress_second=2*this.particles_init_postion,this.particles_first=this.initSceneStar(this.particles_init_postion),this.particles_second=this.initSceneStar(this.zprogress_second),this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement),this.initOrbitControls(),this.animate(),this.hm.on(r.HUMAN_LOAD_PROGRESS,this.onProgress),this.initProgressBar()}initProgressBar(){const t=document.createElement("div");t.id="loadingContainer",t.className="loading-container w-full h-full bg-[#000]",t.style.width="100%",t.style.height="100%";const e=document.createElement("div");e.className="bottom-20 flex justify-center left-0 absolute w-full items-center flex-col",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column",e.style.position="absolute",e.style.left="0px",e.style.bottom="5rem",e.style.width="100%";const i=document.createElement("div");i.className="qt-progress-wrap w-3/4 h-[0.375rem] bg-[rgba(255,249,249,0.2)] rounded-1 overflow-hidden",i.style.backgroundColor="rgba(255,249,249,0.2)",i.style.height="0.375rem",i.style.width="75%",i.style.overflow="hidden",i.style.borderRadius=".25rem";const n=document.createElement("div");n.className="qt-progress w-[10%] h-[0.375rem] bg-white rounded-1",n.id="qtprogress",n.style.backgroundColor="rgb(255,255,255,1)",n.style.height="0.375rem",n.style.width="0",n.style.transition="width linear 0.3s",n.style.borderRadius=".25rem",i.appendChild(n),e.appendChild(i),t.appendChild(e);const r=document.createElement("div");r.className="text-white mt-4 text-sm",r.textContent="正在加载...",r.id="qtprogresstext",r.style.color="rgb(255,255,255,1)",r.style.fontSize="0.875rem",r.style.lineHeight="1.25rem",r.style.marginTop="1rem",e.appendChild(r),this.container.appendChild(t)}initScene(){this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4)}initCamera(){const e=this.width/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.floor(e-this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0)}initRenderer(){this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement)}initOrbitControls(){const t=new f(this.camera,this.renderer.domElement);t.enabled=!1,t.update()}animate(){this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),this.renderStarMove(),this.renderer.render(this.scene,this.camera)}initLight(){const e=new t.AmbientLight(16777215);this.scene.add(e);const i=new t.PointLight(415229,5,0);i.position.set(50,50,50),this.scene.add(i)}renderSphereRotate(){this.sphere.rotateY(.01)}initSceneStar(e){const i=new t.BufferGeometry,n=[],r=new t.TextureLoader,o=r.load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAABNCAYAAAAIPlKzAAAAAXNSR0IArs4c6QAAEtNJREFUeAHtmvmPXEcRx3vem3Nn12s7NjkwECvhDJcwiFP8gIRAiF/5KyOEEAghIkSiCCEkwpGEBJENiUXAwXHiPTw7x7v4fOtNjd+OZ+2dY9fzQ9ru7e7qq+rbVdXHmxDWNBRFUSNGa8peWFvGACze2QmNdQVubflC21rE7royWF9Xxm7cCHGn86HGzb0+aNvWwUHxkbk7nlGHtfVxu7shjuP11bi1BQ7Q4lotrK0rWVvgAC2ujULzjCxv7mnWd0UjgAsfmurcKzoYhDhZY1NdW43b2AgRfs5cCTtsjVDMjf4pdniowAmQWbIJJDQuiqK7pnq/trPGOG3aQ9kcBMJxQLjAbA7iLfbycemDxjmu37L0MwfupIK2Ae6kx5GTLMSyQE33PzNTvQ9gs8y1CCVwrnG+wFU/V82bXD7HWfjDUwfOhZlaMQfL06nqAG4hgrl4qr+3F2gC08Hz1MbxPqcJoK/kPYwvSxDzLkBlLAmuOZU6CKr2suoi61dqnJ6VvE+1XzXv9dXxNGaYMb/RV/HnVDRuBsMulKfi3fMCwYPTatTGWc1uDqJ5m6pmTee9r8aa1ImX09A8Z8gZXzodg1Yd1wVS6lH1ivJhonl5nL4U99PQYHNA43a0uGrn7afaTsb0sWk6oSl/KponJlYWpjSt+3wpsFbfhaqC5HkHxQGifC1uNu2CD3BPO2Bq53EaPJV9PJ8LktGUGnhT/Bl90T8rM9UqU5hGdvNmEb62ES6FbrglvokuUDU9IjBPSaoLSRLC5mZo5LkdgOt7e6FeFKE4f97G0ViK+Tj1stM0pvIKSjWml0VbSdAkKw+AGF2+HHoaeH8/PEniWqX5FFXWotUByzTt4CDUuWJZbDRCXWZKbAk0p6uN+og27n+cBvri0MxCHN4JbeWqC1xWLfZ3JcBNMWNaAztRt/v8LYSP79wJn3r7bVt5F9RSQNVjZZ36hq5X5JuK9XpoZpkJ2ibfGtOtTa9n7eoCcQygj+mL4qA5Hx36PLJzZSf3TWKK34WQ88EX6qxOU0w406rysRv9fvgSZtfvdsMb0HXEiBBcD5W6jyqNO+RFH5K28pAcpuFaLQpP1ZLw03aHOkx1gHlisorZOFqZsfPt7ZDRX9FNNmVBLjbysN06F/4Dne4WJmbrQI7pcyVS+YXDA0ATcAIj56PLP4a98HVWvjYahbcwRWmXAQZo9dowxEMATEYhbrZCbYip8kW1A/SdrB46d5IQ8aKZ8z5isdUMKShkAJYKQMbI0d7auXO2WAaeXATaeq61Gf4JDwJN/ExAI2+Lvih4SwGnySvBNUypgzY2n/8lefToq1EevttqhRiB/y3T5D5aH47wZYCot7eoE+IUsEf9kANum3YdTHZDmpnWQwbo+UY9pKME0AEMNDksl+CJD0y3QPNQ1/AZduV2ux3+BlmgiQ+B5jweARD63GFh4GZoW3VyB88A3N19VH6ohwa8HNXCdwBNgtxCk9qYo53X8qzcQQUS7Rg+bJLfQDO3aFuTOZJPstiASuqYM/+iNuANAI/3u/zwVuig2Z9P0pBuboc/0Y/92TYiAeW7sHiaACc5FtG6hYFjcg8OksqeN8Aom8ZVzPJ9QPt7loTvFVl4EdB6ACKNakJvksr/aRfN0bQtJN0s8nCesoL82gh6ojQlQh/iAyP22AJtvIDGXkNjbwHaX2gvcNRTgClWARNfoi0cFgJuStt88ipono/eeSfEnL+0CdQNnGG4EcXhLaT6IQA8j0kWY/BapC0GaxRIT/02UncB9wIFcA4p/YcCjah0AIh4xpBHSXgcX/gVGr3Vi8Nf84MQMVYds2UkA9D5qYLnfC+ULgTc1ExixoMzaJoGMYJ5B62BdjTxZ81RFnaatfBR8j8CjN8DQpPYxW91+ELTRBWwnnAe2hbQXEI3inqpbUPejPvQ+/STNhWkT0D7UpaGP7OD/n2LjWesSunt2yG6cGGibc6bNFFxAuIi5roK4ODhHhOtiWlMKRrg+Lf0qU+7JzGNQisCoDwKryL0lTQNP6D/XwBtE2m6SWHntgifd4H2W5iqvuZnaJ5pGQwfZqVf5BAYnkLLPskCvEDbHdJWGMJMk92XnRbQfAEFlIKDV5ZKAD0/V7oscL5qzpCn0jK94EabRNJ6GIV6gsBsDvJnHWgbtTy8zNr/GHG+ixb9C805R32bvEC+wGDnkOYj1Kdpjj+rhR7ANnGEUV6EZ6i7TJ/n0LZ3AVHj9YFKoOmIknFWjLaksyVAAk9HFef5iNZBnyvMDdwM/yZGqsHAw0RrHECj2kaI25zT7uD40SKZZAvgBI52zQ4AvIo2fR+D2kbCD9CwTURtMMh5JAN307gEE+5T5pQXmoD3RS0AWvocffcZr4u/KzDeFJNOOUzHh6WW+6ZgPMGkUgWlAm4S5jXXuYGbzFRmqoxMmOP+aWZqWsf30WGCBrE5AJR2ziaOuy2tg3XtnE005c04Ct8A2PepHyIRRzzTtg2muUR+BO1QQAPWM/QZAfiLaF7G7roFXVqGkYb6CO0u0O5aI6SAF+X7IeJg7ABW2Re/R8CrVj4ovyxwGl8MeFBejt2jzHRyQ0ArdGPQztmOOYZgN10APAcYMZr2LiN9mrpdtJH/AIKG0V+bxIhUICq/R/518iiXgaa6AbHF+CPGGzGO5oz4cV0t15PoXR6Vr4KlskKVVlIe8Ff2f+IwZaY+qfo7c5bCdE2rvSGmhyHiVmCC6NUDbdOBt4lAbfyTwOjCtXyZwL6DJj3BIPJves3gx4V2AL5A+gn0JmPE92gvH7mpMVgAHWOkybb5kNpcdI66Y9DGz1VHeBzzTDI/aOo0F3DqcNIw/inlhFl2Tx0fNF8dYcevuwaMAOoAhg67WgKd9s8T2+TrDLBBKn+XArQ0S6B1qG+hqebzGFmWY+Pzlqc5bN7DcjGUX3mYAq78wCLNqkR9PLHI7MbUs89aOmFwmitdtnkRiQasPiKYudJGGuGA6ZFS2iRTbCGZzLdJW+VRPdOCFn8b0i5IdpFXPX3a0EvQuG0AdsvOh+XYpnW083mNRw7gNizjWHjttUlZdAFu9S7nOK1icM+HJydoxXTdafGCofevNiun3a9Vy/AdpVPXBHW2uwbT1LVDss51zIdro4FiwiOYxpHptKhrk2oHlfa0AUGH3A2ZKGkXWpf6DQOHC736sSSaJxZopBJIRwhF3QJGivTpA3yftEffHo16bD69PIUWh0PAHLLr9qWhnPNwFnYGlCar7xD5RtxObEw2l7RJWVc4+LTXFu7KI8YfKvJYYHleeLT5aH6leB+CtEspQek9kWtTdEW1/LlxI9Qef1yFUvt00AVguyEAulY8ptzg7thsC3iOHhkbwShnI2jgy4qwDWgXUYVHmPUS5cvM+AjCXqTfJszLNDegazEj8gkgDKjnLs+rco3NoeDYUoT3qX+PqMfS91m8XdI96HcYp8dq9tmeh/hVAZAguIBLeW7KKesdr2AzyS/pXgIEyBWQq0DWcOUKtB2oT5d15BSYvow440LMySuLqOBpWXrAXwHO6VxAyyR48S21Rc/hrFqzGfcbw1Gnzd10MBZAK5rXgYOJYjaCJh1lenolkRlyE+O2oHe3mh1BpH0F2i03r9XuU38I4HfI7zPGHv13od2m/W0A0ZnugLepQ+brc7UbsoAJh2ADjT7Z+GhiYGnsiuwUTx4k8FxBYI2jgUVnpQJP0WgwPx5X1md6rToFLQx42UsHlwFeOlB/gNDhVnmd62SS+4AnoBJ6HBhsFAh9OuM6MZfStBKubyk2NwECFyOQjR/ANN50rqTvzIgs9gFcMtkMJ/wzFvCErY82Q857gmjwYAAVh+NUGkTUs5BeOEZZCcoQtesj4oH68O8xyrukNxBYtAF5gXdA+SapfKg2jgPGkdYdAtoA0HSH1VOTtDlF0zNMVEDaszqpvo5NgFV5HEkWD2aqi3c3JtTdV2sCHEIIwLxohayRcNcsBbO3NMCT0+5zjdpHg+QxrzLSdcy1z0puktcxA4zsSrZHKod8G5qOKf8m3eO2oQ3hEEQGgDgEmhGgpZhr1mSRUGEDS3zQpxopWphF87oHpssCdwSw8Wz2/ZMLtoOY80qbcY7L8KgJgGn3krAHdL4KUJ/EiP4KrU9/AcM+wqZSHhM0hu6v0jztoNug+QRt32TD2JPWEfs4ygH+TOOWmsd89DGNg6YxVh7mBk7OtOIPxJSDJ+ZUtohDzrnkm4lCSXkkk4PWhqCPy/pm8AUAe5rOL3CMGKA95zHhDEB0IG5Q36BdRPl/zGCHX8a5Du2j1H+K/Ns8Te3LXPFr/sCpeVLmsE1IoPHYwDrosnFZfCl4WpbGf+fdJOYG7shsRwsGGCSlMpMaX+MzjigRZpPJiSOInrtjtO4bgPEEDX+FkAkmto3p5XzZGtBGwPHzLs56PAxQL/+WMqrOYD0AfYe6z+LbnmHMX5PvEYeMkdR5Vs/5AkZb1zbxQbystMqf8gqelqU5/i4LnCaWxjkDShUNONXJ5yBwWnAvwKR0vvs6x5Muwv6clnrB3dL2yt1qBCg6buj1JKLNNqC18YM3aSfTSzBLXbl6xN/R7qtM9Axtf8di6EA84rCa9KVx48+GHD10yJ3mDZIFp3t5rnRZ4DSZGBB4Cso7aJYHIH14kaZ18HPfBigdN35JXgdnXfKxkpAm5UOlgNH9FH/AO1wRzgHeLUxa2pgAw4gXZHvQZMzn0LJvMcan0bQ/sCFI08zHAZy+uYqPahQ/1UixDPOaqXotBNwxfk5MKQhEBy+w6iN+QX4RIL7JafYGALzG3bLBRqF7agAAaWRCtKsUZX3lKrht7OHftjFX3RA0dgq3OtdpE7DDMG1/A/3bHACf5Fn4FbZY3QrMv+HbpG3iowqW8wjZ6EoXCgsBp5nuA56Y1fnQV/sSgn6V8g4m+S8qGly9ivqIU3upSQYcIAg4u7IhfIGJ7qFtPUz0tqZjDJ0DTaPkz7hijPCVu/ze9bfsOl/jzHgTLX6btlqsKmhV8FStUAWwpMz5d2HgpuZxRqomm/FC8hggfBZBX+EL/rscUXStMgAMVgTg0UAXqlSmiOACTl/nM0zwDhf2HrR95tK307zAWBkr5R6aFrzw8o9PtPa7kJSN4vP0u42m+c/KfOGqGjfFdqkA9xBPQFgVcNWpxHA4PAyPoUUfw+wE2u0PPrBfIpmzRsCCny9MPqrwTp7y3B0X7Lh0Ne1CGw8xV30G1GagF+Kc2hzQMjaBlBt/xoaTis481wE0cD/VB5w/aHqiwqlomwaWSS0cppyqVtZA4/x2CU07z/nq1ddfNw2oXbxovyhKOd/ZrscrhVJ7smEnHLYaYYDwfUAYNLhVMNJAH2hw/BZFUz2aNlB79aVtQppgmsXGxntvsCDX8aefgw/J5TtqVeMcSJN5in+jnfTP0ho35esCz0xbaFid33K8CRMpgEmLDFBSCVRIUGkdQuuR0zRPT+3U1dCmGprGb2zsU98gAyjTOF2h8H3qR5yc0xhDYxMvF7zO7LBoVznyPNl8hV8pXbM6qi24O/HyUqn7pKUGqdwk9Pio6L9F8/ENFOieiq58xC+MBB74lyk0/Yw1RXO+jNhPJVn4mYCDbKB5CvhjwCapa3yBNn8csx3wBvdf2msu1zqyZVhG2zTC0hqnQSpal5LnuMBRtWRY1QoSUkApVXBh9IPAKpiiK6SYecLuO0wGIZGZQ3Php9OpupeKN964dv1zV8OjLN8WvzzR5nIkLAuaBhPTKwljZsDMQNOYLqDnq0cE1UlgRdGno56HRuyUo+GQvVNnuDL6GN53RnqtuHYtZH98ObzLK2f00kvaqbmTEJR6XuVlgq/wMmMc6VsBzunVOZSvRrWplr1twq78BfzXVcz2F7SRZZjw6kDwRZlOy9q79SrLzDkrluB5g2XTlWmcMzJjVV04b6LyDE2pat2zORqXcBTRDcG1saqd0/01poLP5WXRVg6aBl2Jj9NACwQJJw1zYT0P6ScGUlxerby+Cobnvc6nd7qXTy1ducY5p8donmuKC1xNVWdlMyvedHFs8m2ied2s/g642h0JM3g4Ur9M4dQ1TszP8HvTQrpvm9DJ5Ghcqu8uOrohpNc5UJK7Sp/gYMBPSqeTOXXgxLYLch8AHZS7UnIlw8PpHgtuRwC6t+24l89zd5DTy52aqc5iWYLNIVzOBV4bg8KxYJXVdxfHy6ednonGTQtRBW+GFlpzXlZyvehO962Wq+NU6WeRfyjAVQU7Tnjuu3p+Mo07rk11nLPOn6mpzilc+YVszk5n1XxtgdMLCBd1HUfWMqwtcPomO76nfgjcPAjwJKSHzvtuDvOMt+q2a6txeqB80K66ajDmGW9tgdvmhzo8jeuSv5ZhbYG7wRctnpQ+BG5eteE3JzrDra2Pm1eeM2vPjYJfNfEBcE3DQ7853AcXf0K6T5OHV/V/t6EEcHbXxXIAAAAASUVORK5CYII="),a=r.load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAU9JREFUOBGlk0tLQzEQRm/qFav4AKUrQXEpgv//j4jLYtWVWJ/46K2N54RMudSdHTh0msw3mWTmpmbFcs4DlhL4K9qiklNK+kszsBhC/Q3YhCFsVZ+fpoNv+Kr+D4kyfjmpqeKW/9twAEdwCDugfcAUHuEFPmFuEkWaJysewQmcwTGYTHuFOxjDBB7ApPO23tmyDVZ8CRfV7ye4YW0PtBl0aBdW4N29s2V7smKTnMMuaO8Qyd7wn+raLF7aB/POln0Kivch9vVdc88YY9UMDLACr+CDeYrEybhLcy32jVWTTLCWmcB+2mdf1RaJd14112LfWDVl6pwsh2QK9+BrX4Otc0/0XXPPGGPVlC5YgRPmkIwhWvWM7501Eyi+AmOMVZNbZ5t+Wo7lTUCzVbfQT9AfJGM7tXZgrVEuCXpJ/vcxmSCsjraJ7VC0OR7zz+f8C54rgrcYdoUhAAAAAElFTkSuQmCC");this.parameters=[[[.6,100,.75],o,50],[[0,0,1],a,20]];for(let e=0;e<500;e++){const e=t.MathUtils.randFloatSpread(this.width),i=s(0,3*this.height/5),r=s(-this.depth/2,this.zAxisNumber);n.push(e,i,r)}i.setAttribute("position",new t.Float32BufferAttribute(n,3));const h=[];for(let n=0;n<this.parameters.length;n++){const r=this.parameters[n][0],s=this.parameters[n][1],o=this.parameters[n][2];this.materials[n]=new t.PointsMaterial({size:o,map:s,blending:t.AdditiveBlending,transparent:!0,depthTest:!1}),this.materials[n].color.setHSL(r[0],r[1],r[2]);const a=new t.Points(i,this.materials[n]);a.rotation.x=.2*Math.random()-.15,a.rotation.y=.2*Math.random()-.15,a.rotation.z=.2*Math.random()-.15,a.position.setZ(e),h.push(a),this.scene.add(a)}return h}renderStarMove(){const t=5e-5*Date.now();for(let e=0;e<this.parameters.length;e++){const i=this.parameters[e][0],n=360*(i[0]+t)%360/360;this.materials[e].color.setHSL(i[0],i[1],parseFloat(n.toFixed(2)))}this.zprogress+=10,this.zprogress_second+=10,this.zprogress>=this.zAxisNumber+this.depth/2?this.zprogress=this.particles_init_postion:this.particles_first.forEach((t=>{t.position.setZ(this.zprogress)})),this.zprogress_second>=this.zAxisNumber+this.depth/2?this.zprogress_second=this.particles_init_postion:this.particles_second.forEach((t=>{t.position.setZ(this.zprogress_second)}))}onProgress(t){let{progress:e,total:i}=t;document.getElementById("qtprogress").style.width=`${i}%`,document.getElementById("qtprogresstext").innerText=`正在加载:${i}%`}destroy(){cancelAnimationFrame(this.animationFrameId),this.renderer.dispose(),this.hm.off(r.HUMAN_LOAD_PROGRESS,this.onProgress),this.renderer.domElement.parentNode&&(this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.container.innerHTML="")}}export{Ir as L,Gr as T};
@@ -1 +1 @@
1
- import{a as t}from"./human-core-B5XXN8k3.js";const e=new WeakMap,r=new WeakMap,n=new WeakMap,o=Symbol("anyProducer"),i=Promise.resolve(),a=Symbol("listenerAdded"),s=Symbol("listenerRemoved");let c=!1,u=!1;const f=t=>"string"==typeof t||"symbol"==typeof t||"number"==typeof t;function l(t){if(!f(t))throw new TypeError("`eventName` must be a string, symbol, or number")}function d(t){if("function"!=typeof t)throw new TypeError("listener must be a function")}function p(t,e){const n=r.get(t);if(n.has(e))return n.get(e)}function h(t,e){const r=f(e)?e:o,i=n.get(t);if(i.has(r))return i.get(r)}function _(t,e){e=Array.isArray(e)?e:[e];let r=!1,o=()=>{},i=[];const a={enqueue(t){i.push(t),o()},finish(){r=!0,o()}};for(const r of e){let e=h(t,r);if(!e){e=new Set;n.get(t).set(r,e)}e.add(a)}return{async next(){return i?0===i.length?r?(i=void 0,this.next()):(await new Promise((t=>{o=t})),this.next()):{done:!1,value:await i.shift()}:{done:!0}},async return(r){i=void 0;for(const r of e){const e=h(t,r);if(e&&(e.delete(a),0===e.size)){n.get(t).delete(r)}}return o(),arguments.length>0?{done:!0,value:await r}:{done:!0}},[Symbol.asyncIterator](){return this}}}function y(t){if(void 0===t)return g;if(!Array.isArray(t))throw new TypeError("`methodNames` must be an array of strings");for(const e of t)if(!g.includes(e)){if("string"!=typeof e)throw new TypeError("`methodNames` element must be a string");throw new Error(`${e} is not Emittery method`)}return t}const v=t=>t===a||t===s;function b(t,e,r){if(v(e))try{c=!0,t.emit(e,r)}finally{c=!1}}class E{static mixin(t,e){return e=y(e),r=>{if("function"!=typeof r)throw new TypeError("`target` must be function");for(const t of e)if(void 0!==r.prototype[t])throw new Error(`The property \`${t}\` already exists on \`target\``);Object.defineProperty(r.prototype,t,{enumerable:!1,get:function(){return Object.defineProperty(this,t,{enumerable:!1,value:new E}),this[t]}});const n=e=>function(...r){return this[t][e](...r)};for(const t of e)Object.defineProperty(r.prototype,t,{enumerable:!1,value:n(t)});return r}}static get isDebugEnabled(){if("object"!=typeof globalThis.process?.env)return u;const{env:t}=globalThis.process??{env:{}};return"emittery"===t.DEBUG||"*"===t.DEBUG||u}static set isDebugEnabled(t){u=t}constructor(t={}){e.set(this,new Set),r.set(this,new Map),n.set(this,new Map),n.get(this).set(o,new Set),this.debug=t.debug??{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(t,e,r,n)=>{try{n=JSON.stringify(n)}catch{n=`Object with the following keys failed to stringify: ${Object.keys(n).join(",")}`}"symbol"!=typeof r&&"number"!=typeof r||(r=r.toString());const o=new Date;o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()})}logIfDebugEnabled(t,e,r){(E.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,e,r)}on(t,e){d(e),t=Array.isArray(t)?t:[t];for(const n of t){l(n);let t=p(this,n);if(!t){t=new Set;r.get(this).set(n,t)}t.add(e),this.logIfDebugEnabled("subscribe",n,void 0),v(n)||b(this,a,{eventName:n,listener:e})}return this.off.bind(this,t,e)}off(t,e){d(e),t=Array.isArray(t)?t:[t];for(const n of t){l(n);const t=p(this,n);if(t&&(t.delete(e),0===t.size)){r.get(this).delete(n)}this.logIfDebugEnabled("unsubscribe",n,void 0),v(n)||b(this,s,{eventName:n,listener:e})}}once(t){let e;const r=new Promise((r=>{e=this.on(t,(t=>{e(),r(t)}))}));return r.off=e,r}events(t){t=Array.isArray(t)?t:[t];for(const e of t)l(e);return _(this,t)}async emit(t,r){if(l(t),v(t)&&!c)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,r),function(t,e,r){const i=n.get(t);if(i.has(e))for(const t of i.get(e))t.enqueue(r);if(i.has(o)){const t=Promise.all([e,r]);for(const e of i.get(o))e.enqueue(t)}}(this,t,r);const a=p(this,t)??new Set,s=e.get(this),u=[...a],f=v(t)?[]:[...s];await i,await Promise.all([...u.map((async t=>{if(a.has(t))return t(r)})),...f.map((async e=>{if(s.has(e))return e(t,r)}))])}async emitSerial(t,r){if(l(t),v(t)&&!c)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",t,r);const n=p(this,t)??new Set,o=e.get(this),a=[...n],s=[...o];await i;for(const t of a)n.has(t)&&await t(r);for(const e of s)o.has(e)&&await e(t,r)}onAny(t){return d(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),e.get(this).add(t),b(this,a,{listener:t}),this.offAny.bind(this,t)}anyEvent(){return _(this)}offAny(t){d(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),b(this,s,{listener:t}),e.get(this).delete(t)}clearListeners(t){t=Array.isArray(t)?t:[t];for(const o of t)if(this.logIfDebugEnabled("clear",o,void 0),f(o)){const t=p(this,o);t&&t.clear();const e=h(this,o);if(e){for(const t of e)t.finish();e.clear()}}else{e.get(this).clear();for(const[t,e]of r.get(this).entries())e.clear(),r.get(this).delete(t);for(const[t,e]of n.get(this).entries()){for(const t of e)t.finish();e.clear(),n.get(this).delete(t)}}}listenerCount(t){t=Array.isArray(t)?t:[t];let o=0;for(const i of t)if(f(i))o+=e.get(this).size+(p(this,i)?.size??0)+(h(this,i)?.size??0)+(h(this)?.size??0);else{void 0!==i&&l(i),o+=e.get(this).size;for(const t of r.get(this).values())o+=t.size;for(const t of n.get(this).values())o+=t.size}return o}bindMethods(t,e){if("object"!=typeof t||null===t)throw new TypeError("`target` must be an object");e=y(e);for(const r of e){if(void 0!==t[r])throw new Error(`The property \`${r}\` already exists on \`target\``);Object.defineProperty(t,r,{enumerable:!1,value:this[r].bind(this)})}}}const g=Object.getOwnPropertyNames(E.prototype).filter((t=>"constructor"!==t));Object.defineProperty(E,"listenerAdded",{value:a,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(E,"listenerRemoved",{value:s,writable:!1,enumerable:!0,configurable:!1});var O="object"==typeof t&&t&&t.Object===Object&&t,T="object"==typeof self&&self&&self.Object===Object&&self,A=O||T||Function("return this")(),m=A.Symbol,I=Object.prototype,N=I.hasOwnProperty,R=I.toString,w=m?m.toStringTag:void 0;var j=Object.prototype.toString;var S="[object Null]",C="[object Undefined]",D=m?m.toStringTag:void 0;function P(t){return null==t?void 0===t?C:S:D&&D in Object(t)?function(t){var e=N.call(t,w),r=t[w];try{t[w]=void 0;var n=!0}catch(t){}var o=R.call(t);return n&&(e?t[w]=r:delete t[w]),o}(t):function(t){return j.call(t)}(t)}function M(t){return null!=t&&"object"==typeof t}var x="[object Symbol]";var L=Array.isArray,U=/\s/;var z=/^\s+/;function G(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&U.test(t.charAt(e)););return e}(t)+1).replace(z,""):t}function V(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var W=NaN,Y=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,B=/^0o[0-7]+$/i,F=parseInt;function $(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||M(t)&&P(t)==x}(t))return W;if(V(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=V(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=G(t);var r=k.test(t);return r||B.test(t)?F(t.slice(2),r?2:8):Y.test(t)?W:+t}var H=1/0,q=17976931348623157e292;function K(t){return t?(t=$(t))===H||t===-H?(t<0?-1:1)*q:t==t?t:0:0===t?t:0}function X(t){return t}var J="[object AsyncFunction]",Q="[object Function]",Z="[object GeneratorFunction]",tt="[object Proxy]";function et(t){if(!V(t))return!1;var e=P(t);return e==Q||e==Z||e==J||e==tt}var rt,nt=A["__core-js_shared__"],ot=(rt=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||""))?"Symbol(src)_1."+rt:"";var it=Function.prototype.toString;var at=/^\[object .+?Constructor\]$/,st=Function.prototype,ct=Object.prototype,ut=st.toString,ft=ct.hasOwnProperty,lt=RegExp("^"+ut.call(ft).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dt(t){return!(!V(t)||(e=t,ot&&ot in e))&&(et(t)?lt:at).test(function(t){if(null!=t){try{return it.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function pt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return dt(r)?r:void 0}var ht=Object.create,_t=function(){function t(){}return function(e){if(!V(e))return{};if(ht)return ht(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var yt=Date.now;var vt,bt,Et,gt=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ot=gt?function(t,e){return gt(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:X,Tt=(vt=Ot,bt=0,Et=0,function(){var t=yt(),e=16-(t-Et);if(Et=t,e>0){if(++bt>=800)return arguments[0]}else bt=0;return vt.apply(void 0,arguments)}),At=9007199254740991,mt=/^(?:0|[1-9]\d*)$/;function It(t,e){var r=typeof t;return!!(e=null==e?At:e)&&("number"==r||"symbol"!=r&&mt.test(t))&&t>-1&&t%1==0&&t<e}function Nt(t,e,r){"__proto__"==e&&gt?gt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Rt(t,e){return t===e||t!=t&&e!=e}var wt=Object.prototype.hasOwnProperty;function jt(t,e,r){var n=t[e];wt.call(t,e)&&Rt(n,r)&&(void 0!==r||e in t)||Nt(t,e,r)}var St=Math.max;function Ct(t,e){return Tt(function(t,e,r){return e=St(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=St(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=n[o];return s[e]=r(a),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,s)}}(t,e,X),t+"")}var Dt=9007199254740991;function Pt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Dt}function Mt(t){return null!=t&&Pt(t.length)&&!et(t)}function xt(t,e,r){if(!V(r))return!1;var n=typeof e;return!!("number"==n?Mt(r)&&It(e,r.length):"string"==n&&e in r)&&Rt(r[e],t)}var Lt=Object.prototype;function Ut(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function zt(t){return M(t)&&"[object Arguments]"==P(t)}var Gt=Object.prototype,Vt=Gt.hasOwnProperty,Wt=Gt.propertyIsEnumerable,Yt=zt(function(){return arguments}())?zt:function(t){return M(t)&&Vt.call(t,"callee")&&!Wt.call(t,"callee")};var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,Ft=Bt&&Bt.exports===kt?A.Buffer:void 0,$t=(Ft?Ft.isBuffer:void 0)||function(){return!1},Ht={};Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht["[object Arguments]"]=Ht["[object Array]"]=Ht["[object ArrayBuffer]"]=Ht["[object Boolean]"]=Ht["[object DataView]"]=Ht["[object Date]"]=Ht["[object Error]"]=Ht["[object Function]"]=Ht["[object Map]"]=Ht["[object Number]"]=Ht["[object Object]"]=Ht["[object RegExp]"]=Ht["[object Set]"]=Ht["[object String]"]=Ht["[object WeakMap]"]=!1;var qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Kt=qt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Kt&&Kt.exports===qt&&O.process,Jt=function(){try{var t=Kt&&Kt.require&&Kt.require("util").types;return t||Xt&&Xt.binding&&Xt.binding("util")}catch(t){}}(),Qt=Jt&&Jt.isTypedArray,Zt=Qt?function(t){return function(e){return t(e)}}(Qt):function(t){return M(t)&&Pt(t.length)&&!!Ht[P(t)]};function te(t,e){var r=L(t),n=!r&&Yt(t),o=!r&&!n&&$t(t),i=!r&&!n&&!o&&Zt(t),a=r||n||o||i,s=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=s.length;for(var u in t)a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||It(u,c))||s.push(u);return s}var ee=Object.prototype.hasOwnProperty;function re(t){if(!V(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Ut(t),r=[];for(var n in t)("constructor"!=n||!e&&ee.call(t,n))&&r.push(n);return r}function ne(t){return Mt(t)?te(t):re(t)}var oe=pt(Object,"create");var ie=Object.prototype.hasOwnProperty;var ae=Object.prototype.hasOwnProperty;function se(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ce(t,e){for(var r=t.length;r--;)if(Rt(t[r][0],e))return r;return-1}se.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},se.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},se.prototype.get=function(t){var e=this.__data__;if(oe){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ie.call(e,t)?e[t]:void 0},se.prototype.has=function(t){var e=this.__data__;return oe?void 0!==e[t]:ae.call(e,t)},se.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=oe&&void 0===e?"__lodash_hash_undefined__":e,this};var ue=Array.prototype.splice;function fe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(t){var e=this.__data__,r=ce(e,t);return!(r<0)&&(r==e.length-1?e.pop():ue.call(e,r,1),--this.size,!0)},fe.prototype.get=function(t){var e=this.__data__,r=ce(e,t);return r<0?void 0:e[r][1]},fe.prototype.has=function(t){return ce(this.__data__,t)>-1},fe.prototype.set=function(t,e){var r=this.__data__,n=ce(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var le=pt(A,"Map");function de(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function pe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}pe.prototype.clear=function(){this.size=0,this.__data__={hash:new se,map:new(le||fe),string:new se}},pe.prototype.delete=function(t){var e=de(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return de(this,t).get(t)},pe.prototype.has=function(t){return de(this,t).has(t)},pe.prototype.set=function(t,e){var r=de(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var he=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object),_e="[object Object]",ye=Function.prototype,ve=Object.prototype,be=ye.toString,Ee=ve.hasOwnProperty,ge=be.call(Object);function Oe(t){var e=this.__data__=new fe(t);this.size=e.size}Oe.prototype.clear=function(){this.__data__=new fe,this.size=0},Oe.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Oe.prototype.get=function(t){return this.__data__.get(t)},Oe.prototype.has=function(t){return this.__data__.has(t)},Oe.prototype.set=function(t,e){var r=this.__data__;if(r instanceof fe){var n=r.__data__;if(!le||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new pe(n)}return r.set(t,e),this.size=r.size,this};var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ae=Te&&"object"==typeof module&&module&&!module.nodeType&&module,me=Ae&&Ae.exports===Te?A.Buffer:void 0;me&&me.allocUnsafe;var Ie=A.Uint8Array;function Ne(t,e){var r,n,o=(r=t.buffer,n=new r.constructor(r.byteLength),new Ie(n).set(new Ie(r)),n);return new t.constructor(o,t.byteOffset,t.length)}var Re=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),a=i.length;a--;){var s=i[++n];if(!1===e(o[s],s,o))break}return t},we=function(){return A.Date.now()},je=Math.max,Se=Math.min;function Ce(t,e,r){var n,o,i,a,s,c,u=0,f=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,i=o;return n=o=void 0,u=e,a=t.apply(i,r)}function h(t){var r=t-c;return void 0===c||r>=e||r<0||l&&t-u>=i}function _(){var t=we();if(h(t))return y(t);s=setTimeout(_,function(t){var r=e-(t-c);return l?Se(r,i-(t-u)):r}(t))}function y(t){return s=void 0,d&&n?p(t):(n=o=void 0,a)}function v(){var t=we(),r=h(t);if(n=arguments,o=this,c=t,r){if(void 0===s)return function(t){return u=t,s=setTimeout(_,e),f?p(t):a}(c);if(l)return clearTimeout(s),s=setTimeout(_,e),p(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=$(e)||0,V(r)&&(f=!!r.leading,i=(l="maxWait"in r)?je($(r.maxWait)||0,e):i,d="trailing"in r?!!r.trailing:d),v.cancel=function(){void 0!==s&&clearTimeout(s),u=0,n=c=o=s=void 0},v.flush=function(){return void 0===s?a:y(we())},v}function De(t,e,r){(void 0!==r&&!Rt(t[e],r)||void 0===r&&!(e in t))&&Nt(t,e,r)}function Pe(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Me(t){return function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var s=e[i],c=void 0;void 0===c&&(c=t[s]),o?Nt(r,s,c):jt(r,s,c)}return r}(t,ne(t))}function xe(t,e,r,n,o,i,a){var s=Pe(t,r),c=Pe(e,r),u=a.get(c);if(u)De(t,r,u);else{var f,l=i?i(s,c,r+"",t,e,a):void 0,d=void 0===l;if(d){var p=L(c),h=!p&&$t(c),_=!p&&!h&&Zt(c);l=c,p||h||_?L(s)?l=s:M(f=s)&&Mt(f)?l=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(s):h?(d=!1,l=c.slice()):_?(d=!1,l=Ne(c)):l=[]:function(t){if(!M(t)||P(t)!=_e)return!1;var e=he(t);if(null===e)return!0;var r=Ee.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&be.call(r)==ge}(c)||Yt(c)?(l=s,Yt(s)?l=Me(s):V(s)&&!et(s)||(l=function(t){return"function"!=typeof t.constructor||Ut(t)?{}:_t(he(t))}(c))):d=!1}d&&(a.set(c,l),o(l,c,n,i,a),a.delete(c)),De(t,r,l)}}function Le(t,e,r,n,o){t!==e&&Re(e,(function(i,a){if(o||(o=new Oe),V(i))xe(t,e,a,r,Le,n,o);else{var s=n?n(Pe(t,a),i,a+"",t,e,o):void 0;void 0===s&&(s=i),De(t,a,s)}}),ne)}var Ue,ze=(Ue=function(t,e,r){Le(t,e,r)},Ct((function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Ue.length>3&&"function"==typeof o?(n--,o):void 0,i&&xt(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var a=e[r];a&&Ue(t,a,r,o)}return t}))),Ge=Math.floor,Ve=Math.random;var We,Ye,ke,Be=parseFloat,Fe=Math.min,$e=Math.random;function He(t,e,r){if(r&&"boolean"!=typeof r&&xt(t,e,r)&&(e=r=void 0),void 0===r&&("boolean"==typeof e?(r=e,e=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=K(t),void 0===e?(e=t,t=0):e=K(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=$e();return Fe(t+o*(e-t+Be("1e-"+((o+"").length-1))),e)}return function(t,e){return t+Ge(Ve()*(e-t+1))}(t,e)}!function(t){t.HUMAN_READY="human.ready",t.HUMAN_ERROR="human.error",t.HUMAN_ACTION_PENDING="human.action.pending",t.HUMAN_LOAD_PROGRESS="human.load.progress",t.CORE_BUNDLES_LOADED="core.bundles.loaded",t.AUDIO_PLAY="audio.play",t.AUDIO_PAUSE="audio.pause",t.AUDIO_MUTE="audio.mute",t.RECORDER_MESSAGE="recorder.message",t.RECORDER_START="recorder.start",t.RECORDER_STOP="recorder.stop",t.RECORDER_SENDING="recorder.sending",t.VOICE_SLEEP="voice.sleep",t.VOICE_WAKE="voice.wake",t.VOICE_INTERRUPT="voice.interrupt",t.VOICE_BARGE_IN="voice.barge_in",t.VOICE2TEXT="voice2text",t.WAKE_RECORDER_START="wake.record.start",t.WAKE_RECORDER_STOP="wake.record.stop",t.VOICE_INTERACTION_OPENED="voice.interaction.opened",t.VOICE_INTERACTION_CLOSED="voice.interaction.closed",t.VOICE_INTERACTION_WAKEUP="voice.interaction.wakeup",t.VOICE_INTERACTION_SLEEP="voice.interaction.sleep",t.VOICE_INTERACTION_WAKE_CONFIRM="voice.interaction.wake.confirm",t.VOICE_INTERACTION_EXIT_PROMPT="voice.interaction.exit.prompt",t.VOICE_INTERACTION_POST_EXIT_IDLE="voice.interaction.post_exit_idle",t.VOICE_INTERACTION_INTERRUPT="voice.interaction.interrupt",t.VOICE_INTERRUPT_HINT_SHOW="voice.interrupt.hint.show",t.VOICE_INTERRUPT_HINT_HIDE="voice.interrupt.hint.hide",t.VOICE_INTERRUPTED="voice.interrupted",t.VOICE_INTERACTION_AUDIO_START="voice.interaction.audio.start",t.VOICE_INTERACTION_AUDIO_STOP="voice.interaction.audio.stop",t.VOICE_INTERACTION_PLAY_START="voice.interaction.play.start",t.VOICE_INTERACTION_PLAY_END="voice.interaction.play.end",t.VOICE_INTERACTION_WEBRTC_STATE="voice.interaction.webrtc.state",t.WEBRTC_TTS_PLAY_START="webrtc.tts.play.start",t.WEBRTC_TTS_PLAY_END="webrtc.tts.play.end",t.CHAT_MESSAGE_BS_PLAY_START="chat.message.bs.play.start",t.CHAT_MESSAGE_BS_PLAY_END="chat.message.bs.play.end",t.TOOL_RESULT="tool.result",t.GATEWAY_CONNECTED="gateway.connected",t.GATEWAY_DISCONNECTED="gateway.disconnected",t.GATEWAY_RECONNECTING="gateway.reconnecting",t.GATEWAY_MESSAGE="gateway.message",t.GATEWAY_ERROR="gateway.error",t.GATEWAY_STATE_PUSH="gateway.state.push",t.CAMERA_PERSON_TEST_RESULT="camera.person.test.result",t.CAMERA_FACE_RECOGNITION_RESULT="camera.face.recognition.result",t.EXPRESSION_SMILE_DETECTED="expression.smile.detected",t.EXPRESSION_SMILE_STATE_CHANGED="expression.smile.state_changed",t.RENDER_READY="render.ready",t.RENDER_ERROR="render.error",t.MODEL_LOAD_PROGRESS="model.load.progress",t.MODEL_LOADED="model.loaded",t.MODEL_LOAD_FAILED="model.load.failed",t.ANIMATION_START="animation.start",t.ANIMATION_END="animation.end",t.ERROR="error"}(We||(We={})),function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSING=2]="CLOSING",t[t.CLOSED=3]="CLOSED"}(Ye||(Ye={})),function(t){t.DISCONNECTED="disconnected",t.CONNECTING="connecting",t.CONNECTED="connected",t.RECONNECTING="reconnecting",t.CLOSED="closed"}(ke||(ke={}));export{E,Ye as W,We as a,Ce as d,ze as m,He as r};
1
+ import{a as t}from"./human-core-CfQtjNXk.js";const e=new WeakMap,r=new WeakMap,n=new WeakMap,o=Symbol("anyProducer"),i=Promise.resolve(),a=Symbol("listenerAdded"),s=Symbol("listenerRemoved");let c=!1,u=!1;const f=t=>"string"==typeof t||"symbol"==typeof t||"number"==typeof t;function l(t){if(!f(t))throw new TypeError("`eventName` must be a string, symbol, or number")}function d(t){if("function"!=typeof t)throw new TypeError("listener must be a function")}function p(t,e){const n=r.get(t);if(n.has(e))return n.get(e)}function h(t,e){const r=f(e)?e:o,i=n.get(t);if(i.has(r))return i.get(r)}function _(t,e){e=Array.isArray(e)?e:[e];let r=!1,o=()=>{},i=[];const a={enqueue(t){i.push(t),o()},finish(){r=!0,o()}};for(const r of e){let e=h(t,r);if(!e){e=new Set;n.get(t).set(r,e)}e.add(a)}return{async next(){return i?0===i.length?r?(i=void 0,this.next()):(await new Promise((t=>{o=t})),this.next()):{done:!1,value:await i.shift()}:{done:!0}},async return(r){i=void 0;for(const r of e){const e=h(t,r);if(e&&(e.delete(a),0===e.size)){n.get(t).delete(r)}}return o(),arguments.length>0?{done:!0,value:await r}:{done:!0}},[Symbol.asyncIterator](){return this}}}function y(t){if(void 0===t)return g;if(!Array.isArray(t))throw new TypeError("`methodNames` must be an array of strings");for(const e of t)if(!g.includes(e)){if("string"!=typeof e)throw new TypeError("`methodNames` element must be a string");throw new Error(`${e} is not Emittery method`)}return t}const v=t=>t===a||t===s;function b(t,e,r){if(v(e))try{c=!0,t.emit(e,r)}finally{c=!1}}class E{static mixin(t,e){return e=y(e),r=>{if("function"!=typeof r)throw new TypeError("`target` must be function");for(const t of e)if(void 0!==r.prototype[t])throw new Error(`The property \`${t}\` already exists on \`target\``);Object.defineProperty(r.prototype,t,{enumerable:!1,get:function(){return Object.defineProperty(this,t,{enumerable:!1,value:new E}),this[t]}});const n=e=>function(...r){return this[t][e](...r)};for(const t of e)Object.defineProperty(r.prototype,t,{enumerable:!1,value:n(t)});return r}}static get isDebugEnabled(){if("object"!=typeof globalThis.process?.env)return u;const{env:t}=globalThis.process??{env:{}};return"emittery"===t.DEBUG||"*"===t.DEBUG||u}static set isDebugEnabled(t){u=t}constructor(t={}){e.set(this,new Set),r.set(this,new Map),n.set(this,new Map),n.get(this).set(o,new Set),this.debug=t.debug??{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(t,e,r,n)=>{try{n=JSON.stringify(n)}catch{n=`Object with the following keys failed to stringify: ${Object.keys(n).join(",")}`}"symbol"!=typeof r&&"number"!=typeof r||(r=r.toString());const o=new Date;o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()})}logIfDebugEnabled(t,e,r){(E.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,e,r)}on(t,e){d(e),t=Array.isArray(t)?t:[t];for(const n of t){l(n);let t=p(this,n);if(!t){t=new Set;r.get(this).set(n,t)}t.add(e),this.logIfDebugEnabled("subscribe",n,void 0),v(n)||b(this,a,{eventName:n,listener:e})}return this.off.bind(this,t,e)}off(t,e){d(e),t=Array.isArray(t)?t:[t];for(const n of t){l(n);const t=p(this,n);if(t&&(t.delete(e),0===t.size)){r.get(this).delete(n)}this.logIfDebugEnabled("unsubscribe",n,void 0),v(n)||b(this,s,{eventName:n,listener:e})}}once(t){let e;const r=new Promise((r=>{e=this.on(t,(t=>{e(),r(t)}))}));return r.off=e,r}events(t){t=Array.isArray(t)?t:[t];for(const e of t)l(e);return _(this,t)}async emit(t,r){if(l(t),v(t)&&!c)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,r),function(t,e,r){const i=n.get(t);if(i.has(e))for(const t of i.get(e))t.enqueue(r);if(i.has(o)){const t=Promise.all([e,r]);for(const e of i.get(o))e.enqueue(t)}}(this,t,r);const a=p(this,t)??new Set,s=e.get(this),u=[...a],f=v(t)?[]:[...s];await i,await Promise.all([...u.map((async t=>{if(a.has(t))return t(r)})),...f.map((async e=>{if(s.has(e))return e(t,r)}))])}async emitSerial(t,r){if(l(t),v(t)&&!c)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",t,r);const n=p(this,t)??new Set,o=e.get(this),a=[...n],s=[...o];await i;for(const t of a)n.has(t)&&await t(r);for(const e of s)o.has(e)&&await e(t,r)}onAny(t){return d(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),e.get(this).add(t),b(this,a,{listener:t}),this.offAny.bind(this,t)}anyEvent(){return _(this)}offAny(t){d(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),b(this,s,{listener:t}),e.get(this).delete(t)}clearListeners(t){t=Array.isArray(t)?t:[t];for(const o of t)if(this.logIfDebugEnabled("clear",o,void 0),f(o)){const t=p(this,o);t&&t.clear();const e=h(this,o);if(e){for(const t of e)t.finish();e.clear()}}else{e.get(this).clear();for(const[t,e]of r.get(this).entries())e.clear(),r.get(this).delete(t);for(const[t,e]of n.get(this).entries()){for(const t of e)t.finish();e.clear(),n.get(this).delete(t)}}}listenerCount(t){t=Array.isArray(t)?t:[t];let o=0;for(const i of t)if(f(i))o+=e.get(this).size+(p(this,i)?.size??0)+(h(this,i)?.size??0)+(h(this)?.size??0);else{void 0!==i&&l(i),o+=e.get(this).size;for(const t of r.get(this).values())o+=t.size;for(const t of n.get(this).values())o+=t.size}return o}bindMethods(t,e){if("object"!=typeof t||null===t)throw new TypeError("`target` must be an object");e=y(e);for(const r of e){if(void 0!==t[r])throw new Error(`The property \`${r}\` already exists on \`target\``);Object.defineProperty(t,r,{enumerable:!1,value:this[r].bind(this)})}}}const g=Object.getOwnPropertyNames(E.prototype).filter((t=>"constructor"!==t));Object.defineProperty(E,"listenerAdded",{value:a,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(E,"listenerRemoved",{value:s,writable:!1,enumerable:!0,configurable:!1});var O="object"==typeof t&&t&&t.Object===Object&&t,T="object"==typeof self&&self&&self.Object===Object&&self,A=O||T||Function("return this")(),m=A.Symbol,I=Object.prototype,N=I.hasOwnProperty,R=I.toString,w=m?m.toStringTag:void 0;var j=Object.prototype.toString;var S="[object Null]",C="[object Undefined]",D=m?m.toStringTag:void 0;function P(t){return null==t?void 0===t?C:S:D&&D in Object(t)?function(t){var e=N.call(t,w),r=t[w];try{t[w]=void 0;var n=!0}catch(t){}var o=R.call(t);return n&&(e?t[w]=r:delete t[w]),o}(t):function(t){return j.call(t)}(t)}function M(t){return null!=t&&"object"==typeof t}var x="[object Symbol]";var L=Array.isArray,U=/\s/;var z=/^\s+/;function G(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&U.test(t.charAt(e)););return e}(t)+1).replace(z,""):t}function V(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var W=NaN,Y=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,B=/^0o[0-7]+$/i,F=parseInt;function $(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||M(t)&&P(t)==x}(t))return W;if(V(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=V(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=G(t);var r=k.test(t);return r||B.test(t)?F(t.slice(2),r?2:8):Y.test(t)?W:+t}var H=1/0,q=17976931348623157e292;function K(t){return t?(t=$(t))===H||t===-H?(t<0?-1:1)*q:t==t?t:0:0===t?t:0}function X(t){return t}var J="[object AsyncFunction]",Q="[object Function]",Z="[object GeneratorFunction]",tt="[object Proxy]";function et(t){if(!V(t))return!1;var e=P(t);return e==Q||e==Z||e==J||e==tt}var rt,nt=A["__core-js_shared__"],ot=(rt=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||""))?"Symbol(src)_1."+rt:"";var it=Function.prototype.toString;var at=/^\[object .+?Constructor\]$/,st=Function.prototype,ct=Object.prototype,ut=st.toString,ft=ct.hasOwnProperty,lt=RegExp("^"+ut.call(ft).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dt(t){return!(!V(t)||(e=t,ot&&ot in e))&&(et(t)?lt:at).test(function(t){if(null!=t){try{return it.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function pt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return dt(r)?r:void 0}var ht=Object.create,_t=function(){function t(){}return function(e){if(!V(e))return{};if(ht)return ht(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var yt=Date.now;var vt,bt,Et,gt=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ot=gt?function(t,e){return gt(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:X,Tt=(vt=Ot,bt=0,Et=0,function(){var t=yt(),e=16-(t-Et);if(Et=t,e>0){if(++bt>=800)return arguments[0]}else bt=0;return vt.apply(void 0,arguments)}),At=9007199254740991,mt=/^(?:0|[1-9]\d*)$/;function It(t,e){var r=typeof t;return!!(e=null==e?At:e)&&("number"==r||"symbol"!=r&&mt.test(t))&&t>-1&&t%1==0&&t<e}function Nt(t,e,r){"__proto__"==e&&gt?gt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Rt(t,e){return t===e||t!=t&&e!=e}var wt=Object.prototype.hasOwnProperty;function jt(t,e,r){var n=t[e];wt.call(t,e)&&Rt(n,r)&&(void 0!==r||e in t)||Nt(t,e,r)}var St=Math.max;function Ct(t,e){return Tt(function(t,e,r){return e=St(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=St(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=n[o];return s[e]=r(a),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,s)}}(t,e,X),t+"")}var Dt=9007199254740991;function Pt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Dt}function Mt(t){return null!=t&&Pt(t.length)&&!et(t)}function xt(t,e,r){if(!V(r))return!1;var n=typeof e;return!!("number"==n?Mt(r)&&It(e,r.length):"string"==n&&e in r)&&Rt(r[e],t)}var Lt=Object.prototype;function Ut(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function zt(t){return M(t)&&"[object Arguments]"==P(t)}var Gt=Object.prototype,Vt=Gt.hasOwnProperty,Wt=Gt.propertyIsEnumerable,Yt=zt(function(){return arguments}())?zt:function(t){return M(t)&&Vt.call(t,"callee")&&!Wt.call(t,"callee")};var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,Ft=Bt&&Bt.exports===kt?A.Buffer:void 0,$t=(Ft?Ft.isBuffer:void 0)||function(){return!1},Ht={};Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht["[object Arguments]"]=Ht["[object Array]"]=Ht["[object ArrayBuffer]"]=Ht["[object Boolean]"]=Ht["[object DataView]"]=Ht["[object Date]"]=Ht["[object Error]"]=Ht["[object Function]"]=Ht["[object Map]"]=Ht["[object Number]"]=Ht["[object Object]"]=Ht["[object RegExp]"]=Ht["[object Set]"]=Ht["[object String]"]=Ht["[object WeakMap]"]=!1;var qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Kt=qt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Kt&&Kt.exports===qt&&O.process,Jt=function(){try{var t=Kt&&Kt.require&&Kt.require("util").types;return t||Xt&&Xt.binding&&Xt.binding("util")}catch(t){}}(),Qt=Jt&&Jt.isTypedArray,Zt=Qt?function(t){return function(e){return t(e)}}(Qt):function(t){return M(t)&&Pt(t.length)&&!!Ht[P(t)]};function te(t,e){var r=L(t),n=!r&&Yt(t),o=!r&&!n&&$t(t),i=!r&&!n&&!o&&Zt(t),a=r||n||o||i,s=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=s.length;for(var u in t)a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||It(u,c))||s.push(u);return s}var ee=Object.prototype.hasOwnProperty;function re(t){if(!V(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Ut(t),r=[];for(var n in t)("constructor"!=n||!e&&ee.call(t,n))&&r.push(n);return r}function ne(t){return Mt(t)?te(t):re(t)}var oe=pt(Object,"create");var ie=Object.prototype.hasOwnProperty;var ae=Object.prototype.hasOwnProperty;function se(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ce(t,e){for(var r=t.length;r--;)if(Rt(t[r][0],e))return r;return-1}se.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},se.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},se.prototype.get=function(t){var e=this.__data__;if(oe){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ie.call(e,t)?e[t]:void 0},se.prototype.has=function(t){var e=this.__data__;return oe?void 0!==e[t]:ae.call(e,t)},se.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=oe&&void 0===e?"__lodash_hash_undefined__":e,this};var ue=Array.prototype.splice;function fe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}fe.prototype.clear=function(){this.__data__=[],this.size=0},fe.prototype.delete=function(t){var e=this.__data__,r=ce(e,t);return!(r<0)&&(r==e.length-1?e.pop():ue.call(e,r,1),--this.size,!0)},fe.prototype.get=function(t){var e=this.__data__,r=ce(e,t);return r<0?void 0:e[r][1]},fe.prototype.has=function(t){return ce(this.__data__,t)>-1},fe.prototype.set=function(t,e){var r=this.__data__,n=ce(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var le=pt(A,"Map");function de(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function pe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}pe.prototype.clear=function(){this.size=0,this.__data__={hash:new se,map:new(le||fe),string:new se}},pe.prototype.delete=function(t){var e=de(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return de(this,t).get(t)},pe.prototype.has=function(t){return de(this,t).has(t)},pe.prototype.set=function(t,e){var r=de(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var he=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object),_e="[object Object]",ye=Function.prototype,ve=Object.prototype,be=ye.toString,Ee=ve.hasOwnProperty,ge=be.call(Object);function Oe(t){var e=this.__data__=new fe(t);this.size=e.size}Oe.prototype.clear=function(){this.__data__=new fe,this.size=0},Oe.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Oe.prototype.get=function(t){return this.__data__.get(t)},Oe.prototype.has=function(t){return this.__data__.has(t)},Oe.prototype.set=function(t,e){var r=this.__data__;if(r instanceof fe){var n=r.__data__;if(!le||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new pe(n)}return r.set(t,e),this.size=r.size,this};var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ae=Te&&"object"==typeof module&&module&&!module.nodeType&&module,me=Ae&&Ae.exports===Te?A.Buffer:void 0;me&&me.allocUnsafe;var Ie=A.Uint8Array;function Ne(t,e){var r,n,o=(r=t.buffer,n=new r.constructor(r.byteLength),new Ie(n).set(new Ie(r)),n);return new t.constructor(o,t.byteOffset,t.length)}var Re=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),a=i.length;a--;){var s=i[++n];if(!1===e(o[s],s,o))break}return t},we=function(){return A.Date.now()},je=Math.max,Se=Math.min;function Ce(t,e,r){var n,o,i,a,s,c,u=0,f=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,i=o;return n=o=void 0,u=e,a=t.apply(i,r)}function h(t){var r=t-c;return void 0===c||r>=e||r<0||l&&t-u>=i}function _(){var t=we();if(h(t))return y(t);s=setTimeout(_,function(t){var r=e-(t-c);return l?Se(r,i-(t-u)):r}(t))}function y(t){return s=void 0,d&&n?p(t):(n=o=void 0,a)}function v(){var t=we(),r=h(t);if(n=arguments,o=this,c=t,r){if(void 0===s)return function(t){return u=t,s=setTimeout(_,e),f?p(t):a}(c);if(l)return clearTimeout(s),s=setTimeout(_,e),p(c)}return void 0===s&&(s=setTimeout(_,e)),a}return e=$(e)||0,V(r)&&(f=!!r.leading,i=(l="maxWait"in r)?je($(r.maxWait)||0,e):i,d="trailing"in r?!!r.trailing:d),v.cancel=function(){void 0!==s&&clearTimeout(s),u=0,n=c=o=s=void 0},v.flush=function(){return void 0===s?a:y(we())},v}function De(t,e,r){(void 0!==r&&!Rt(t[e],r)||void 0===r&&!(e in t))&&Nt(t,e,r)}function Pe(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Me(t){return function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var s=e[i],c=void 0;void 0===c&&(c=t[s]),o?Nt(r,s,c):jt(r,s,c)}return r}(t,ne(t))}function xe(t,e,r,n,o,i,a){var s=Pe(t,r),c=Pe(e,r),u=a.get(c);if(u)De(t,r,u);else{var f,l=i?i(s,c,r+"",t,e,a):void 0,d=void 0===l;if(d){var p=L(c),h=!p&&$t(c),_=!p&&!h&&Zt(c);l=c,p||h||_?L(s)?l=s:M(f=s)&&Mt(f)?l=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(s):h?(d=!1,l=c.slice()):_?(d=!1,l=Ne(c)):l=[]:function(t){if(!M(t)||P(t)!=_e)return!1;var e=he(t);if(null===e)return!0;var r=Ee.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&be.call(r)==ge}(c)||Yt(c)?(l=s,Yt(s)?l=Me(s):V(s)&&!et(s)||(l=function(t){return"function"!=typeof t.constructor||Ut(t)?{}:_t(he(t))}(c))):d=!1}d&&(a.set(c,l),o(l,c,n,i,a),a.delete(c)),De(t,r,l)}}function Le(t,e,r,n,o){t!==e&&Re(e,(function(i,a){if(o||(o=new Oe),V(i))xe(t,e,a,r,Le,n,o);else{var s=n?n(Pe(t,a),i,a+"",t,e,o):void 0;void 0===s&&(s=i),De(t,a,s)}}),ne)}var Ue,ze=(Ue=function(t,e,r){Le(t,e,r)},Ct((function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Ue.length>3&&"function"==typeof o?(n--,o):void 0,i&&xt(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var a=e[r];a&&Ue(t,a,r,o)}return t}))),Ge=Math.floor,Ve=Math.random;var We,Ye,ke,Be=parseFloat,Fe=Math.min,$e=Math.random;function He(t,e,r){if(r&&"boolean"!=typeof r&&xt(t,e,r)&&(e=r=void 0),void 0===r&&("boolean"==typeof e?(r=e,e=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=K(t),void 0===e?(e=t,t=0):e=K(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=$e();return Fe(t+o*(e-t+Be("1e-"+((o+"").length-1))),e)}return function(t,e){return t+Ge(Ve()*(e-t+1))}(t,e)}!function(t){t.HUMAN_READY="human.ready",t.HUMAN_ERROR="human.error",t.HUMAN_ACTION_PENDING="human.action.pending",t.HUMAN_LOAD_PROGRESS="human.load.progress",t.CORE_BUNDLES_LOADED="core.bundles.loaded",t.AUDIO_PLAY="audio.play",t.AUDIO_PAUSE="audio.pause",t.AUDIO_MUTE="audio.mute",t.RECORDER_MESSAGE="recorder.message",t.RECORDER_START="recorder.start",t.RECORDER_STOP="recorder.stop",t.RECORDER_SENDING="recorder.sending",t.VOICE_SLEEP="voice.sleep",t.VOICE_WAKE="voice.wake",t.VOICE_INTERRUPT="voice.interrupt",t.VOICE_BARGE_IN="voice.barge_in",t.VOICE2TEXT="voice2text",t.WAKE_RECORDER_START="wake.record.start",t.WAKE_RECORDER_STOP="wake.record.stop",t.VOICE_INTERACTION_OPENED="voice.interaction.opened",t.VOICE_INTERACTION_CLOSED="voice.interaction.closed",t.VOICE_INTERACTION_WAKEUP="voice.interaction.wakeup",t.VOICE_INTERACTION_SLEEP="voice.interaction.sleep",t.VOICE_INTERACTION_WAKE_CONFIRM="voice.interaction.wake.confirm",t.VOICE_INTERACTION_EXIT_PROMPT="voice.interaction.exit.prompt",t.VOICE_INTERACTION_POST_EXIT_IDLE="voice.interaction.post_exit_idle",t.VOICE_INTERACTION_INTERRUPT="voice.interaction.interrupt",t.VOICE_INTERRUPT_HINT_SHOW="voice.interrupt.hint.show",t.VOICE_INTERRUPT_HINT_HIDE="voice.interrupt.hint.hide",t.VOICE_INTERRUPTED="voice.interrupted",t.VOICE_INTERACTION_AUDIO_START="voice.interaction.audio.start",t.VOICE_INTERACTION_AUDIO_STOP="voice.interaction.audio.stop",t.VOICE_INTERACTION_PLAY_START="voice.interaction.play.start",t.VOICE_INTERACTION_PLAY_END="voice.interaction.play.end",t.VOICE_INTERACTION_WEBRTC_STATE="voice.interaction.webrtc.state",t.WEBRTC_TTS_PLAY_START="webrtc.tts.play.start",t.WEBRTC_TTS_PLAY_END="webrtc.tts.play.end",t.CHAT_MESSAGE_BS_PLAY_START="chat.message.bs.play.start",t.CHAT_MESSAGE_BS_PLAY_END="chat.message.bs.play.end",t.TOOL_RESULT="tool.result",t.GATEWAY_CONNECTED="gateway.connected",t.GATEWAY_DISCONNECTED="gateway.disconnected",t.GATEWAY_RECONNECTING="gateway.reconnecting",t.GATEWAY_MESSAGE="gateway.message",t.GATEWAY_ERROR="gateway.error",t.GATEWAY_STATE_PUSH="gateway.state.push",t.CAMERA_PERSON_TEST_RESULT="camera.person.test.result",t.CAMERA_FACE_RECOGNITION_RESULT="camera.face.recognition.result",t.EXPRESSION_SMILE_DETECTED="expression.smile.detected",t.EXPRESSION_SMILE_STATE_CHANGED="expression.smile.state_changed",t.RENDER_READY="render.ready",t.RENDER_ERROR="render.error",t.MODEL_LOAD_PROGRESS="model.load.progress",t.MODEL_LOADED="model.loaded",t.MODEL_LOAD_FAILED="model.load.failed",t.ANIMATION_START="animation.start",t.ANIMATION_END="animation.end",t.ERROR="error"}(We||(We={})),function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSING=2]="CLOSING",t[t.CLOSED=3]="CLOSED"}(Ye||(Ye={})),function(t){t.DISCONNECTED="disconnected",t.CONNECTING="connecting",t.CONNECTED="connected",t.RECONNECTING="reconnecting",t.CLOSED="closed"}(ke||(ke={}));export{E,Ye as W,We as a,Ce as d,ze as m,He as r};