@perceptimagery/dita-configurator-staging 0.3.3001 → 0.3.3002

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* (c) 2023, Abhishek Deb (vikz91.deb@gmail.com) */
2
2
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Work+Sans:wght@200;300;400;500;600;700;800&display=swap";#Sprie-config-html{font-size:87.5%}#Sprie-config-html,#Sprie-config-body{width:100%;height:100%;margin:0;padding:0;font-family:Work Sans,sans-serif;box-sizing:border-box}#Sprie-config-body *{box-sizing:border-box;margin:0;padding:0}.sprie-config-loadingBox{position:fixed;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:24px;font-weight:500;z-index:10000;background:#f2f2f2}#Sprie-config-Main-Container{width:100%;height:100%}#Sprie-config-Header{height:5rem;border-bottom:1.5px solid #aeaeae;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.5rem}#Sprie-config-Header .sprie-config-Header-groupName{color:#373737;font-size:1rem;font-weight:400;line-height:1.5275rem;letter-spacing:-.05rem;text-transform:uppercase}#Sprie-config-Viewer-Container{position:relative;width:100%;img {position: absolute; top: 2rem; left: 2rem;}}.sprie-config-loadingFrame{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:24px;font-weight:500;z-index:1000;background:#fafafa;opacity:.7}.sprie-config-loader{border:8px solid #222222;width:60px;padding:8px;aspect-ratio:1;border-radius:50%;background:#222222;--_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;-webkit-mask:var(--_m);mask:var(--_m);-webkit-mask-composite:source-out;mask-composite:subtract;animation:spin 1s infinite linear}@keyframes spin{to{transform:rotate(1turn)}}#Sprie-config-Customisation-block{height:15.42rem;background-color:#f2f2f2;border-top:1px solid #91847e;position:relative;flex-grow:1}.sprie-config-price-block{position:absolute;right:0;z-index:1000;display:flex;flex-direction:column;align-items:end;gap:.4rem;p {font-size: 1.25rem; font-weight: 500; color: #121212;}}.frameName{color:#4d4d4d;font-size:.875rem;font-weight:500;line-height:1.5275rem;letter-spacing:-.05rem;text-transform:uppercase}.price-tag{color:#222;font-size:1.3125rem;font-weight:400;line-height:2.275rem}@media (max-width: 576px){#Sprie-config-Header{height:5.25rem}#Sprie-config-Viewer-Container{img {position: absolute; top: 1.2rem; left: 1.2rem;}}}.sprie-config-palette{display:flex;gap:1.5rem;justify-content:flex-start;overflow-x:auto}.sprie-config-palette-img-box{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center}.sprie-config-palette-img-box .sprie-config-image{width:60px;height:60px}.sprie-config-palette-img-box .sprie-config-image.mobile-view{width:45px;height:45px}.sprie-config-palette-img-box>button{background-color:transparent}.sprie-config-palette-img-text{position:absolute;z-index:100;bottom:-1rem}.sprie-config-palette-img-text .sprie-config-palette-imgName{white-space:nowrap;z-index:100}.sprie-config-engraving-block{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:.8rem}.sprie-config-engraving-checkbox[type=checkbox]{width:1rem;height:1rem;accent-color:#000;border:.25rem solid #000;border-radius:.5rem;background-color:transparent}.sprie-config-engraving-inputField-block{width:25rem;position:relative}.sprie-config-engraving-inputField{width:100%;font-size:.8rem;font-weight:500;background:transparent;border-width:1px}.sprie-config-engraving-inputInfo{position:absolute;white-space:nowrap;font-size:.6rem;bottom:.2rem;right:.4rem;color:#686868}.sprie-config-engraving-link{position:absolute;white-space:nowrap;font-size:.7rem;bottom:-1.2rem;right:0;color:#686868;text-decoration:underline}@media (max-width: 576px){.sprie-config-engraving-inputField-block{width:70%}}.carousel{position:relative;overflow:hidden;width:100%;height:100%;display:flex;flex-direction:column;align-items:center}.carousel-container{width:80%;display:flex;position:relative;overflow:hidden}.carousel-item{display:flex;align-items:center;justify-content:center;min-width:100%;transition-property:transform;transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.5s}.carousel-header{display:flex;align-items:center;justify-content:center;gap:2rem}.carousel-header .step-syntax{font-size:1rem;font-weight:600;line-height:1.5rem;color:#4d4d4d}.carousel-header .select-syntax{font-size:1rem;font-weight:400;line-height:1.5rem;color:#91847e}.carousel-btn{border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:transparent}.arrow{border:solid #91847e;border-width:0 3px 3px 0;display:inline-block}.right-arrow{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.left-arrow{transform:rotate(135deg);-webkit-transform:rotate(135deg)}.step-tracker-block{display:flex;flex-direction:column;justify-content:center;align-items:center;border-bottom:1px solid #aeaeae;width:26.25rem}.step-tracker{display:flex;gap:1rem}.step-circle{width:10px;height:10px;border-radius:50%;border:1px solid #7d7d7d;background-color:transparent;display:flex;justify-content:center;align-items:center;margin-right:10px;font-size:14px}.step-circle.active{background-color:#000;border-color:#000}@media (max-width: 576px){.carousel-container{width:100%}.step-tracker-block{width:80%}}.sprie-config-add-to-cart-block{width:14.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.5rem}.sprie-config-add-to-cart-btn{width:100%;height:2.75rem;background-color:#000;display:flex;align-items:center;justify-content:center;cursor:pointer;border:0;font-size:.875rem;letter-spacing:.1rem;font-weight:500;color:#fff}#Sprie-Config-return-policy-label{display:flex;justify-content:center;width:14rem;p {font-size: .7rem; text-align: left; margin: .05rem .08rem .05rem .5rem;}}#Sprie-Config-return-policy-checkbox[type=checkbox]{width:1rem;height:1rem;accent-color:#000;border:.25rem solid #000;border-radius:.5rem;background-color:transparent}.sprie-config-add-to-cart-btn:disabled,.sprie-config-add-to-cart-btn [disabled]{background-color:#504f4f;cursor:default}@media (max-width: 576px){.sprie-config-add-to-cart-block{width:100%}.sprie-config-add-to-cart-btn{width:100%;height:4rem}#Sprie-Config-return-policy-label{width:100%;gap:.5rem}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
3
- var iN=Object.defineProperty;var rN=(Ys,Tr,Br)=>Tr in Ys?iN(Ys,Tr,{enumerable:!0,configurable:!0,writable:!0,value:Br}):Ys[Tr]=Br;var Lt=(Ys,Tr,Br)=>(rN(Ys,typeof Tr!="symbol"?Tr+"":Tr,Br),Br);(function(){var Qy,Oy;"use strict";class Ys{constructor(e){Lt(this,"config");this.config=e}IsTokenExpired(){if(!this.config.EXPIRES)return!1;const e=this.config.EXPIRES;if(!e)return!0;const t=new Date().getTime(),r=new Date(e).getTime()-t;return e===""||r<=0}IsConfigExpired(){return this.LoadConfig(),!this.config.JWT||!this.config.ORGID}RequestOptions(e,t){return{method:e,headers:{...{Accept:"application/json","Content-Type":"application/json"},...this.config.JWT&&{Authorization:this.config.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.config.HOST+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.config.HOST+e,this.RequestOptions("POST",t||{}))).json()}StoreConfig(e){e.JWT&&(localStorage.setItem(`${this.config.STORE_PREFIX}jwtToken`,e.JWT),this.config.JWT=e.JWT),e.EXPIRES&&(localStorage.setItem(`${this.config.STORE_PREFIX}expires`,e.EXPIRES),this.config.EXPIRES=e.EXPIRES),e.ORGID&&(localStorage.setItem(`${this.config.STORE_PREFIX}orgId`,e.ORGID),this.config.ORGID=e.ORGID)}LoadConfig(){const e=localStorage.getItem(`${this.config.STORE_PREFIX}jwtToken`);e&&(this.config.JWT=e);const t=localStorage.getItem(`${this.config.STORE_PREFIX}orgId`);t&&(this.config.ORGID=t);const n=localStorage.getItem(`${this.config.STORE_PREFIX}expires`);return n&&(this.config.EXPIRES=n),this.config}}const Tr={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"sprie-embed-",host:"https://api.sprie.io"},Br=Object.freeze(Tr),ux="0.3.3001";function fx(i,e){const t=i.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...i.slice(0,t),...i.slice(t+1)]:i}class hx{constructor(e,t){Lt(this,"isAuthenticated");Lt(this,"fetcher");Lt(this,"shopifyAPI");Lt(this,"org");Lt(this,"apiKey");Lt(this,"dataVariants");this.isAuthenticated=!1,this.fetcher=e,this.shopifyAPI=t,this.dataVariants=[]}async Authenticate(e){if(this.fetcher.LoadConfig(),(this.fetcher.IsTokenExpired()||this.fetcher.IsConfigExpired())&&await this.AuthServiceApi(e),this.isAuthenticated=!(this.fetcher.IsTokenExpired()&&this.fetcher.IsConfigExpired()),this.org=this.fetcher.config.ORGID,this.apiKey=e,!this.isAuthenticated)throw new Error("Sprie Authentication failed!")}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await this.fetcher.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");this.fetcher.StoreConfig({...this.fetcher.config,JWT:n.access,ORGID:n.orgId,EXPIRES:n.expires})}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await this.fetcher.Get(t)}async FetchCustomisationList(e){const t=`/v1/widget/list-customisation?search=type:${e},org:${this.fetcher.config.ORGID},usage:customizer&limit=50`,n=await this.fetcher.Get(t),r=n.data.find(l=>l.sku===`${e.toLowerCase()}-default`);return{...n,data:fx(n.data,r)}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await this.fetcher.Get(t),r=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:r}}catch{throw new Error("Failed to download model asset.")}}async HandleAssetUsage(e){if(!this.fetcher.IsConfigExpired()&&e){const t={org:this.fetcher.config.ORGID,asset:e,timestamp:new Date().toISOString()},n="/v1/analytics/trigger";await this.fetcher.Post(n,t)}}async PopulateDataList(e){var n;const t=(n=document.querySelector(`#${e}`))==null?void 0:n.textContent;if(t){const r=await JSON.parse(t);return Object.values(r)[0]}return null}async HandleShopifyAddToCart(e){e.forEach(r=>{var l;const o=(l=r.properties)==null?void 0:l.customText;o&&(delete r.properties.customText,Object.assign(r.properties,{"custom-laser-etching":"Add Laser Engraving"}),Object.assign(r.properties,{"custom-text":o}),Object.assign(r.properties,{"This customized item cannot be returned or exchanged":"I agree"}))});let t={items:e,sections:"mini-cart"};const n=await this.shopifyAPI.Post(t);if(n){const r=await this.shopifyAPI.Get();document.querySelector("#shopify-section-mini-cart").outerHTML=n.sections["mini-cart"],document.querySelector(".header__cart-count").textContent=r.item_count;const o=document.querySelector(".drawer.drawer--full");o&&o.hasAttribute("open")&&o.removeAttribute("open");const l=document.querySelector(".popover.hidden-lap-and-up.popover-full");l&&l.hasAttribute("open")&&l.removeAttribute("open"),document.querySelector(".mini-cart.drawer.drawer--large").setAttribute("open","")}}}var bh=(i=>(i.Init="init",i.Preparing="preparing",i.Authenticating="authenticating",i.Fetching="fetching",i.Loading="loading",i.Done="done",i))(bh||{});class dx{constructor({log:e,logErr:t,apiService:n,metaData:r,config:o}){Lt(this,"log");Lt(this,"logErr");Lt(this,"metaData");Lt(this,"loaderName");Lt(this,"apiKey");Lt(this,"scriptStreamEncoderId");Lt(this,"rawNodeList");Lt(this,"targetNodeList");Lt(this,"status");Lt(this,"isLoaded");Lt(this,"loadCount");Lt(this,"mutationObserver");Lt(this,"config");Lt(this,"apiService");this.config=o,this.apiService=n,this.metaData=r,this.apiKey=null,this.scriptStreamEncoderId=`sprie-embed🔴${Date.now().toString()}`,this.rawNodeList=document.getElementsByClassName(this.metaData.targetClassName),this.targetNodeList=[],this.status=bh.Init,this.isLoaded=!1,this.loadCount=0,this.loaderName="sprie-embed-loader",this.log=e.bind(this),this.logErr=t.bind(this),this.mutationObserver=null}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey&&(e==null||e.setAttribute("data-enc-stream-id",this.scriptStreamEncoderId))}async authenticate(){if(this.status=bh.Authenticating,!this.apiService.isAuthenticated){if(!this.apiKey)throw new Error("Sprie: Unable to authenticate. Need APIKey.");await this.apiService.Authenticate(this.apiKey),this.apiService.isAuthenticated||this.logErr("Authentication failed! Check apikey and/or expiration.")}}async Init(){try{return this.scanApiKeyFromCurrentScriptTag(),await this.authenticate(),!0}catch(e){return this.log("SprieEmbed Loading failed."),this.logErr(e),this.isLoaded=!1,!1}}}function Ax(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var xm={exports:{}},fl={},Sm={exports:{}},yt={};/**
3
+ var iN=Object.defineProperty;var rN=(Ys,Tr,Br)=>Tr in Ys?iN(Ys,Tr,{enumerable:!0,configurable:!0,writable:!0,value:Br}):Ys[Tr]=Br;var Lt=(Ys,Tr,Br)=>(rN(Ys,typeof Tr!="symbol"?Tr+"":Tr,Br),Br);(function(){var Qy,Oy;"use strict";class Ys{constructor(e){Lt(this,"config");this.config=e}IsTokenExpired(){if(!this.config.EXPIRES)return!1;const e=this.config.EXPIRES;if(!e)return!0;const t=new Date().getTime(),r=new Date(e).getTime()-t;return e===""||r<=0}IsConfigExpired(){return this.LoadConfig(),!this.config.JWT||!this.config.ORGID}RequestOptions(e,t){return{method:e,headers:{...{Accept:"application/json","Content-Type":"application/json"},...this.config.JWT&&{Authorization:this.config.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.config.HOST+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.config.HOST+e,this.RequestOptions("POST",t||{}))).json()}StoreConfig(e){e.JWT&&(localStorage.setItem(`${this.config.STORE_PREFIX}jwtToken`,e.JWT),this.config.JWT=e.JWT),e.EXPIRES&&(localStorage.setItem(`${this.config.STORE_PREFIX}expires`,e.EXPIRES),this.config.EXPIRES=e.EXPIRES),e.ORGID&&(localStorage.setItem(`${this.config.STORE_PREFIX}orgId`,e.ORGID),this.config.ORGID=e.ORGID)}LoadConfig(){const e=localStorage.getItem(`${this.config.STORE_PREFIX}jwtToken`);e&&(this.config.JWT=e);const t=localStorage.getItem(`${this.config.STORE_PREFIX}orgId`);t&&(this.config.ORGID=t);const n=localStorage.getItem(`${this.config.STORE_PREFIX}expires`);return n&&(this.config.EXPIRES=n),this.config}}const Tr={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"sprie-embed-",host:"https://api.sprie.io"},Br=Object.freeze(Tr),ux="0.3.3002";function fx(i,e){const t=i.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...i.slice(0,t),...i.slice(t+1)]:i}class hx{constructor(e,t){Lt(this,"isAuthenticated");Lt(this,"fetcher");Lt(this,"shopifyAPI");Lt(this,"org");Lt(this,"apiKey");Lt(this,"dataVariants");this.isAuthenticated=!1,this.fetcher=e,this.shopifyAPI=t,this.dataVariants=[]}async Authenticate(e){if(this.fetcher.LoadConfig(),(this.fetcher.IsTokenExpired()||this.fetcher.IsConfigExpired())&&await this.AuthServiceApi(e),this.isAuthenticated=!(this.fetcher.IsTokenExpired()&&this.fetcher.IsConfigExpired()),this.org=this.fetcher.config.ORGID,this.apiKey=e,!this.isAuthenticated)throw new Error("Sprie Authentication failed!")}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await this.fetcher.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");this.fetcher.StoreConfig({...this.fetcher.config,JWT:n.access,ORGID:n.orgId,EXPIRES:n.expires})}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await this.fetcher.Get(t)}async FetchCustomisationList(e){const t=`/v1/widget/list-customisation?search=type:${e},org:${this.fetcher.config.ORGID},usage:customizer&limit=50`,n=await this.fetcher.Get(t),r=n.data.find(l=>l.sku===`${e.toLowerCase()}-default`);return{...n,data:fx(n.data,r)}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await this.fetcher.Get(t),r=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:r}}catch{throw new Error("Failed to download model asset.")}}async HandleAssetUsage(e){if(!this.fetcher.IsConfigExpired()&&e){const t={org:this.fetcher.config.ORGID,asset:e,timestamp:new Date().toISOString()},n="/v1/analytics/trigger";await this.fetcher.Post(n,t)}}async PopulateDataList(e){var n;const t=(n=document.querySelector(`#${e}`))==null?void 0:n.textContent;if(t){const r=await JSON.parse(t);return Object.values(r)[0]}return null}async HandleShopifyAddToCart(e){e.forEach(r=>{var l;const o=(l=r.properties)==null?void 0:l.customText;o&&(delete r.properties.customText,Object.assign(r.properties,{"custom-laser-etching":"Add Laser Engraving"}),Object.assign(r.properties,{"custom-text":o}),Object.assign(r.properties,{"This customized item cannot be returned or exchanged":"I agree"}))});let t={items:e,sections:"mini-cart"};const n=await this.shopifyAPI.Post(t);if(n){const r=await this.shopifyAPI.Get();document.querySelector("#shopify-section-mini-cart").outerHTML=n.sections["mini-cart"],document.querySelector(".header__cart-count").textContent=r.item_count;const o=document.querySelector(".drawer.drawer--full");o&&o.hasAttribute("open")&&o.removeAttribute("open");const l=document.querySelector(".popover.hidden-lap-and-up.popover-full");l&&l.hasAttribute("open")&&l.removeAttribute("open"),document.querySelector(".mini-cart.drawer.drawer--large").setAttribute("open","")}}}var bh=(i=>(i.Init="init",i.Preparing="preparing",i.Authenticating="authenticating",i.Fetching="fetching",i.Loading="loading",i.Done="done",i))(bh||{});class dx{constructor({log:e,logErr:t,apiService:n,metaData:r,config:o}){Lt(this,"log");Lt(this,"logErr");Lt(this,"metaData");Lt(this,"loaderName");Lt(this,"apiKey");Lt(this,"scriptStreamEncoderId");Lt(this,"rawNodeList");Lt(this,"targetNodeList");Lt(this,"status");Lt(this,"isLoaded");Lt(this,"loadCount");Lt(this,"mutationObserver");Lt(this,"config");Lt(this,"apiService");this.config=o,this.apiService=n,this.metaData=r,this.apiKey=null,this.scriptStreamEncoderId=`sprie-embed🔴${Date.now().toString()}`,this.rawNodeList=document.getElementsByClassName(this.metaData.targetClassName),this.targetNodeList=[],this.status=bh.Init,this.isLoaded=!1,this.loadCount=0,this.loaderName="sprie-embed-loader",this.log=e.bind(this),this.logErr=t.bind(this),this.mutationObserver=null}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey&&(e==null||e.setAttribute("data-enc-stream-id",this.scriptStreamEncoderId))}async authenticate(){if(this.status=bh.Authenticating,!this.apiService.isAuthenticated){if(!this.apiKey)throw new Error("Sprie: Unable to authenticate. Need APIKey.");await this.apiService.Authenticate(this.apiKey),this.apiService.isAuthenticated||this.logErr("Authentication failed! Check apikey and/or expiration.")}}async Init(){try{return this.scanApiKeyFromCurrentScriptTag(),await this.authenticate(),!0}catch(e){return this.log("SprieEmbed Loading failed."),this.logErr(e),this.isLoaded=!1,!1}}}function Ax(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var xm={exports:{}},fl={},Sm={exports:{}},yt={};/**
4
4
  * @license React
5
5
  * react.production.min.js
6
6
  *
@@ -16,7 +16,7 @@ var iN=Object.defineProperty;var rN=(Ys,Tr,Br)=>Tr in Ys?iN(Ys,Tr,{enumerable:!0
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var Mm;function gx(){if(Mm)return fl;Mm=1;var i=Ct,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,u){var d,p={},A=null,g=null;u!==void 0&&(A=""+u),f.key!==void 0&&(A=""+f.key),f.ref!==void 0&&(g=f.ref);for(d in f)n.call(f,d)&&!o.hasOwnProperty(d)&&(p[d]=f[d]);if(c&&c.defaultProps)for(d in f=c.defaultProps,f)p[d]===void 0&&(p[d]=f[d]);return{$$typeof:e,type:c,key:A,ref:g,props:p,_owner:r.current}}return fl.Fragment=t,fl.jsx=l,fl.jsxs=l,fl}xm.exports=gx();var De=xm.exports;const sN="";var mx=Object.defineProperty,vx=(i,e,t)=>e in i?mx(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ft=(i,e,t)=>(vx(i,typeof e!="symbol"?e+"":e,t),t);const _x={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"3d-configurator-",host:"https://api.sprie.io"},Tm=Object.freeze(_x);class Ex{constructor(e){Ft(this,"baseURL"),Ft(this,"JWT"),this.baseURL=e.baseURL}setJWT(e){this.JWT=e}RequestOptions(e,t){return{method:e,headers:{...{Accept:"application/json","Content-Type":"application/json"},...this.JWT&&{Authorization:this.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.baseURL+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.baseURL+e,this.RequestOptions("POST",t||{}))).json()}}const hl=new Ex({baseURL:Tm.host});function yx(i,e){const t=i.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...i.slice(0,t),...i.slice(t+1)]:i}class Cx{constructor(){}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await hl.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");return n}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await hl.Get(t)}async FetchCustomisationList(){const e="/v1/widget/list-customisation?search=type:Lens,usage:customizer&limit=50",t=await hl.Get(e),n=t.data.find(o=>o.sku==="lens-default");return{...t,data:yx(t.data,n)}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await hl.Get(t),r=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:r}}catch{throw new Error("Failed to download model asset.")}}}const Lh=new Cx;class Ix{constructor(e){Ft(this,"prefix"),this.prefix=e}makeKey(e){return`${this.prefix}${e}`}getItem(e){return localStorage.getItem(this.makeKey(e))}setItem(e,t){return localStorage.setItem(this.makeKey(e),t)}}const dl=new Ix(Tm.storePrefix);class xx{constructor(){Ft(this,"authPayload"),Ft(this,"apiKey"),Ft(this,"isAuthenticated"),this.isAuthenticated=!1,this.authPayload={}}async Init(e){try{return this.apiKey=e,await this.authenticate(),this.isAuthenticated=!0,!0}catch(t){return console.log(t),this.isAuthenticated=!1,!1}}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey}async authenticate(){if(this.isAuthenticated)return;if(!this.apiKey)throw new Error("Spire: Unable to authenticate . Need APIKey.");const e=await Lh.AuthServiceApi(this.apiKey);this.setAuthConfig({EXPIRES:e.expires,JWT:e.access,ORGID:e.orgId})}setAuthConfig(e){e.JWT&&(dl.setItem("jwtToken",e.JWT),this.authPayload.JWT=e.JWT),e.EXPIRES&&(dl.setItem("expires",e.EXPIRES),this.authPayload.EXPIRES=e.EXPIRES),e.ORGID&&(dl.setItem("orgId",e.ORGID),this.authPayload.ORGID=e.ORGID)}LoadConfig(){const e=dl.getItem("jwtToken");e&&(this.authPayload.JWT=e);const t=dl.getItem("orgId");t&&(this.authPayload.ORGID=t);const n=localStorage.getItem("expires");return n&&(this.authPayload.EXPIRES=n),this.authPayload}}var vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sx(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function wx(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return i[n]}})}),t}var Dh={exports:{}},Uo=typeof Reflect=="object"?Reflect:null,Bm=Uo&&typeof Uo.apply=="function"?Uo.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Vc;Uo&&typeof Uo.ownKeys=="function"?Vc=Uo.ownKeys:Object.getOwnPropertySymbols?Vc=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Vc=function(e){return Object.getOwnPropertyNames(e)};function Mx(i){console&&console.warn&&console.warn(i)}var Rm=Number.isNaN||function(e){return e!==e};function Qt(){Qt.init.call(this)}Dh.exports=Qt,Dh.exports.once=bx,Qt.EventEmitter=Qt,Qt.prototype._events=void 0,Qt.prototype._eventsCount=0,Qt.prototype._maxListeners=void 0;var bm=10;function Wc(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(Qt,"defaultMaxListeners",{enumerable:!0,get:function(){return bm},set:function(i){if(typeof i!="number"||i<0||Rm(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");bm=i}}),Qt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Rm(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Lm(i){return i._maxListeners===void 0?Qt.defaultMaxListeners:i._maxListeners}Qt.prototype.getMaxListeners=function(){return Lm(this)},Qt.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r=e==="error",o=this._events;if(o!==void 0)r=r&&o.error===void 0;else if(!r)return!1;if(r){var l;if(t.length>0&&(l=t[0]),l instanceof Error)throw l;var c=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw c.context=l,c}var f=o[e];if(f===void 0)return!1;if(typeof f=="function")Bm(f,this,t);else for(var u=f.length,d=km(f,u),n=0;n<u;++n)Bm(d[n],this,t);return!0};function Dm(i,e,t,n){var r,o,l;if(Wc(t),o=i._events,o===void 0?(o=i._events=Object.create(null),i._eventsCount=0):(o.newListener!==void 0&&(i.emit("newListener",e,t.listener?t.listener:t),o=i._events),l=o[e]),l===void 0)l=o[e]=t,++i._eventsCount;else if(typeof l=="function"?l=o[e]=n?[t,l]:[l,t]:n?l.unshift(t):l.push(t),r=Lm(i),r>0&&l.length>r&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=i,c.type=e,c.count=l.length,Mx(c)}return i}Qt.prototype.addListener=function(e,t){return Dm(this,e,t,!1)},Qt.prototype.on=Qt.prototype.addListener,Qt.prototype.prependListener=function(e,t){return Dm(this,e,t,!0)};function Tx(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Nm(i,e,t){var n={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},r=Tx.bind(n);return r.listener=t,n.wrapFn=r,r}Qt.prototype.once=function(e,t){return Wc(t),this.on(e,Nm(this,e,t)),this},Qt.prototype.prependOnceListener=function(e,t){return Wc(t),this.prependListener(e,Nm(this,e,t)),this},Qt.prototype.removeListener=function(e,t){var n,r,o,l,c;if(Wc(t),r=this._events,r===void 0)return this;if(n=r[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(o=-1,l=n.length-1;l>=0;l--)if(n[l]===t||n[l].listener===t){c=n[l].listener,o=l;break}if(o<0)return this;o===0?n.shift():Bx(n,o),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",e,c||t)}return this},Qt.prototype.off=Qt.prototype.removeListener,Qt.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),l;for(r=0;r<o.length;++r)l=o[r],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function Pm(i,e,t){var n=i._events;if(n===void 0)return[];var r=n[e];return r===void 0?[]:typeof r=="function"?t?[r.listener||r]:[r]:t?Rx(r):km(r,r.length)}Qt.prototype.listeners=function(e){return Pm(this,e,!0)},Qt.prototype.rawListeners=function(e){return Pm(this,e,!1)},Qt.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):Um.call(i,e)},Qt.prototype.listenerCount=Um;function Um(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Qt.prototype.eventNames=function(){return this._eventsCount>0?Vc(this._events):[]};function km(i,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=i[n];return t}function Bx(i,e){for(;e+1<i.length;e++)i[e]=i[e+1];i.pop()}function Rx(i){for(var e=new Array(i.length),t=0;t<e.length;++t)e[t]=i[t].listener||i[t];return e}function bx(i,e){return new Promise(function(t,n){function r(l){i.removeListener(e,o),n(l)}function o(){typeof i.removeListener=="function"&&i.removeListener("error",r),t([].slice.call(arguments))}Fm(i,e,o,{once:!0}),e!=="error"&&Lx(i,r,{once:!0})})}function Lx(i,e,t){typeof i.on=="function"&&Fm(i,"error",e,t)}function Fm(i,e,t,n){if(typeof i.on=="function")n.once?i.once(e,t):i.on(e,t);else if(typeof i.addEventListener=="function")i.addEventListener(e,function r(o){n.once&&i.removeEventListener(e,r),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var Dx=Dh.exports;const Qm=class Im extends Dx.EventEmitter{emitEvent(e,t){Object.keys(Im.EVENTS).includes(e)&&this.emit(Im.EVENTS[e],t)}};Ft(Qm,"EVENTS",{onAddToCart:"add-to-cart"});let Nx=Qm;var Om={exports:{}};function Px(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nh={exports:{}};const Ux=wx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zm;function xt(){return zm||(zm=1,function(i,e){(function(t,n){i.exports=n()})(vt,function(){var t=t||function(n,r){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof vt<"u"&&vt.crypto&&(o=vt.crypto),!o&&typeof Px=="function")try{o=Ux}catch{}var l=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||function(){function S(){}return function(y){var x;return S.prototype=y,x=new S,S.prototype=null,x}}(),f={},u=f.lib={},d=u.Base=function(){return{extend:function(S){var y=c(this);return S&&y.mixIn(S),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var y in S)S.hasOwnProperty(y)&&(this[y]=S[y]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=u.WordArray=d.extend({init:function(S,y){S=this.words=S||[],y!=r?this.sigBytes=y:this.sigBytes=S.length*4},toString:function(S){return(S||g).stringify(this)},concat:function(S){var y=this.words,x=S.words,w=this.sigBytes,b=S.sigBytes;if(this.clamp(),w%4)for(var B=0;B<b;B++){var L=x[B>>>2]>>>24-B%4*8&255;y[w+B>>>2]|=L<<24-(w+B)%4*8}else for(var R=0;R<b;R+=4)y[w+R>>>2]=x[R>>>2];return this.sigBytes+=b,this},clamp:function(){var S=this.words,y=this.sigBytes;S[y>>>2]&=4294967295<<32-y%4*8,S.length=n.ceil(y/4)},clone:function(){var S=d.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var y=[],x=0;x<S;x+=4)y.push(l());return new p.init(y,S)}}),A=f.enc={},g=A.Hex={stringify:function(S){for(var y=S.words,x=S.sigBytes,w=[],b=0;b<x;b++){var B=y[b>>>2]>>>24-b%4*8&255;w.push((B>>>4).toString(16)),w.push((B&15).toString(16))}return w.join("")},parse:function(S){for(var y=S.length,x=[],w=0;w<y;w+=2)x[w>>>3]|=parseInt(S.substr(w,2),16)<<24-w%8*4;return new p.init(x,y/2)}},E=A.Latin1={stringify:function(S){for(var y=S.words,x=S.sigBytes,w=[],b=0;b<x;b++){var B=y[b>>>2]>>>24-b%4*8&255;w.push(String.fromCharCode(B))}return w.join("")},parse:function(S){for(var y=S.length,x=[],w=0;w<y;w++)x[w>>>2]|=(S.charCodeAt(w)&255)<<24-w%4*8;return new p.init(x,y)}},C=A.Utf8={stringify:function(S){try{return decodeURIComponent(escape(E.stringify(S)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(S){return E.parse(unescape(encodeURIComponent(S)))}},_=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=C.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var y,x=this._data,w=x.words,b=x.sigBytes,B=this.blockSize,L=B*4,R=b/L;S?R=n.ceil(R):R=n.max((R|0)-this._minBufferSize,0);var T=R*B,N=n.min(T*4,b);if(T){for(var k=0;k<T;k+=B)this._doProcessBlock(w,k);y=w.splice(0,T),x.sigBytes-=N}return new p.init(y,N)},clone:function(){var S=d.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});u.Hasher=_.extend({cfg:d.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(S){return function(y,x){return new S.init(x).finalize(y)}},_createHmacHelper:function(S){return function(y,x){return new v.HMAC.init(S,x).finalize(y)}}});var v=f.algo={};return f}(Math);return t})}(Nh)),Nh.exports}var Ph={exports:{}},Gm;function jc(){return Gm||(Gm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.Base,c=o.WordArray,f=r.x64={};f.Word=l.extend({init:function(u,d){this.high=u,this.low=d}}),f.WordArray=l.extend({init:function(u,d){u=this.words=u||[],d!=n?this.sigBytes=d:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,d=u.length,p=[],A=0;A<d;A++){var g=u[A];p.push(g.high),p.push(g.low)}return c.create(p,this.sigBytes)},clone:function(){for(var u=l.clone.call(this),d=u.words=this.words.slice(0),p=d.length,A=0;A<p;A++)d[A]=d[A].clone();return u}})}(),t})}(Ph)),Ph.exports}var Uh={exports:{}},Hm;function kx(){return Hm||(Hm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,r=n.lib,o=r.WordArray,l=o.init,c=o.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var u=f.byteLength,d=[],p=0;p<u;p++)d[p>>>2]|=f[p]<<24-p%4*8;l.call(this,d,u)}else l.apply(this,arguments)};c.prototype=o}}(),t.lib.WordArray})}(Uh)),Uh.exports}var kh={exports:{}},Vm;function Fx(){return Vm||(Vm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.enc;l.Utf16=l.Utf16BE={stringify:function(f){for(var u=f.words,d=f.sigBytes,p=[],A=0;A<d;A+=2){var g=u[A>>>2]>>>16-A%4*8&65535;p.push(String.fromCharCode(g))}return p.join("")},parse:function(f){for(var u=f.length,d=[],p=0;p<u;p++)d[p>>>1]|=f.charCodeAt(p)<<16-p%2*16;return o.create(d,u*2)}},l.Utf16LE={stringify:function(f){for(var u=f.words,d=f.sigBytes,p=[],A=0;A<d;A+=2){var g=c(u[A>>>2]>>>16-A%4*8&65535);p.push(String.fromCharCode(g))}return p.join("")},parse:function(f){for(var u=f.length,d=[],p=0;p<u;p++)d[p>>>1]|=c(f.charCodeAt(p)<<16-p%2*16);return o.create(d,u*2)}};function c(f){return f<<8&4278255360|f>>>8&16711935}}(),t.enc.Utf16})}(kh)),kh.exports}var Fh={exports:{}},Wm;function qs(){return Wm||(Wm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.enc;l.Base64={stringify:function(f){var u=f.words,d=f.sigBytes,p=this._map;f.clamp();for(var A=[],g=0;g<d;g+=3)for(var E=u[g>>>2]>>>24-g%4*8&255,C=u[g+1>>>2]>>>24-(g+1)%4*8&255,_=u[g+2>>>2]>>>24-(g+2)%4*8&255,v=E<<16|C<<8|_,S=0;S<4&&g+S*.75<d;S++)A.push(p.charAt(v>>>6*(3-S)&63));var y=p.charAt(64);if(y)for(;A.length%4;)A.push(y);return A.join("")},parse:function(f){var u=f.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var A=0;A<d.length;A++)p[d.charCodeAt(A)]=A}var g=d.charAt(64);if(g){var E=f.indexOf(g);E!==-1&&(u=E)}return c(f,u,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(f,u,d){for(var p=[],A=0,g=0;g<u;g++)if(g%4){var E=d[f.charCodeAt(g-1)]<<g%4*2,C=d[f.charCodeAt(g)]>>>6-g%4*2,_=E|C;p[A>>>2]|=_<<24-A%4*8,A++}return o.create(p,A)}}(),t.enc.Base64})}(Fh)),Fh.exports}var Qh={exports:{}},jm;function Qx(){return jm||(jm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.enc;l.Base64url={stringify:function(f,u){u===void 0&&(u=!0);var d=f.words,p=f.sigBytes,A=u?this._safe_map:this._map;f.clamp();for(var g=[],E=0;E<p;E+=3)for(var C=d[E>>>2]>>>24-E%4*8&255,_=d[E+1>>>2]>>>24-(E+1)%4*8&255,v=d[E+2>>>2]>>>24-(E+2)%4*8&255,S=C<<16|_<<8|v,y=0;y<4&&E+y*.75<p;y++)g.push(A.charAt(S>>>6*(3-y)&63));var x=A.charAt(64);if(x)for(;g.length%4;)g.push(x);return g.join("")},parse:function(f,u){u===void 0&&(u=!0);var d=f.length,p=u?this._safe_map:this._map,A=this._reverseMap;if(!A){A=this._reverseMap=[];for(var g=0;g<p.length;g++)A[p.charCodeAt(g)]=g}var E=p.charAt(64);if(E){var C=f.indexOf(E);C!==-1&&(d=C)}return c(f,d,A)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(f,u,d){for(var p=[],A=0,g=0;g<u;g++)if(g%4){var E=d[f.charCodeAt(g-1)]<<g%4*2,C=d[f.charCodeAt(g)]>>>6-g%4*2,_=E|C;p[A>>>2]|=_<<24-A%4*8,A++}return o.create(p,A)}}(),t.enc.Base64url})}(Qh)),Qh.exports}var Oh={exports:{}},Ym;function Xs(){return Ym||(Ym=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.WordArray,c=o.Hasher,f=r.algo,u=[];(function(){for(var C=0;C<64;C++)u[C]=n.abs(n.sin(C+1))*4294967296|0})();var d=f.MD5=c.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,_){for(var v=0;v<16;v++){var S=_+v,y=C[S];C[S]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var x=this._hash.words,w=C[_+0],b=C[_+1],B=C[_+2],L=C[_+3],R=C[_+4],T=C[_+5],N=C[_+6],k=C[_+7],O=C[_+8],F=C[_+9],V=C[_+10],X=C[_+11],te=C[_+12],Y=C[_+13],$=C[_+14],U=C[_+15],D=x[0],G=x[1],K=x[2],J=x[3];D=p(D,G,K,J,w,7,u[0]),J=p(J,D,G,K,b,12,u[1]),K=p(K,J,D,G,B,17,u[2]),G=p(G,K,J,D,L,22,u[3]),D=p(D,G,K,J,R,7,u[4]),J=p(J,D,G,K,T,12,u[5]),K=p(K,J,D,G,N,17,u[6]),G=p(G,K,J,D,k,22,u[7]),D=p(D,G,K,J,O,7,u[8]),J=p(J,D,G,K,F,12,u[9]),K=p(K,J,D,G,V,17,u[10]),G=p(G,K,J,D,X,22,u[11]),D=p(D,G,K,J,te,7,u[12]),J=p(J,D,G,K,Y,12,u[13]),K=p(K,J,D,G,$,17,u[14]),G=p(G,K,J,D,U,22,u[15]),D=A(D,G,K,J,b,5,u[16]),J=A(J,D,G,K,N,9,u[17]),K=A(K,J,D,G,X,14,u[18]),G=A(G,K,J,D,w,20,u[19]),D=A(D,G,K,J,T,5,u[20]),J=A(J,D,G,K,V,9,u[21]),K=A(K,J,D,G,U,14,u[22]),G=A(G,K,J,D,R,20,u[23]),D=A(D,G,K,J,F,5,u[24]),J=A(J,D,G,K,$,9,u[25]),K=A(K,J,D,G,L,14,u[26]),G=A(G,K,J,D,O,20,u[27]),D=A(D,G,K,J,Y,5,u[28]),J=A(J,D,G,K,B,9,u[29]),K=A(K,J,D,G,k,14,u[30]),G=A(G,K,J,D,te,20,u[31]),D=g(D,G,K,J,T,4,u[32]),J=g(J,D,G,K,O,11,u[33]),K=g(K,J,D,G,X,16,u[34]),G=g(G,K,J,D,$,23,u[35]),D=g(D,G,K,J,b,4,u[36]),J=g(J,D,G,K,R,11,u[37]),K=g(K,J,D,G,k,16,u[38]),G=g(G,K,J,D,V,23,u[39]),D=g(D,G,K,J,Y,4,u[40]),J=g(J,D,G,K,w,11,u[41]),K=g(K,J,D,G,L,16,u[42]),G=g(G,K,J,D,N,23,u[43]),D=g(D,G,K,J,F,4,u[44]),J=g(J,D,G,K,te,11,u[45]),K=g(K,J,D,G,U,16,u[46]),G=g(G,K,J,D,B,23,u[47]),D=E(D,G,K,J,w,6,u[48]),J=E(J,D,G,K,k,10,u[49]),K=E(K,J,D,G,$,15,u[50]),G=E(G,K,J,D,T,21,u[51]),D=E(D,G,K,J,te,6,u[52]),J=E(J,D,G,K,L,10,u[53]),K=E(K,J,D,G,V,15,u[54]),G=E(G,K,J,D,b,21,u[55]),D=E(D,G,K,J,O,6,u[56]),J=E(J,D,G,K,U,10,u[57]),K=E(K,J,D,G,N,15,u[58]),G=E(G,K,J,D,Y,21,u[59]),D=E(D,G,K,J,R,6,u[60]),J=E(J,D,G,K,X,10,u[61]),K=E(K,J,D,G,B,15,u[62]),G=E(G,K,J,D,F,21,u[63]),x[0]=x[0]+D|0,x[1]=x[1]+G|0,x[2]=x[2]+K|0,x[3]=x[3]+J|0},_doFinalize:function(){var C=this._data,_=C.words,v=this._nDataBytes*8,S=C.sigBytes*8;_[S>>>5]|=128<<24-S%32;var y=n.floor(v/4294967296),x=v;_[(S+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,_[(S+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,C.sigBytes=(_.length+1)*4,this._process();for(var w=this._hash,b=w.words,B=0;B<4;B++){var L=b[B];b[B]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}return w},clone:function(){var C=c.clone.call(this);return C._hash=this._hash.clone(),C}});function p(C,_,v,S,y,x,w){var b=C+(_&v|~_&S)+y+w;return(b<<x|b>>>32-x)+_}function A(C,_,v,S,y,x,w){var b=C+(_&S|v&~S)+y+w;return(b<<x|b>>>32-x)+_}function g(C,_,v,S,y,x,w){var b=C+(_^v^S)+y+w;return(b<<x|b>>>32-x)+_}function E(C,_,v,S,y,x,w){var b=C+(v^(_|~S))+y+w;return(b<<x|b>>>32-x)+_}r.MD5=c._createHelper(d),r.HmacMD5=c._createHmacHelper(d)}(Math),t.MD5})}(Oh)),Oh.exports}var zh={exports:{}},qm;function Xm(){return qm||(qm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=r.Hasher,c=n.algo,f=[],u=c.SHA1=l.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,p){for(var A=this._hash.words,g=A[0],E=A[1],C=A[2],_=A[3],v=A[4],S=0;S<80;S++){if(S<16)f[S]=d[p+S]|0;else{var y=f[S-3]^f[S-8]^f[S-14]^f[S-16];f[S]=y<<1|y>>>31}var x=(g<<5|g>>>27)+v+f[S];S<20?x+=(E&C|~E&_)+1518500249:S<40?x+=(E^C^_)+1859775393:S<60?x+=(E&C|E&_|C&_)-1894007588:x+=(E^C^_)-899497514,v=_,_=C,C=E<<30|E>>>2,E=g,g=x}A[0]=A[0]+g|0,A[1]=A[1]+E|0,A[2]=A[2]+C|0,A[3]=A[3]+_|0,A[4]=A[4]+v|0},_doFinalize:function(){var d=this._data,p=d.words,A=this._nDataBytes*8,g=d.sigBytes*8;return p[g>>>5]|=128<<24-g%32,p[(g+64>>>9<<4)+14]=Math.floor(A/4294967296),p[(g+64>>>9<<4)+15]=A,d.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var d=l.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA1=l._createHelper(u),n.HmacSHA1=l._createHmacHelper(u)}(),t.SHA1})}(zh)),zh.exports}var Gh={exports:{}},Km;function Hh(){return Km||(Km=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.WordArray,c=o.Hasher,f=r.algo,u=[],d=[];(function(){function g(v){for(var S=n.sqrt(v),y=2;y<=S;y++)if(!(v%y))return!1;return!0}function E(v){return(v-(v|0))*4294967296|0}for(var C=2,_=0;_<64;)g(C)&&(_<8&&(u[_]=E(n.pow(C,1/2))),d[_]=E(n.pow(C,1/3)),_++),C++})();var p=[],A=f.SHA256=c.extend({_doReset:function(){this._hash=new l.init(u.slice(0))},_doProcessBlock:function(g,E){for(var C=this._hash.words,_=C[0],v=C[1],S=C[2],y=C[3],x=C[4],w=C[5],b=C[6],B=C[7],L=0;L<64;L++){if(L<16)p[L]=g[E+L]|0;else{var R=p[L-15],T=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,N=p[L-2],k=(N<<15|N>>>17)^(N<<13|N>>>19)^N>>>10;p[L]=T+p[L-7]+k+p[L-16]}var O=x&w^~x&b,F=_&v^_&S^v&S,V=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),X=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),te=B+X+O+d[L]+p[L],Y=V+F;B=b,b=w,w=x,x=y+te|0,y=S,S=v,v=_,_=te+Y|0}C[0]=C[0]+_|0,C[1]=C[1]+v|0,C[2]=C[2]+S|0,C[3]=C[3]+y|0,C[4]=C[4]+x|0,C[5]=C[5]+w|0,C[6]=C[6]+b|0,C[7]=C[7]+B|0},_doFinalize:function(){var g=this._data,E=g.words,C=this._nDataBytes*8,_=g.sigBytes*8;return E[_>>>5]|=128<<24-_%32,E[(_+64>>>9<<4)+14]=n.floor(C/4294967296),E[(_+64>>>9<<4)+15]=C,g.sigBytes=E.length*4,this._process(),this._hash},clone:function(){var g=c.clone.call(this);return g._hash=this._hash.clone(),g}});r.SHA256=c._createHelper(A),r.HmacSHA256=c._createHmacHelper(A)}(Math),t.SHA256})}(Gh)),Gh.exports}var Vh={exports:{}},Jm;function Ox(){return Jm||(Jm=1,function(i,e){(function(t,n,r){i.exports=n(xt(),Hh())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.algo,c=l.SHA256,f=l.SHA224=c.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=c._doFinalize.call(this);return u.sigBytes-=4,u}});n.SHA224=c._createHelper(f),n.HmacSHA224=c._createHmacHelper(f)}(),t.SHA224})}(Vh)),Vh.exports}var Wh={exports:{}},Zm;function $m(){return Zm||(Zm=1,function(i,e){(function(t,n,r){i.exports=n(xt(),jc())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.Hasher,l=n.x64,c=l.Word,f=l.WordArray,u=n.algo;function d(){return c.create.apply(c,arguments)}var p=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],A=[];(function(){for(var E=0;E<80;E++)A[E]=d()})();var g=u.SHA512=o.extend({_doReset:function(){this._hash=new f.init([new c.init(1779033703,4089235720),new c.init(3144134277,2227873595),new c.init(1013904242,4271175723),new c.init(2773480762,1595750129),new c.init(1359893119,2917565137),new c.init(2600822924,725511199),new c.init(528734635,4215389547),new c.init(1541459225,327033209)])},_doProcessBlock:function(E,C){for(var _=this._hash.words,v=_[0],S=_[1],y=_[2],x=_[3],w=_[4],b=_[5],B=_[6],L=_[7],R=v.high,T=v.low,N=S.high,k=S.low,O=y.high,F=y.low,V=x.high,X=x.low,te=w.high,Y=w.low,$=b.high,U=b.low,D=B.high,G=B.low,K=L.high,J=L.low,Ae=R,ge=T,be=N,de=k,Oe=O,It=F,ot=V,oe=X,Mt=te,Ne=Y,Ze=$,_e=U,it=D,Ue=G,He=K,$e=J,lt=0;lt<80;lt++){var mt,H,Q=A[lt];if(lt<16)H=Q.high=E[C+lt*2]|0,mt=Q.low=E[C+lt*2+1]|0;else{var se=A[lt-15],Ce=se.high,me=se.low,xe=(Ce>>>1|me<<31)^(Ce>>>8|me<<24)^Ce>>>7,We=(me>>>1|Ce<<31)^(me>>>8|Ce<<24)^(me>>>7|Ce<<25),Se=A[lt-2],Re=Se.high,q=Se.low,Me=(Re>>>19|q<<13)^(Re<<3|q>>>29)^Re>>>6,pe=(q>>>19|Re<<13)^(q<<3|Re>>>29)^(q>>>6|Re<<26),nt=A[lt-7],je=nt.high,Je=nt.low,Ge=A[lt-16],Pe=Ge.high,dt=Ge.low;mt=We+Je,H=xe+je+(mt>>>0<We>>>0?1:0),mt=mt+pe,H=H+Me+(mt>>>0<pe>>>0?1:0),mt=mt+dt,H=H+Pe+(mt>>>0<dt>>>0?1:0),Q.high=H,Q.low=mt}var ee=Mt&Ze^~Mt&it,Te=Ne&_e^~Ne&Ue,ye=Ae&be^Ae&Oe^be&Oe,he=ge&de^ge&It^de&It,we=(Ae>>>28|ge<<4)^(Ae<<30|ge>>>2)^(Ae<<25|ge>>>7),qe=(ge>>>28|Ae<<4)^(ge<<30|Ae>>>2)^(ge<<25|Ae>>>7),At=(Mt>>>14|Ne<<18)^(Mt>>>18|Ne<<14)^(Mt<<23|Ne>>>9),Wt=(Ne>>>14|Mt<<18)^(Ne>>>18|Mt<<14)^(Ne<<23|Mt>>>9),Dn=p[lt],Tt=Dn.high,an=Dn.low,Pt=$e+Wt,Ti=He+At+(Pt>>>0<$e>>>0?1:0),Pt=Pt+Te,Ti=Ti+ee+(Pt>>>0<Te>>>0?1:0),Pt=Pt+an,Ti=Ti+Tt+(Pt>>>0<an>>>0?1:0),Pt=Pt+mt,Ti=Ti+H+(Pt>>>0<mt>>>0?1:0),Cr=qe+he,ir=we+ye+(Cr>>>0<qe>>>0?1:0);He=it,$e=Ue,it=Ze,Ue=_e,Ze=Mt,_e=Ne,Ne=oe+Pt|0,Mt=ot+Ti+(Ne>>>0<oe>>>0?1:0)|0,ot=Oe,oe=It,Oe=be,It=de,be=Ae,de=ge,ge=Pt+Cr|0,Ae=Ti+ir+(ge>>>0<Pt>>>0?1:0)|0}T=v.low=T+ge,v.high=R+Ae+(T>>>0<ge>>>0?1:0),k=S.low=k+de,S.high=N+be+(k>>>0<de>>>0?1:0),F=y.low=F+It,y.high=O+Oe+(F>>>0<It>>>0?1:0),X=x.low=X+oe,x.high=V+ot+(X>>>0<oe>>>0?1:0),Y=w.low=Y+Ne,w.high=te+Mt+(Y>>>0<Ne>>>0?1:0),U=b.low=U+_e,b.high=$+Ze+(U>>>0<_e>>>0?1:0),G=B.low=G+Ue,B.high=D+it+(G>>>0<Ue>>>0?1:0),J=L.low=J+$e,L.high=K+He+(J>>>0<$e>>>0?1:0)},_doFinalize:function(){var E=this._data,C=E.words,_=this._nDataBytes*8,v=E.sigBytes*8;C[v>>>5]|=128<<24-v%32,C[(v+128>>>10<<5)+30]=Math.floor(_/4294967296),C[(v+128>>>10<<5)+31]=_,E.sigBytes=C.length*4,this._process();var S=this._hash.toX32();return S},clone:function(){var E=o.clone.call(this);return E._hash=this._hash.clone(),E},blockSize:1024/32});n.SHA512=o._createHelper(g),n.HmacSHA512=o._createHmacHelper(g)}(),t.SHA512})}(Wh)),Wh.exports}var jh={exports:{}},e0;function zx(){return e0||(e0=1,function(i,e){(function(t,n,r){i.exports=n(xt(),jc(),$m())})(vt,function(t){return function(){var n=t,r=n.x64,o=r.Word,l=r.WordArray,c=n.algo,f=c.SHA512,u=c.SHA384=f.extend({_doReset:function(){this._hash=new l.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var d=f._doFinalize.call(this);return d.sigBytes-=16,d}});n.SHA384=f._createHelper(u),n.HmacSHA384=f._createHmacHelper(u)}(),t.SHA384})}(jh)),jh.exports}var Yh={exports:{}},t0;function Gx(){return t0||(t0=1,function(i,e){(function(t,n,r){i.exports=n(xt(),jc())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.WordArray,c=o.Hasher,f=r.x64,u=f.Word,d=r.algo,p=[],A=[],g=[];(function(){for(var _=1,v=0,S=0;S<24;S++){p[_+5*v]=(S+1)*(S+2)/2%64;var y=v%5,x=(2*_+3*v)%5;_=y,v=x}for(var _=0;_<5;_++)for(var v=0;v<5;v++)A[_+5*v]=v+(2*_+3*v)%5*5;for(var w=1,b=0;b<24;b++){for(var B=0,L=0,R=0;R<7;R++){if(w&1){var T=(1<<R)-1;T<32?L^=1<<T:B^=1<<T-32}w&128?w=w<<1^113:w<<=1}g[b]=u.create(B,L)}})();var E=[];(function(){for(var _=0;_<25;_++)E[_]=u.create()})();var C=d.SHA3=c.extend({cfg:c.cfg.extend({outputLength:512}),_doReset:function(){for(var _=this._state=[],v=0;v<25;v++)_[v]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(_,v){for(var S=this._state,y=this.blockSize/2,x=0;x<y;x++){var w=_[v+2*x],b=_[v+2*x+1];w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;var B=S[x];B.high^=b,B.low^=w}for(var L=0;L<24;L++){for(var R=0;R<5;R++){for(var T=0,N=0,k=0;k<5;k++){var B=S[R+5*k];T^=B.high,N^=B.low}var O=E[R];O.high=T,O.low=N}for(var R=0;R<5;R++)for(var F=E[(R+4)%5],V=E[(R+1)%5],X=V.high,te=V.low,T=F.high^(X<<1|te>>>31),N=F.low^(te<<1|X>>>31),k=0;k<5;k++){var B=S[R+5*k];B.high^=T,B.low^=N}for(var Y=1;Y<25;Y++){var T,N,B=S[Y],$=B.high,U=B.low,D=p[Y];D<32?(T=$<<D|U>>>32-D,N=U<<D|$>>>32-D):(T=U<<D-32|$>>>64-D,N=$<<D-32|U>>>64-D);var G=E[A[Y]];G.high=T,G.low=N}var K=E[0],J=S[0];K.high=J.high,K.low=J.low;for(var R=0;R<5;R++)for(var k=0;k<5;k++){var Y=R+5*k,B=S[Y],Ae=E[Y],ge=E[(R+1)%5+5*k],be=E[(R+2)%5+5*k];B.high=Ae.high^~ge.high&be.high,B.low=Ae.low^~ge.low&be.low}var B=S[0],de=g[L];B.high^=de.high,B.low^=de.low}},_doFinalize:function(){var _=this._data,v=_.words;this._nDataBytes*8;var S=_.sigBytes*8,y=this.blockSize*32;v[S>>>5]|=1<<24-S%32,v[(n.ceil((S+1)/y)*y>>>5)-1]|=128,_.sigBytes=v.length*4,this._process();for(var x=this._state,w=this.cfg.outputLength/8,b=w/8,B=[],L=0;L<b;L++){var R=x[L],T=R.high,N=R.low;T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,N=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360,B.push(N),B.push(T)}return new l.init(B,w)},clone:function(){for(var _=c.clone.call(this),v=_._state=this._state.slice(0),S=0;S<25;S++)v[S]=v[S].clone();return _}});r.SHA3=c._createHelper(C),r.HmacSHA3=c._createHmacHelper(C)}(Math),t.SHA3})}(Yh)),Yh.exports}var qh={exports:{}},n0;function Hx(){return n0||(n0=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){/** @preserve
19
+ */var Mm;function gx(){if(Mm)return fl;Mm=1;var i=Ct,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,u){var d,p={},A=null,g=null;u!==void 0&&(A=""+u),f.key!==void 0&&(A=""+f.key),f.ref!==void 0&&(g=f.ref);for(d in f)n.call(f,d)&&!o.hasOwnProperty(d)&&(p[d]=f[d]);if(c&&c.defaultProps)for(d in f=c.defaultProps,f)p[d]===void 0&&(p[d]=f[d]);return{$$typeof:e,type:c,key:A,ref:g,props:p,_owner:r.current}}return fl.Fragment=t,fl.jsx=l,fl.jsxs=l,fl}xm.exports=gx();var De=xm.exports;const sN="";var mx=Object.defineProperty,vx=(i,e,t)=>e in i?mx(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ft=(i,e,t)=>(vx(i,typeof e!="symbol"?e+"":e,t),t);const _x={storePrefix:{NODE_ENV:"production"}.STORE_PREFIX||"3d-configurator-",host:"https://api.sprie.io"},Tm=Object.freeze(_x);class Ex{constructor(e){Ft(this,"baseURL"),Ft(this,"JWT"),this.baseURL=e.baseURL}setJWT(e){this.JWT=e}RequestOptions(e,t){return{method:e,headers:{...{Accept:"application/json","Content-Type":"application/json"},...this.JWT&&{Authorization:this.JWT}},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(e){return await(await fetch(this.baseURL+e,this.RequestOptions("GET"))).json()}async Post(e,t){return await(await fetch(this.baseURL+e,this.RequestOptions("POST",t||{}))).json()}}const hl=new Ex({baseURL:Tm.host});function yx(i,e){const t=i.findIndex(n=>n.sku===e.sku);return t!==-1?[e,...i.slice(0,t),...i.slice(t+1)]:i}class Cx{constructor(){}async AuthServiceApi(e){const t=`/v1/widget/auth?api=${e}`,n=await hl.Get(t);if(!n.access||!n.orgId)throw new Error("SPRIE key Not Authorised");return n}async FetchAssetBySKUOrBarcode(e){let t="/v1/widget/variants/";if(e.barcode)t+=`${e.barcode}`;else if(e.sku)t+=`${e.sku}`;else throw new Error("Need either sku or barcode.");return t+="?populate-customisation=true",await hl.Get(t)}async FetchCustomisationList(){const e="/v1/widget/list-customisation?search=type:Lens,usage:customizer&limit=50",t=await hl.Get(e),n=t.data.find(o=>o.sku==="lens-default");return{...t,data:yx(t.data,n)}}async DownloadMA(e){try{const t=`/v1/widget/org/${e.orgId}/asset/${e.assetsId}/universal-full-encrypted`,n=await hl.Get(t),r=`org/${e.orgId}/asset/${e.assetsId}`;if(!n)throw new Error("Failed to download model asset.");return{asset:n,decryptionKey:r}}catch{throw new Error("Failed to download model asset.")}}}const Lh=new Cx;class Ix{constructor(e){Ft(this,"prefix"),this.prefix=e}makeKey(e){return`${this.prefix}${e}`}getItem(e){return localStorage.getItem(this.makeKey(e))}setItem(e,t){return localStorage.setItem(this.makeKey(e),t)}}const dl=new Ix(Tm.storePrefix);class xx{constructor(){Ft(this,"authPayload"),Ft(this,"apiKey"),Ft(this,"isAuthenticated"),this.isAuthenticated=!1,this.authPayload={}}async Init(e){try{return this.apiKey=e,await this.authenticate(),this.isAuthenticated=!0,!0}catch(t){return console.log(t),this.isAuthenticated=!1,!1}}scanApiKeyFromCurrentScriptTag(){const e=document.currentScript;if(!e)return;const t=e==null?void 0:e.getAttribute("src");if(!t)return;const n=new URLSearchParams(t.substring(t.indexOf("?")));this.apiKey=(n==null?void 0:n.get("apikey"))||(n==null?void 0:n.get("apiKey")),this.apiKey}async authenticate(){if(this.isAuthenticated)return;if(!this.apiKey)throw new Error("Spire: Unable to authenticate . Need APIKey.");const e=await Lh.AuthServiceApi(this.apiKey);this.setAuthConfig({EXPIRES:e.expires,JWT:e.access,ORGID:e.orgId})}setAuthConfig(e){e.JWT&&(dl.setItem("jwtToken",e.JWT),this.authPayload.JWT=e.JWT),e.EXPIRES&&(dl.setItem("expires",e.EXPIRES),this.authPayload.EXPIRES=e.EXPIRES),e.ORGID&&(dl.setItem("orgId",e.ORGID),this.authPayload.ORGID=e.ORGID)}LoadConfig(){const e=dl.getItem("jwtToken");e&&(this.authPayload.JWT=e);const t=dl.getItem("orgId");t&&(this.authPayload.ORGID=t);const n=localStorage.getItem("expires");return n&&(this.authPayload.EXPIRES=n),this.authPayload}}var vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sx(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function wx(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return i[n]}})}),t}var Dh={exports:{}},Uo=typeof Reflect=="object"?Reflect:null,Bm=Uo&&typeof Uo.apply=="function"?Uo.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Vc;Uo&&typeof Uo.ownKeys=="function"?Vc=Uo.ownKeys:Object.getOwnPropertySymbols?Vc=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Vc=function(e){return Object.getOwnPropertyNames(e)};function Mx(i){console&&console.warn&&console.warn(i)}var Rm=Number.isNaN||function(e){return e!==e};function Qt(){Qt.init.call(this)}Dh.exports=Qt,Dh.exports.once=bx,Qt.EventEmitter=Qt,Qt.prototype._events=void 0,Qt.prototype._eventsCount=0,Qt.prototype._maxListeners=void 0;var bm=10;function Wc(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(Qt,"defaultMaxListeners",{enumerable:!0,get:function(){return bm},set:function(i){if(typeof i!="number"||i<0||Rm(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");bm=i}}),Qt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Qt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Rm(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Lm(i){return i._maxListeners===void 0?Qt.defaultMaxListeners:i._maxListeners}Qt.prototype.getMaxListeners=function(){return Lm(this)},Qt.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r=e==="error",o=this._events;if(o!==void 0)r=r&&o.error===void 0;else if(!r)return!1;if(r){var l;if(t.length>0&&(l=t[0]),l instanceof Error)throw l;var c=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw c.context=l,c}var f=o[e];if(f===void 0)return!1;if(typeof f=="function")Bm(f,this,t);else for(var u=f.length,d=km(f,u),n=0;n<u;++n)Bm(d[n],this,t);return!0};function Dm(i,e,t,n){var r,o,l;if(Wc(t),o=i._events,o===void 0?(o=i._events=Object.create(null),i._eventsCount=0):(o.newListener!==void 0&&(i.emit("newListener",e,t.listener?t.listener:t),o=i._events),l=o[e]),l===void 0)l=o[e]=t,++i._eventsCount;else if(typeof l=="function"?l=o[e]=n?[t,l]:[l,t]:n?l.unshift(t):l.push(t),r=Lm(i),r>0&&l.length>r&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=i,c.type=e,c.count=l.length,Mx(c)}return i}Qt.prototype.addListener=function(e,t){return Dm(this,e,t,!1)},Qt.prototype.on=Qt.prototype.addListener,Qt.prototype.prependListener=function(e,t){return Dm(this,e,t,!0)};function Tx(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Nm(i,e,t){var n={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},r=Tx.bind(n);return r.listener=t,n.wrapFn=r,r}Qt.prototype.once=function(e,t){return Wc(t),this.on(e,Nm(this,e,t)),this},Qt.prototype.prependOnceListener=function(e,t){return Wc(t),this.prependListener(e,Nm(this,e,t)),this},Qt.prototype.removeListener=function(e,t){var n,r,o,l,c;if(Wc(t),r=this._events,r===void 0)return this;if(n=r[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(o=-1,l=n.length-1;l>=0;l--)if(n[l]===t||n[l].listener===t){c=n[l].listener,o=l;break}if(o<0)return this;o===0?n.shift():Bx(n,o),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",e,c||t)}return this},Qt.prototype.off=Qt.prototype.removeListener,Qt.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),l;for(r=0;r<o.length;++r)l=o[r],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function Pm(i,e,t){var n=i._events;if(n===void 0)return[];var r=n[e];return r===void 0?[]:typeof r=="function"?t?[r.listener||r]:[r]:t?Rx(r):km(r,r.length)}Qt.prototype.listeners=function(e){return Pm(this,e,!0)},Qt.prototype.rawListeners=function(e){return Pm(this,e,!1)},Qt.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):Um.call(i,e)},Qt.prototype.listenerCount=Um;function Um(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Qt.prototype.eventNames=function(){return this._eventsCount>0?Vc(this._events):[]};function km(i,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=i[n];return t}function Bx(i,e){for(;e+1<i.length;e++)i[e]=i[e+1];i.pop()}function Rx(i){for(var e=new Array(i.length),t=0;t<e.length;++t)e[t]=i[t].listener||i[t];return e}function bx(i,e){return new Promise(function(t,n){function r(l){i.removeListener(e,o),n(l)}function o(){typeof i.removeListener=="function"&&i.removeListener("error",r),t([].slice.call(arguments))}Fm(i,e,o,{once:!0}),e!=="error"&&Lx(i,r,{once:!0})})}function Lx(i,e,t){typeof i.on=="function"&&Fm(i,"error",e,t)}function Fm(i,e,t,n){if(typeof i.on=="function")n.once?i.once(e,t):i.on(e,t);else if(typeof i.addEventListener=="function")i.addEventListener(e,function r(o){n.once&&i.removeEventListener(e,r),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var Dx=Dh.exports;const Qm=class Im extends Dx.EventEmitter{emitEvent(e,t){Object.keys(Im.EVENTS).includes(e)&&this.emit(Im.EVENTS[e],t)}};Ft(Qm,"EVENTS",{onAddToCart:"add-to-cart"});let Nx=Qm;var Om={exports:{}};function Px(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nh={exports:{}};const Ux=wx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zm;function xt(){return zm||(zm=1,function(i,e){(function(t,n){i.exports=n()})(vt,function(){var t=t||function(n,r){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof vt<"u"&&vt.crypto&&(o=vt.crypto),!o&&typeof Px=="function")try{o=Ux}catch{}var l=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||function(){function S(){}return function(y){var x;return S.prototype=y,x=new S,S.prototype=null,x}}(),f={},u=f.lib={},d=u.Base=function(){return{extend:function(S){var y=c(this);return S&&y.mixIn(S),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var y in S)S.hasOwnProperty(y)&&(this[y]=S[y]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=u.WordArray=d.extend({init:function(S,y){S=this.words=S||[],y!=r?this.sigBytes=y:this.sigBytes=S.length*4},toString:function(S){return(S||g).stringify(this)},concat:function(S){var y=this.words,x=S.words,w=this.sigBytes,b=S.sigBytes;if(this.clamp(),w%4)for(var B=0;B<b;B++){var L=x[B>>>2]>>>24-B%4*8&255;y[w+B>>>2]|=L<<24-(w+B)%4*8}else for(var R=0;R<b;R+=4)y[w+R>>>2]=x[R>>>2];return this.sigBytes+=b,this},clamp:function(){var S=this.words,y=this.sigBytes;S[y>>>2]&=4294967295<<32-y%4*8,S.length=n.ceil(y/4)},clone:function(){var S=d.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var y=[],x=0;x<S;x+=4)y.push(l());return new p.init(y,S)}}),A=f.enc={},g=A.Hex={stringify:function(S){for(var y=S.words,x=S.sigBytes,w=[],b=0;b<x;b++){var B=y[b>>>2]>>>24-b%4*8&255;w.push((B>>>4).toString(16)),w.push((B&15).toString(16))}return w.join("")},parse:function(S){for(var y=S.length,x=[],w=0;w<y;w+=2)x[w>>>3]|=parseInt(S.substr(w,2),16)<<24-w%8*4;return new p.init(x,y/2)}},E=A.Latin1={stringify:function(S){for(var y=S.words,x=S.sigBytes,w=[],b=0;b<x;b++){var B=y[b>>>2]>>>24-b%4*8&255;w.push(String.fromCharCode(B))}return w.join("")},parse:function(S){for(var y=S.length,x=[],w=0;w<y;w++)x[w>>>2]|=(S.charCodeAt(w)&255)<<24-w%4*8;return new p.init(x,y)}},C=A.Utf8={stringify:function(S){try{return decodeURIComponent(escape(E.stringify(S)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(S){return E.parse(unescape(encodeURIComponent(S)))}},_=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=C.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var y,x=this._data,w=x.words,b=x.sigBytes,B=this.blockSize,L=B*4,R=b/L;S?R=n.ceil(R):R=n.max((R|0)-this._minBufferSize,0);var T=R*B,N=n.min(T*4,b);if(T){for(var k=0;k<T;k+=B)this._doProcessBlock(w,k);y=w.splice(0,T),x.sigBytes-=N}return new p.init(y,N)},clone:function(){var S=d.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});u.Hasher=_.extend({cfg:d.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(S){return function(y,x){return new S.init(x).finalize(y)}},_createHmacHelper:function(S){return function(y,x){return new v.HMAC.init(S,x).finalize(y)}}});var v=f.algo={};return f}(Math);return t})}(Nh)),Nh.exports}var Ph={exports:{}},Gm;function jc(){return Gm||(Gm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.Base,c=o.WordArray,f=r.x64={};f.Word=l.extend({init:function(u,d){this.high=u,this.low=d}}),f.WordArray=l.extend({init:function(u,d){u=this.words=u||[],d!=n?this.sigBytes=d:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,d=u.length,p=[],A=0;A<d;A++){var g=u[A];p.push(g.high),p.push(g.low)}return c.create(p,this.sigBytes)},clone:function(){for(var u=l.clone.call(this),d=u.words=this.words.slice(0),p=d.length,A=0;A<p;A++)d[A]=d[A].clone();return u}})}(),t})}(Ph)),Ph.exports}var Uh={exports:{}},Hm;function kx(){return Hm||(Hm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,r=n.lib,o=r.WordArray,l=o.init,c=o.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var u=f.byteLength,d=[],p=0;p<u;p++)d[p>>>2]|=f[p]<<24-p%4*8;l.call(this,d,u)}else l.apply(this,arguments)};c.prototype=o}}(),t.lib.WordArray})}(Uh)),Uh.exports}var kh={exports:{}},Vm;function Fx(){return Vm||(Vm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.enc;l.Utf16=l.Utf16BE={stringify:function(f){for(var u=f.words,d=f.sigBytes,p=[],A=0;A<d;A+=2){var g=u[A>>>2]>>>16-A%4*8&65535;p.push(String.fromCharCode(g))}return p.join("")},parse:function(f){for(var u=f.length,d=[],p=0;p<u;p++)d[p>>>1]|=f.charCodeAt(p)<<16-p%2*16;return o.create(d,u*2)}},l.Utf16LE={stringify:function(f){for(var u=f.words,d=f.sigBytes,p=[],A=0;A<d;A+=2){var g=c(u[A>>>2]>>>16-A%4*8&65535);p.push(String.fromCharCode(g))}return p.join("")},parse:function(f){for(var u=f.length,d=[],p=0;p<u;p++)d[p>>>1]|=c(f.charCodeAt(p)<<16-p%2*16);return o.create(d,u*2)}};function c(f){return f<<8&4278255360|f>>>8&16711935}}(),t.enc.Utf16})}(kh)),kh.exports}var Fh={exports:{}},Wm;function qs(){return Wm||(Wm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.enc;l.Base64={stringify:function(f){var u=f.words,d=f.sigBytes,p=this._map;f.clamp();for(var A=[],g=0;g<d;g+=3)for(var E=u[g>>>2]>>>24-g%4*8&255,C=u[g+1>>>2]>>>24-(g+1)%4*8&255,_=u[g+2>>>2]>>>24-(g+2)%4*8&255,v=E<<16|C<<8|_,S=0;S<4&&g+S*.75<d;S++)A.push(p.charAt(v>>>6*(3-S)&63));var y=p.charAt(64);if(y)for(;A.length%4;)A.push(y);return A.join("")},parse:function(f){var u=f.length,d=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var A=0;A<d.length;A++)p[d.charCodeAt(A)]=A}var g=d.charAt(64);if(g){var E=f.indexOf(g);E!==-1&&(u=E)}return c(f,u,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(f,u,d){for(var p=[],A=0,g=0;g<u;g++)if(g%4){var E=d[f.charCodeAt(g-1)]<<g%4*2,C=d[f.charCodeAt(g)]>>>6-g%4*2,_=E|C;p[A>>>2]|=_<<24-A%4*8,A++}return o.create(p,A)}}(),t.enc.Base64})}(Fh)),Fh.exports}var Qh={exports:{}},jm;function Qx(){return jm||(jm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.enc;l.Base64url={stringify:function(f,u){u===void 0&&(u=!0);var d=f.words,p=f.sigBytes,A=u?this._safe_map:this._map;f.clamp();for(var g=[],E=0;E<p;E+=3)for(var C=d[E>>>2]>>>24-E%4*8&255,_=d[E+1>>>2]>>>24-(E+1)%4*8&255,v=d[E+2>>>2]>>>24-(E+2)%4*8&255,S=C<<16|_<<8|v,y=0;y<4&&E+y*.75<p;y++)g.push(A.charAt(S>>>6*(3-y)&63));var x=A.charAt(64);if(x)for(;g.length%4;)g.push(x);return g.join("")},parse:function(f,u){u===void 0&&(u=!0);var d=f.length,p=u?this._safe_map:this._map,A=this._reverseMap;if(!A){A=this._reverseMap=[];for(var g=0;g<p.length;g++)A[p.charCodeAt(g)]=g}var E=p.charAt(64);if(E){var C=f.indexOf(E);C!==-1&&(d=C)}return c(f,d,A)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(f,u,d){for(var p=[],A=0,g=0;g<u;g++)if(g%4){var E=d[f.charCodeAt(g-1)]<<g%4*2,C=d[f.charCodeAt(g)]>>>6-g%4*2,_=E|C;p[A>>>2]|=_<<24-A%4*8,A++}return o.create(p,A)}}(),t.enc.Base64url})}(Qh)),Qh.exports}var Oh={exports:{}},Ym;function Xs(){return Ym||(Ym=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.WordArray,c=o.Hasher,f=r.algo,u=[];(function(){for(var C=0;C<64;C++)u[C]=n.abs(n.sin(C+1))*4294967296|0})();var d=f.MD5=c.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,_){for(var v=0;v<16;v++){var S=_+v,y=C[S];C[S]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var x=this._hash.words,w=C[_+0],b=C[_+1],B=C[_+2],L=C[_+3],R=C[_+4],T=C[_+5],N=C[_+6],k=C[_+7],O=C[_+8],F=C[_+9],V=C[_+10],X=C[_+11],te=C[_+12],Y=C[_+13],$=C[_+14],U=C[_+15],D=x[0],G=x[1],K=x[2],J=x[3];D=p(D,G,K,J,w,7,u[0]),J=p(J,D,G,K,b,12,u[1]),K=p(K,J,D,G,B,17,u[2]),G=p(G,K,J,D,L,22,u[3]),D=p(D,G,K,J,R,7,u[4]),J=p(J,D,G,K,T,12,u[5]),K=p(K,J,D,G,N,17,u[6]),G=p(G,K,J,D,k,22,u[7]),D=p(D,G,K,J,O,7,u[8]),J=p(J,D,G,K,F,12,u[9]),K=p(K,J,D,G,V,17,u[10]),G=p(G,K,J,D,X,22,u[11]),D=p(D,G,K,J,te,7,u[12]),J=p(J,D,G,K,Y,12,u[13]),K=p(K,J,D,G,$,17,u[14]),G=p(G,K,J,D,U,22,u[15]),D=A(D,G,K,J,b,5,u[16]),J=A(J,D,G,K,N,9,u[17]),K=A(K,J,D,G,X,14,u[18]),G=A(G,K,J,D,w,20,u[19]),D=A(D,G,K,J,T,5,u[20]),J=A(J,D,G,K,V,9,u[21]),K=A(K,J,D,G,U,14,u[22]),G=A(G,K,J,D,R,20,u[23]),D=A(D,G,K,J,F,5,u[24]),J=A(J,D,G,K,$,9,u[25]),K=A(K,J,D,G,L,14,u[26]),G=A(G,K,J,D,O,20,u[27]),D=A(D,G,K,J,Y,5,u[28]),J=A(J,D,G,K,B,9,u[29]),K=A(K,J,D,G,k,14,u[30]),G=A(G,K,J,D,te,20,u[31]),D=g(D,G,K,J,T,4,u[32]),J=g(J,D,G,K,O,11,u[33]),K=g(K,J,D,G,X,16,u[34]),G=g(G,K,J,D,$,23,u[35]),D=g(D,G,K,J,b,4,u[36]),J=g(J,D,G,K,R,11,u[37]),K=g(K,J,D,G,k,16,u[38]),G=g(G,K,J,D,V,23,u[39]),D=g(D,G,K,J,Y,4,u[40]),J=g(J,D,G,K,w,11,u[41]),K=g(K,J,D,G,L,16,u[42]),G=g(G,K,J,D,N,23,u[43]),D=g(D,G,K,J,F,4,u[44]),J=g(J,D,G,K,te,11,u[45]),K=g(K,J,D,G,U,16,u[46]),G=g(G,K,J,D,B,23,u[47]),D=E(D,G,K,J,w,6,u[48]),J=E(J,D,G,K,k,10,u[49]),K=E(K,J,D,G,$,15,u[50]),G=E(G,K,J,D,T,21,u[51]),D=E(D,G,K,J,te,6,u[52]),J=E(J,D,G,K,L,10,u[53]),K=E(K,J,D,G,V,15,u[54]),G=E(G,K,J,D,b,21,u[55]),D=E(D,G,K,J,O,6,u[56]),J=E(J,D,G,K,U,10,u[57]),K=E(K,J,D,G,N,15,u[58]),G=E(G,K,J,D,Y,21,u[59]),D=E(D,G,K,J,R,6,u[60]),J=E(J,D,G,K,X,10,u[61]),K=E(K,J,D,G,B,15,u[62]),G=E(G,K,J,D,F,21,u[63]),x[0]=x[0]+D|0,x[1]=x[1]+G|0,x[2]=x[2]+K|0,x[3]=x[3]+J|0},_doFinalize:function(){var C=this._data,_=C.words,v=this._nDataBytes*8,S=C.sigBytes*8;_[S>>>5]|=128<<24-S%32;var y=n.floor(v/4294967296),x=v;_[(S+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,_[(S+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,C.sigBytes=(_.length+1)*4,this._process();for(var w=this._hash,b=w.words,B=0;B<4;B++){var L=b[B];b[B]=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360}return w},clone:function(){var C=c.clone.call(this);return C._hash=this._hash.clone(),C}});function p(C,_,v,S,y,x,w){var b=C+(_&v|~_&S)+y+w;return(b<<x|b>>>32-x)+_}function A(C,_,v,S,y,x,w){var b=C+(_&S|v&~S)+y+w;return(b<<x|b>>>32-x)+_}function g(C,_,v,S,y,x,w){var b=C+(_^v^S)+y+w;return(b<<x|b>>>32-x)+_}function E(C,_,v,S,y,x,w){var b=C+(v^(_|~S))+y+w;return(b<<x|b>>>32-x)+_}r.MD5=c._createHelper(d),r.HmacMD5=c._createHmacHelper(d)}(Math),t.MD5})}(Oh)),Oh.exports}var zh={exports:{}},qm;function Xm(){return qm||(qm=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=r.Hasher,c=n.algo,f=[],u=c.SHA1=l.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,p){for(var A=this._hash.words,g=A[0],E=A[1],C=A[2],_=A[3],v=A[4],S=0;S<80;S++){if(S<16)f[S]=d[p+S]|0;else{var y=f[S-3]^f[S-8]^f[S-14]^f[S-16];f[S]=y<<1|y>>>31}var x=(g<<5|g>>>27)+v+f[S];S<20?x+=(E&C|~E&_)+1518500249:S<40?x+=(E^C^_)+1859775393:S<60?x+=(E&C|E&_|C&_)-1894007588:x+=(E^C^_)-899497514,v=_,_=C,C=E<<30|E>>>2,E=g,g=x}A[0]=A[0]+g|0,A[1]=A[1]+E|0,A[2]=A[2]+C|0,A[3]=A[3]+_|0,A[4]=A[4]+v|0},_doFinalize:function(){var d=this._data,p=d.words,A=this._nDataBytes*8,g=d.sigBytes*8;return p[g>>>5]|=128<<24-g%32,p[(g+64>>>9<<4)+14]=Math.floor(A/4294967296),p[(g+64>>>9<<4)+15]=A,d.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var d=l.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA1=l._createHelper(u),n.HmacSHA1=l._createHmacHelper(u)}(),t.SHA1})}(zh)),zh.exports}var Gh={exports:{}},Km;function Hh(){return Km||(Km=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.WordArray,c=o.Hasher,f=r.algo,u=[],d=[];(function(){function g(v){for(var S=n.sqrt(v),y=2;y<=S;y++)if(!(v%y))return!1;return!0}function E(v){return(v-(v|0))*4294967296|0}for(var C=2,_=0;_<64;)g(C)&&(_<8&&(u[_]=E(n.pow(C,1/2))),d[_]=E(n.pow(C,1/3)),_++),C++})();var p=[],A=f.SHA256=c.extend({_doReset:function(){this._hash=new l.init(u.slice(0))},_doProcessBlock:function(g,E){for(var C=this._hash.words,_=C[0],v=C[1],S=C[2],y=C[3],x=C[4],w=C[5],b=C[6],B=C[7],L=0;L<64;L++){if(L<16)p[L]=g[E+L]|0;else{var R=p[L-15],T=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,N=p[L-2],k=(N<<15|N>>>17)^(N<<13|N>>>19)^N>>>10;p[L]=T+p[L-7]+k+p[L-16]}var O=x&w^~x&b,F=_&v^_&S^v&S,V=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),X=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),te=B+X+O+d[L]+p[L],Y=V+F;B=b,b=w,w=x,x=y+te|0,y=S,S=v,v=_,_=te+Y|0}C[0]=C[0]+_|0,C[1]=C[1]+v|0,C[2]=C[2]+S|0,C[3]=C[3]+y|0,C[4]=C[4]+x|0,C[5]=C[5]+w|0,C[6]=C[6]+b|0,C[7]=C[7]+B|0},_doFinalize:function(){var g=this._data,E=g.words,C=this._nDataBytes*8,_=g.sigBytes*8;return E[_>>>5]|=128<<24-_%32,E[(_+64>>>9<<4)+14]=n.floor(C/4294967296),E[(_+64>>>9<<4)+15]=C,g.sigBytes=E.length*4,this._process(),this._hash},clone:function(){var g=c.clone.call(this);return g._hash=this._hash.clone(),g}});r.SHA256=c._createHelper(A),r.HmacSHA256=c._createHmacHelper(A)}(Math),t.SHA256})}(Gh)),Gh.exports}var Vh={exports:{}},Jm;function Ox(){return Jm||(Jm=1,function(i,e){(function(t,n,r){i.exports=n(xt(),Hh())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.WordArray,l=n.algo,c=l.SHA256,f=l.SHA224=c.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=c._doFinalize.call(this);return u.sigBytes-=4,u}});n.SHA224=c._createHelper(f),n.HmacSHA224=c._createHmacHelper(f)}(),t.SHA224})}(Vh)),Vh.exports}var Wh={exports:{}},Zm;function $m(){return Zm||(Zm=1,function(i,e){(function(t,n,r){i.exports=n(xt(),jc())})(vt,function(t){return function(){var n=t,r=n.lib,o=r.Hasher,l=n.x64,c=l.Word,f=l.WordArray,u=n.algo;function d(){return c.create.apply(c,arguments)}var p=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],A=[];(function(){for(var E=0;E<80;E++)A[E]=d()})();var g=u.SHA512=o.extend({_doReset:function(){this._hash=new f.init([new c.init(1779033703,4089235720),new c.init(3144134277,2227873595),new c.init(1013904242,4271175723),new c.init(2773480762,1595750129),new c.init(1359893119,2917565137),new c.init(2600822924,725511199),new c.init(528734635,4215389547),new c.init(1541459225,327033209)])},_doProcessBlock:function(E,C){for(var _=this._hash.words,v=_[0],S=_[1],y=_[2],x=_[3],w=_[4],b=_[5],B=_[6],L=_[7],R=v.high,T=v.low,N=S.high,k=S.low,O=y.high,F=y.low,V=x.high,X=x.low,te=w.high,Y=w.low,$=b.high,U=b.low,D=B.high,G=B.low,K=L.high,J=L.low,Ae=R,ge=T,be=N,de=k,Oe=O,It=F,ot=V,oe=X,Mt=te,Ne=Y,Ze=$,_e=U,it=D,Ue=G,He=K,$e=J,at=0;at<80;at++){var At,H,Q=A[at];if(at<16)H=Q.high=E[C+at*2]|0,At=Q.low=E[C+at*2+1]|0;else{var se=A[at-15],Ce=se.high,me=se.low,xe=(Ce>>>1|me<<31)^(Ce>>>8|me<<24)^Ce>>>7,We=(me>>>1|Ce<<31)^(me>>>8|Ce<<24)^(me>>>7|Ce<<25),Se=A[at-2],Re=Se.high,q=Se.low,Me=(Re>>>19|q<<13)^(Re<<3|q>>>29)^Re>>>6,pe=(q>>>19|Re<<13)^(q<<3|Re>>>29)^(q>>>6|Re<<26),nt=A[at-7],je=nt.high,Je=nt.low,Ge=A[at-16],Pe=Ge.high,dt=Ge.low;At=We+Je,H=xe+je+(At>>>0<We>>>0?1:0),At=At+pe,H=H+Me+(At>>>0<pe>>>0?1:0),At=At+dt,H=H+Pe+(At>>>0<dt>>>0?1:0),Q.high=H,Q.low=At}var ee=Mt&Ze^~Mt&it,Te=Ne&_e^~Ne&Ue,ye=Ae&be^Ae&Oe^be&Oe,he=ge&de^ge&It^de&It,we=(Ae>>>28|ge<<4)^(Ae<<30|ge>>>2)^(Ae<<25|ge>>>7),qe=(ge>>>28|Ae<<4)^(ge<<30|Ae>>>2)^(ge<<25|Ae>>>7),pt=(Mt>>>14|Ne<<18)^(Mt>>>18|Ne<<14)^(Mt<<23|Ne>>>9),Wt=(Ne>>>14|Mt<<18)^(Ne>>>18|Mt<<14)^(Ne<<23|Mt>>>9),Dn=p[at],Tt=Dn.high,an=Dn.low,Pt=$e+Wt,Ti=He+pt+(Pt>>>0<$e>>>0?1:0),Pt=Pt+Te,Ti=Ti+ee+(Pt>>>0<Te>>>0?1:0),Pt=Pt+an,Ti=Ti+Tt+(Pt>>>0<an>>>0?1:0),Pt=Pt+At,Ti=Ti+H+(Pt>>>0<At>>>0?1:0),Cr=qe+he,ir=we+ye+(Cr>>>0<qe>>>0?1:0);He=it,$e=Ue,it=Ze,Ue=_e,Ze=Mt,_e=Ne,Ne=oe+Pt|0,Mt=ot+Ti+(Ne>>>0<oe>>>0?1:0)|0,ot=Oe,oe=It,Oe=be,It=de,be=Ae,de=ge,ge=Pt+Cr|0,Ae=Ti+ir+(ge>>>0<Pt>>>0?1:0)|0}T=v.low=T+ge,v.high=R+Ae+(T>>>0<ge>>>0?1:0),k=S.low=k+de,S.high=N+be+(k>>>0<de>>>0?1:0),F=y.low=F+It,y.high=O+Oe+(F>>>0<It>>>0?1:0),X=x.low=X+oe,x.high=V+ot+(X>>>0<oe>>>0?1:0),Y=w.low=Y+Ne,w.high=te+Mt+(Y>>>0<Ne>>>0?1:0),U=b.low=U+_e,b.high=$+Ze+(U>>>0<_e>>>0?1:0),G=B.low=G+Ue,B.high=D+it+(G>>>0<Ue>>>0?1:0),J=L.low=J+$e,L.high=K+He+(J>>>0<$e>>>0?1:0)},_doFinalize:function(){var E=this._data,C=E.words,_=this._nDataBytes*8,v=E.sigBytes*8;C[v>>>5]|=128<<24-v%32,C[(v+128>>>10<<5)+30]=Math.floor(_/4294967296),C[(v+128>>>10<<5)+31]=_,E.sigBytes=C.length*4,this._process();var S=this._hash.toX32();return S},clone:function(){var E=o.clone.call(this);return E._hash=this._hash.clone(),E},blockSize:1024/32});n.SHA512=o._createHelper(g),n.HmacSHA512=o._createHmacHelper(g)}(),t.SHA512})}(Wh)),Wh.exports}var jh={exports:{}},e0;function zx(){return e0||(e0=1,function(i,e){(function(t,n,r){i.exports=n(xt(),jc(),$m())})(vt,function(t){return function(){var n=t,r=n.x64,o=r.Word,l=r.WordArray,c=n.algo,f=c.SHA512,u=c.SHA384=f.extend({_doReset:function(){this._hash=new l.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var d=f._doFinalize.call(this);return d.sigBytes-=16,d}});n.SHA384=f._createHelper(u),n.HmacSHA384=f._createHmacHelper(u)}(),t.SHA384})}(jh)),jh.exports}var Yh={exports:{}},t0;function Gx(){return t0||(t0=1,function(i,e){(function(t,n,r){i.exports=n(xt(),jc())})(vt,function(t){return function(n){var r=t,o=r.lib,l=o.WordArray,c=o.Hasher,f=r.x64,u=f.Word,d=r.algo,p=[],A=[],g=[];(function(){for(var _=1,v=0,S=0;S<24;S++){p[_+5*v]=(S+1)*(S+2)/2%64;var y=v%5,x=(2*_+3*v)%5;_=y,v=x}for(var _=0;_<5;_++)for(var v=0;v<5;v++)A[_+5*v]=v+(2*_+3*v)%5*5;for(var w=1,b=0;b<24;b++){for(var B=0,L=0,R=0;R<7;R++){if(w&1){var T=(1<<R)-1;T<32?L^=1<<T:B^=1<<T-32}w&128?w=w<<1^113:w<<=1}g[b]=u.create(B,L)}})();var E=[];(function(){for(var _=0;_<25;_++)E[_]=u.create()})();var C=d.SHA3=c.extend({cfg:c.cfg.extend({outputLength:512}),_doReset:function(){for(var _=this._state=[],v=0;v<25;v++)_[v]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(_,v){for(var S=this._state,y=this.blockSize/2,x=0;x<y;x++){var w=_[v+2*x],b=_[v+2*x+1];w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;var B=S[x];B.high^=b,B.low^=w}for(var L=0;L<24;L++){for(var R=0;R<5;R++){for(var T=0,N=0,k=0;k<5;k++){var B=S[R+5*k];T^=B.high,N^=B.low}var O=E[R];O.high=T,O.low=N}for(var R=0;R<5;R++)for(var F=E[(R+4)%5],V=E[(R+1)%5],X=V.high,te=V.low,T=F.high^(X<<1|te>>>31),N=F.low^(te<<1|X>>>31),k=0;k<5;k++){var B=S[R+5*k];B.high^=T,B.low^=N}for(var Y=1;Y<25;Y++){var T,N,B=S[Y],$=B.high,U=B.low,D=p[Y];D<32?(T=$<<D|U>>>32-D,N=U<<D|$>>>32-D):(T=U<<D-32|$>>>64-D,N=$<<D-32|U>>>64-D);var G=E[A[Y]];G.high=T,G.low=N}var K=E[0],J=S[0];K.high=J.high,K.low=J.low;for(var R=0;R<5;R++)for(var k=0;k<5;k++){var Y=R+5*k,B=S[Y],Ae=E[Y],ge=E[(R+1)%5+5*k],be=E[(R+2)%5+5*k];B.high=Ae.high^~ge.high&be.high,B.low=Ae.low^~ge.low&be.low}var B=S[0],de=g[L];B.high^=de.high,B.low^=de.low}},_doFinalize:function(){var _=this._data,v=_.words;this._nDataBytes*8;var S=_.sigBytes*8,y=this.blockSize*32;v[S>>>5]|=1<<24-S%32,v[(n.ceil((S+1)/y)*y>>>5)-1]|=128,_.sigBytes=v.length*4,this._process();for(var x=this._state,w=this.cfg.outputLength/8,b=w/8,B=[],L=0;L<b;L++){var R=x[L],T=R.high,N=R.low;T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,N=(N<<8|N>>>24)&16711935|(N<<24|N>>>8)&4278255360,B.push(N),B.push(T)}return new l.init(B,w)},clone:function(){for(var _=c.clone.call(this),v=_._state=this._state.slice(0),S=0;S<25;S++)v[S]=v[S].clone();return _}});r.SHA3=c._createHelper(C),r.HmacSHA3=c._createHmacHelper(C)}(Math),t.SHA3})}(Yh)),Yh.exports}var qh={exports:{}},n0;function Hx(){return n0||(n0=1,function(i,e){(function(t,n){i.exports=n(xt())})(vt,function(t){/** @preserve
20
20
  (c) 2012 by Cédric Mesnil. All rights reserved.
21
21
 
22
22
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -2396,7 +2396,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,L4=`#ifdef USE_TRANSMISS
2396
2396
  worldPosition = instanceMatrix * worldPosition;
2397
2397
  #endif
2398
2398
  worldPosition = modelMatrix * worldPosition;
2399
- #endif`;const gt={alphahash_fragment:z3,alphahash_pars_fragment:G3,alphamap_fragment:H3,alphamap_pars_fragment:V3,alphatest_fragment:W3,alphatest_pars_fragment:j3,aomap_fragment:Y3,aomap_pars_fragment:q3,begin_vertex:X3,beginnormal_vertex:K3,bsdfs:J3,iridescence_fragment:Z3,bumpmap_pars_fragment:$3,clipping_planes_fragment:eT,clipping_planes_pars_fragment:tT,clipping_planes_pars_vertex:nT,clipping_planes_vertex:iT,color_fragment:rT,color_pars_fragment:sT,color_pars_vertex:oT,color_vertex:aT,common:lT,cube_uv_reflection_fragment:cT,defaultnormal_vertex:uT,displacementmap_pars_vertex:fT,displacementmap_vertex:hT,emissivemap_fragment:dT,emissivemap_pars_fragment:AT,colorspace_fragment:pT,colorspace_pars_fragment:gT,envmap_fragment:mT,envmap_common_pars_fragment:vT,envmap_pars_fragment:_T,envmap_pars_vertex:ET,envmap_physical_pars_fragment:LT,envmap_vertex:yT,fog_vertex:CT,fog_pars_vertex:IT,fog_fragment:xT,fog_pars_fragment:ST,gradientmap_pars_fragment:wT,lightmap_fragment:MT,lightmap_pars_fragment:TT,lights_lambert_fragment:BT,lights_lambert_pars_fragment:RT,lights_pars_begin:bT,lights_toon_fragment:DT,lights_toon_pars_fragment:NT,lights_phong_fragment:PT,lights_phong_pars_fragment:UT,lights_physical_fragment:kT,lights_physical_pars_fragment:FT,lights_fragment_begin:QT,lights_fragment_maps:OT,lights_fragment_end:zT,logdepthbuf_fragment:GT,logdepthbuf_pars_fragment:HT,logdepthbuf_pars_vertex:VT,logdepthbuf_vertex:WT,map_fragment:jT,map_pars_fragment:YT,map_particle_fragment:qT,map_particle_pars_fragment:XT,metalnessmap_fragment:KT,metalnessmap_pars_fragment:JT,morphcolor_vertex:ZT,morphnormal_vertex:$T,morphtarget_pars_vertex:e4,morphtarget_vertex:t4,normal_fragment_begin:n4,normal_fragment_maps:i4,normal_pars_fragment:r4,normal_pars_vertex:s4,normal_vertex:o4,normalmap_pars_fragment:a4,clearcoat_normal_fragment_begin:l4,clearcoat_normal_fragment_maps:c4,clearcoat_pars_fragment:u4,iridescence_pars_fragment:f4,opaque_fragment:h4,packing:d4,premultiplied_alpha_fragment:A4,project_vertex:p4,dithering_fragment:g4,dithering_pars_fragment:m4,roughnessmap_fragment:v4,roughnessmap_pars_fragment:_4,shadowmap_pars_fragment:E4,shadowmap_pars_vertex:y4,shadowmap_vertex:C4,shadowmask_pars_fragment:I4,skinbase_vertex:x4,skinning_pars_vertex:S4,skinning_vertex:w4,skinnormal_vertex:M4,specularmap_fragment:T4,specularmap_pars_fragment:B4,tonemapping_fragment:R4,tonemapping_pars_fragment:b4,transmission_fragment:L4,transmission_pars_fragment:D4,uv_pars_fragment:N4,uv_pars_vertex:P4,uv_vertex:U4,worldpos_vertex:k4,background_vert:`varying vec2 vUv;
2399
+ #endif`;const mt={alphahash_fragment:z3,alphahash_pars_fragment:G3,alphamap_fragment:H3,alphamap_pars_fragment:V3,alphatest_fragment:W3,alphatest_pars_fragment:j3,aomap_fragment:Y3,aomap_pars_fragment:q3,begin_vertex:X3,beginnormal_vertex:K3,bsdfs:J3,iridescence_fragment:Z3,bumpmap_pars_fragment:$3,clipping_planes_fragment:eT,clipping_planes_pars_fragment:tT,clipping_planes_pars_vertex:nT,clipping_planes_vertex:iT,color_fragment:rT,color_pars_fragment:sT,color_pars_vertex:oT,color_vertex:aT,common:lT,cube_uv_reflection_fragment:cT,defaultnormal_vertex:uT,displacementmap_pars_vertex:fT,displacementmap_vertex:hT,emissivemap_fragment:dT,emissivemap_pars_fragment:AT,colorspace_fragment:pT,colorspace_pars_fragment:gT,envmap_fragment:mT,envmap_common_pars_fragment:vT,envmap_pars_fragment:_T,envmap_pars_vertex:ET,envmap_physical_pars_fragment:LT,envmap_vertex:yT,fog_vertex:CT,fog_pars_vertex:IT,fog_fragment:xT,fog_pars_fragment:ST,gradientmap_pars_fragment:wT,lightmap_fragment:MT,lightmap_pars_fragment:TT,lights_lambert_fragment:BT,lights_lambert_pars_fragment:RT,lights_pars_begin:bT,lights_toon_fragment:DT,lights_toon_pars_fragment:NT,lights_phong_fragment:PT,lights_phong_pars_fragment:UT,lights_physical_fragment:kT,lights_physical_pars_fragment:FT,lights_fragment_begin:QT,lights_fragment_maps:OT,lights_fragment_end:zT,logdepthbuf_fragment:GT,logdepthbuf_pars_fragment:HT,logdepthbuf_pars_vertex:VT,logdepthbuf_vertex:WT,map_fragment:jT,map_pars_fragment:YT,map_particle_fragment:qT,map_particle_pars_fragment:XT,metalnessmap_fragment:KT,metalnessmap_pars_fragment:JT,morphcolor_vertex:ZT,morphnormal_vertex:$T,morphtarget_pars_vertex:e4,morphtarget_vertex:t4,normal_fragment_begin:n4,normal_fragment_maps:i4,normal_pars_fragment:r4,normal_pars_vertex:s4,normal_vertex:o4,normalmap_pars_fragment:a4,clearcoat_normal_fragment_begin:l4,clearcoat_normal_fragment_maps:c4,clearcoat_pars_fragment:u4,iridescence_pars_fragment:f4,opaque_fragment:h4,packing:d4,premultiplied_alpha_fragment:A4,project_vertex:p4,dithering_fragment:g4,dithering_pars_fragment:m4,roughnessmap_fragment:v4,roughnessmap_pars_fragment:_4,shadowmap_pars_fragment:E4,shadowmap_pars_vertex:y4,shadowmap_vertex:C4,shadowmask_pars_fragment:I4,skinbase_vertex:x4,skinning_pars_vertex:S4,skinning_vertex:w4,skinnormal_vertex:M4,specularmap_fragment:T4,specularmap_pars_fragment:B4,tonemapping_fragment:R4,tonemapping_pars_fragment:b4,transmission_fragment:L4,transmission_pars_fragment:D4,uv_pars_fragment:N4,uv_pars_vertex:P4,uv_vertex:U4,worldpos_vertex:k4,background_vert:`varying vec2 vUv;
2400
2400
  uniform mat3 uvTransform;
2401
2401
  void main() {
2402
2402
  vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
@@ -3409,7 +3409,7 @@ void main() {
3409
3409
  #include <tonemapping_fragment>
3410
3410
  #include <colorspace_fragment>
3411
3411
  #include <fog_fragment>
3412
- }`},Le={common:{diffuse:{value:new tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new _t}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new _t}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new _t}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new _t},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new _t},normalScale:{value:new Ke(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new _t},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new _t}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new _t}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new _t}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new tt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0},uvTransform:{value:new _t}},sprite:{diffuse:{value:new tt(16777215)},opacity:{value:1},center:{value:new Ke(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}}},vr={basic:{uniforms:Zn([Le.common,Le.specularmap,Le.envmap,Le.aomap,Le.lightmap,Le.fog]),vertexShader:gt.meshbasic_vert,fragmentShader:gt.meshbasic_frag},lambert:{uniforms:Zn([Le.common,Le.specularmap,Le.envmap,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.fog,Le.lights,{emissive:{value:new tt(0)}}]),vertexShader:gt.meshlambert_vert,fragmentShader:gt.meshlambert_frag},phong:{uniforms:Zn([Le.common,Le.specularmap,Le.envmap,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.fog,Le.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:gt.meshphong_vert,fragmentShader:gt.meshphong_frag},standard:{uniforms:Zn([Le.common,Le.envmap,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.roughnessmap,Le.metalnessmap,Le.fog,Le.lights,{emissive:{value:new tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:gt.meshphysical_vert,fragmentShader:gt.meshphysical_frag},toon:{uniforms:Zn([Le.common,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.gradientmap,Le.fog,Le.lights,{emissive:{value:new tt(0)}}]),vertexShader:gt.meshtoon_vert,fragmentShader:gt.meshtoon_frag},matcap:{uniforms:Zn([Le.common,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.fog,{matcap:{value:null}}]),vertexShader:gt.meshmatcap_vert,fragmentShader:gt.meshmatcap_frag},points:{uniforms:Zn([Le.points,Le.fog]),vertexShader:gt.points_vert,fragmentShader:gt.points_frag},dashed:{uniforms:Zn([Le.common,Le.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:gt.linedashed_vert,fragmentShader:gt.linedashed_frag},depth:{uniforms:Zn([Le.common,Le.displacementmap]),vertexShader:gt.depth_vert,fragmentShader:gt.depth_frag},normal:{uniforms:Zn([Le.common,Le.bumpmap,Le.normalmap,Le.displacementmap,{opacity:{value:1}}]),vertexShader:gt.meshnormal_vert,fragmentShader:gt.meshnormal_frag},sprite:{uniforms:Zn([Le.sprite,Le.fog]),vertexShader:gt.sprite_vert,fragmentShader:gt.sprite_frag},background:{uniforms:{uvTransform:{value:new _t},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:gt.background_vert,fragmentShader:gt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:gt.backgroundCube_vert,fragmentShader:gt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:gt.cube_vert,fragmentShader:gt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:gt.equirect_vert,fragmentShader:gt.equirect_frag},distanceRGBA:{uniforms:Zn([Le.common,Le.displacementmap,{referencePosition:{value:new j},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:gt.distanceRGBA_vert,fragmentShader:gt.distanceRGBA_frag},shadow:{uniforms:Zn([Le.lights,Le.fog,{color:{value:new tt(0)},opacity:{value:1}}]),vertexShader:gt.shadow_vert,fragmentShader:gt.shadow_frag}};vr.physical={uniforms:Zn([vr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new _t},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new _t},clearcoatNormalScale:{value:new Ke(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new _t},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new _t},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new _t},sheen:{value:0},sheenColor:{value:new tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new _t},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new _t},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new _t},transmissionSamplerSize:{value:new Ke},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new _t},attenuationDistance:{value:0},attenuationColor:{value:new tt(0)},specularColor:{value:new tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new _t},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new _t},anisotropyVector:{value:new Ke},anisotropyMap:{value:null},anisotropyMapTransform:{value:new _t}}]),vertexShader:gt.meshphysical_vert,fragmentShader:gt.meshphysical_frag};const ju={r:0,b:0,g:0};function F4(i,e,t,n,r,o,l){const c=new tt(0);let f=o===!0?0:1,u,d,p=null,A=0,g=null;function E(_,v){let S=!1,y=v.isScene===!0?v.background:null;y&&y.isTexture&&(y=(v.backgroundBlurriness>0?t:e).get(y)),y===null?C(c,f):y&&y.isColor&&(C(y,1),S=!0);const x=i.xr.getEnvironmentBlendMode();x==="additive"?n.buffers.color.setClear(0,0,0,1,l):x==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,l),(i.autoClear||S)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),y&&(y.isCubeTexture||y.mapping===au)?(d===void 0&&(d=new Wn(new jl(1,1,1),new Si({name:"BackgroundCubeMaterial",uniforms:da(vr.backgroundCube.uniforms),vertexShader:vr.backgroundCube.vertexShader,fragmentShader:vr.backgroundCube.fragmentShader,side:Bn,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(w,b,B){this.matrixWorld.copyPosition(B.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),d.material.uniforms.envMap.value=y,d.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,d.material.toneMapped=Nt.getTransfer(y.colorSpace)!==Vt,(p!==y||A!==y.version||g!==i.toneMapping)&&(d.material.needsUpdate=!0,p=y,A=y.version,g=i.toneMapping),d.layers.enableAll(),_.unshift(d,d.geometry,d.material,0,0,null)):y&&y.isTexture&&(u===void 0&&(u=new Wn(new Wu(2,2),new Si({name:"BackgroundMaterial",uniforms:da(vr.background.uniforms),vertexShader:vr.background.vertexShader,fragmentShader:vr.background.fragmentShader,side:ji,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=y,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=Nt.getTransfer(y.colorSpace)!==Vt,y.matrixAutoUpdate===!0&&y.updateMatrix(),u.material.uniforms.uvTransform.value.copy(y.matrix),(p!==y||A!==y.version||g!==i.toneMapping)&&(u.material.needsUpdate=!0,p=y,A=y.version,g=i.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null))}function C(_,v){_.getRGB(ju,l_(i)),n.buffers.color.setClear(ju.r,ju.g,ju.b,v,l)}return{getClearColor:function(){return c},setClearColor:function(_,v=1){c.set(_),f=v,C(c,f)},getClearAlpha:function(){return f},setClearAlpha:function(_){f=_,C(c,f)},render:E}}function Q4(i,e,t,n){const r=i.getParameter(i.MAX_VERTEX_ATTRIBS),o=n.isWebGL2?null:e.get("OES_vertex_array_object"),l=n.isWebGL2||o!==null,c={},f=_(null);let u=f,d=!1;function p(F,V,X,te,Y){let $=!1;if(l){const U=C(te,X,V);u!==U&&(u=U,g(u.object)),$=v(F,te,X,Y),$&&S(F,te,X,Y)}else{const U=V.wireframe===!0;(u.geometry!==te.id||u.program!==X.id||u.wireframe!==U)&&(u.geometry=te.id,u.program=X.id,u.wireframe=U,$=!0)}Y!==null&&t.update(Y,i.ELEMENT_ARRAY_BUFFER),($||d)&&(d=!1,L(F,V,X,te),Y!==null&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t.get(Y).buffer))}function A(){return n.isWebGL2?i.createVertexArray():o.createVertexArrayOES()}function g(F){return n.isWebGL2?i.bindVertexArray(F):o.bindVertexArrayOES(F)}function E(F){return n.isWebGL2?i.deleteVertexArray(F):o.deleteVertexArrayOES(F)}function C(F,V,X){const te=X.wireframe===!0;let Y=c[F.id];Y===void 0&&(Y={},c[F.id]=Y);let $=Y[V.id];$===void 0&&($={},Y[V.id]=$);let U=$[te];return U===void 0&&(U=_(A()),$[te]=U),U}function _(F){const V=[],X=[],te=[];for(let Y=0;Y<r;Y++)V[Y]=0,X[Y]=0,te[Y]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:V,enabledAttributes:X,attributeDivisors:te,object:F,attributes:{},index:null}}function v(F,V,X,te){const Y=u.attributes,$=V.attributes;let U=0;const D=X.getAttributes();for(const G in D)if(D[G].location>=0){const J=Y[G];let Ae=$[G];if(Ae===void 0&&(G==="instanceMatrix"&&F.instanceMatrix&&(Ae=F.instanceMatrix),G==="instanceColor"&&F.instanceColor&&(Ae=F.instanceColor)),J===void 0||J.attribute!==Ae||Ae&&J.data!==Ae.data)return!0;U++}return u.attributesNum!==U||u.index!==te}function S(F,V,X,te){const Y={},$=V.attributes;let U=0;const D=X.getAttributes();for(const G in D)if(D[G].location>=0){let J=$[G];J===void 0&&(G==="instanceMatrix"&&F.instanceMatrix&&(J=F.instanceMatrix),G==="instanceColor"&&F.instanceColor&&(J=F.instanceColor));const Ae={};Ae.attribute=J,J&&J.data&&(Ae.data=J.data),Y[G]=Ae,U++}u.attributes=Y,u.attributesNum=U,u.index=te}function y(){const F=u.newAttributes;for(let V=0,X=F.length;V<X;V++)F[V]=0}function x(F){w(F,0)}function w(F,V){const X=u.newAttributes,te=u.enabledAttributes,Y=u.attributeDivisors;X[F]=1,te[F]===0&&(i.enableVertexAttribArray(F),te[F]=1),Y[F]!==V&&((n.isWebGL2?i:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](F,V),Y[F]=V)}function b(){const F=u.newAttributes,V=u.enabledAttributes;for(let X=0,te=V.length;X<te;X++)V[X]!==F[X]&&(i.disableVertexAttribArray(X),V[X]=0)}function B(F,V,X,te,Y,$,U){U===!0?i.vertexAttribIPointer(F,V,X,Y,$):i.vertexAttribPointer(F,V,X,te,Y,$)}function L(F,V,X,te){if(n.isWebGL2===!1&&(F.isInstancedMesh||te.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;y();const Y=te.attributes,$=X.getAttributes(),U=V.defaultAttributeValues;for(const D in $){const G=$[D];if(G.location>=0){let K=Y[D];if(K===void 0&&(D==="instanceMatrix"&&F.instanceMatrix&&(K=F.instanceMatrix),D==="instanceColor"&&F.instanceColor&&(K=F.instanceColor)),K!==void 0){const J=K.normalized,Ae=K.itemSize,ge=t.get(K);if(ge===void 0)continue;const be=ge.buffer,de=ge.type,Oe=ge.bytesPerElement,It=n.isWebGL2===!0&&(de===i.INT||de===i.UNSIGNED_INT||K.gpuType===Dl);if(K.isInterleavedBufferAttribute){const ot=K.data,oe=ot.stride,Mt=K.offset;if(ot.isInstancedInterleavedBuffer){for(let Ne=0;Ne<G.locationSize;Ne++)w(G.location+Ne,ot.meshPerAttribute);F.isInstancedMesh!==!0&&te._maxInstanceCount===void 0&&(te._maxInstanceCount=ot.meshPerAttribute*ot.count)}else for(let Ne=0;Ne<G.locationSize;Ne++)x(G.location+Ne);i.bindBuffer(i.ARRAY_BUFFER,be);for(let Ne=0;Ne<G.locationSize;Ne++)B(G.location+Ne,Ae/G.locationSize,de,J,oe*Oe,(Mt+Ae/G.locationSize*Ne)*Oe,It)}else{if(K.isInstancedBufferAttribute){for(let ot=0;ot<G.locationSize;ot++)w(G.location+ot,K.meshPerAttribute);F.isInstancedMesh!==!0&&te._maxInstanceCount===void 0&&(te._maxInstanceCount=K.meshPerAttribute*K.count)}else for(let ot=0;ot<G.locationSize;ot++)x(G.location+ot);i.bindBuffer(i.ARRAY_BUFFER,be);for(let ot=0;ot<G.locationSize;ot++)B(G.location+ot,Ae/G.locationSize,de,J,Ae*Oe,Ae/G.locationSize*ot*Oe,It)}}else if(U!==void 0){const J=U[D];if(J!==void 0)switch(J.length){case 2:i.vertexAttrib2fv(G.location,J);break;case 3:i.vertexAttrib3fv(G.location,J);break;case 4:i.vertexAttrib4fv(G.location,J);break;default:i.vertexAttrib1fv(G.location,J)}}}}b()}function R(){k();for(const F in c){const V=c[F];for(const X in V){const te=V[X];for(const Y in te)E(te[Y].object),delete te[Y];delete V[X]}delete c[F]}}function T(F){if(c[F.id]===void 0)return;const V=c[F.id];for(const X in V){const te=V[X];for(const Y in te)E(te[Y].object),delete te[Y];delete V[X]}delete c[F.id]}function N(F){for(const V in c){const X=c[V];if(X[F.id]===void 0)continue;const te=X[F.id];for(const Y in te)E(te[Y].object),delete te[Y];delete X[F.id]}}function k(){O(),d=!0,u!==f&&(u=f,g(u.object))}function O(){f.geometry=null,f.program=null,f.wireframe=!1}return{setup:p,reset:k,resetDefaultState:O,dispose:R,releaseStatesOfGeometry:T,releaseStatesOfProgram:N,initAttributes:y,enableAttribute:x,disableUnusedAttributes:b}}function O4(i,e,t,n){const r=n.isWebGL2;let o;function l(u){o=u}function c(u,d){i.drawArrays(o,u,d),t.update(d,o,1)}function f(u,d,p){if(p===0)return;let A,g;if(r)A=i,g="drawArraysInstanced";else if(A=e.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",A===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}A[g](o,u,d,p),t.update(d,o,p)}this.setMode=l,this.render=c,this.renderInstances=f}function z4(i,e,t){let n;function r(){if(n!==void 0)return n;if(e.has("EXT_texture_filter_anisotropic")===!0){const B=e.get("EXT_texture_filter_anisotropic");n=i.getParameter(B.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n}function o(B){if(B==="highp"){if(i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.HIGH_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";B="mediump"}return B==="mediump"&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const l=typeof WebGL2RenderingContext<"u"&&i.constructor.name==="WebGL2RenderingContext";let c=t.precision!==void 0?t.precision:"highp";const f=o(c);f!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",f,"instead."),c=f);const u=l||e.has("WEBGL_draw_buffers"),d=t.logarithmicDepthBuffer===!0,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),A=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS),g=i.getParameter(i.MAX_TEXTURE_SIZE),E=i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),C=i.getParameter(i.MAX_VERTEX_ATTRIBS),_=i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),v=i.getParameter(i.MAX_VARYING_VECTORS),S=i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),y=A>0,x=l||e.has("OES_texture_float"),w=y&&x,b=l?i.getParameter(i.MAX_SAMPLES):0;return{isWebGL2:l,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:o,precision:c,logarithmicDepthBuffer:d,maxTextures:p,maxVertexTextures:A,maxTextureSize:g,maxCubemapSize:E,maxAttributes:C,maxVertexUniforms:_,maxVaryings:v,maxFragmentUniforms:S,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:w,maxSamples:b}}function G4(i){const e=this;let t=null,n=0,r=!1,o=!1;const l=new mr,c=new _t,f={value:null,needsUpdate:!1};this.uniform=f,this.numPlanes=0,this.numIntersection=0,this.init=function(p,A){const g=p.length!==0||A||n!==0||r;return r=A,n=p.length,g},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(p,A){t=d(p,A,0)},this.setState=function(p,A,g){const E=p.clippingPlanes,C=p.clipIntersection,_=p.clipShadows,v=i.get(p);if(!r||E===null||E.length===0||o&&!_)o?d(null):u();else{const S=o?0:n,y=S*4;let x=v.clippingState||null;f.value=x,x=d(E,A,y,g);for(let w=0;w!==y;++w)x[w]=t[w];v.clippingState=x,this.numIntersection=C?this.numPlanes:0,this.numPlanes+=S}};function u(){f.value!==t&&(f.value=t,f.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(p,A,g,E){const C=p!==null?p.length:0;let _=null;if(C!==0){if(_=f.value,E!==!0||_===null){const v=g+C*4,S=A.matrixWorldInverse;c.getNormalMatrix(S),(_===null||_.length<v)&&(_=new Float32Array(v));for(let y=0,x=g;y!==C;++y,x+=4)l.copy(p[y]).applyMatrix4(S,c),l.normal.toArray(_,x),_[x+3]=l.constant}f.value=_,f.needsUpdate=!0}return e.numPlanes=C,e.numIntersection=0,_}}function H4(i){let e=new WeakMap;function t(l,c){return c===Ll?l.mapping=so:c===Jd&&(l.mapping=qo),l}function n(l){if(l&&l.isTexture&&l.isRenderTargetTexture===!1){const c=l.mapping;if(c===Ll||c===Jd)if(e.has(l)){const f=e.get(l).texture;return t(f,l.mapping)}else{const f=l.image;if(f&&f.height>0){const u=new k3(f.height/2);return u.fromEquirectangularTexture(i,l),e.set(l,u),l.addEventListener("dispose",r),t(u.texture,l.mapping)}else return null}}return l}function r(l){const c=l.target;c.removeEventListener("dispose",r);const f=e.get(c);f!==void 0&&(e.delete(c),f.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}class Yl extends c_{constructor(e=-1,t=1,n=1,r=-1,o=.1,l=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=o,this.far=l,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,o,l){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=l,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let o=n-e,l=n+e,c=r+t,f=r-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=u*this.view.offsetX,l=o+u*this.view.width,c-=d*this.view.offsetY,f=c-d*this.view.height}this.projectionMatrix.makeOrthographic(o,l,c,f,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const ga=4,h_=[.125,.215,.35,.446,.526,.582],mo=20,NA=new Yl,d_=new tt;let PA=null,UA=0,kA=0;const vo=(1+Math.sqrt(5))/2,ma=1/vo,A_=[new j(1,1,1),new j(-1,1,1),new j(1,1,-1),new j(-1,1,-1),new j(0,vo,ma),new j(0,vo,-ma),new j(ma,0,vo),new j(-ma,0,vo),new j(vo,ma,0),new j(-vo,ma,0)];class p_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){PA=this._renderer.getRenderTarget(),UA=this._renderer.getActiveCubeFace(),kA=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,r,o),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=v_(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=m_(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(PA,UA,kA),e.scissorTest=!1,Yu(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===so||e.mapping===qo?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),PA=this._renderer.getRenderTarget(),UA=this._renderer.getActiveCubeFace(),kA=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:un,minFilter:un,generateMipmaps:!1,type:Jn,format:on,colorSpace:En,depthBuffer:!1},r=g_(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=g_(e,t,n);const{_lodMax:o}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=V4(o)),this._blurMaterial=W4(o,e,t)}return r}_compileMaterial(e){const t=new Wn(this._lodPlanes[0],e);this._renderer.compile(t,NA)}_sceneToCubeUV(e,t,n,r){const c=new $n(90,1,t,n),f=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],d=this._renderer,p=d.autoClear,A=d.toneMapping;d.getClearColor(d_),d.toneMapping=hs,d.autoClear=!1;const g=new Gr({name:"PMREM.Background",side:Bn,depthWrite:!1,depthTest:!1}),E=new Wn(new jl,g);let C=!1;const _=e.background;_?_.isColor&&(g.color.copy(_),e.background=null,C=!0):(g.color.copy(d_),C=!0);for(let v=0;v<6;v++){const S=v%3;S===0?(c.up.set(0,f[v],0),c.lookAt(u[v],0,0)):S===1?(c.up.set(0,0,f[v]),c.lookAt(0,u[v],0)):(c.up.set(0,f[v],0),c.lookAt(0,0,u[v]));const y=this._cubeSize;Yu(r,S*y,v>2?y:0,y,y),d.setRenderTarget(r),C&&d.render(E,c),d.render(e,c)}E.geometry.dispose(),E.material.dispose(),d.toneMapping=A,d.autoClear=p,e.background=_}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===so||e.mapping===qo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=v_()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=m_());const o=r?this._cubemapMaterial:this._equirectMaterial,l=new Wn(this._lodPlanes[0],o),c=o.uniforms;c.envMap.value=e;const f=this._cubeSize;Yu(t,0,0,3*f,2*f),n.setRenderTarget(t),n.render(l,NA)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;r<this._lodPlanes.length;r++){const o=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),l=A_[(r-1)%A_.length];this._blur(e,r-1,r,o,l)}t.autoClear=n}_blur(e,t,n,r,o){const l=this._pingPongRenderTarget;this._halfBlur(e,l,t,n,r,"latitudinal",o),this._halfBlur(l,e,n,n,r,"longitudinal",o)}_halfBlur(e,t,n,r,o,l,c){const f=this._renderer,u=this._blurMaterial;l!=="latitudinal"&&l!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,p=new Wn(this._lodPlanes[r],u),A=u.uniforms,g=this._sizeLods[n]-1,E=isFinite(o)?Math.PI/(2*g):2*Math.PI/(2*mo-1),C=o/E,_=isFinite(o)?1+Math.floor(d*C):mo;_>mo&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${mo}`);const v=[];let S=0;for(let B=0;B<mo;++B){const L=B/C,R=Math.exp(-L*L/2);v.push(R),B===0?S+=R:B<_&&(S+=2*R)}for(let B=0;B<v.length;B++)v[B]=v[B]/S;A.envMap.value=e.texture,A.samples.value=_,A.weights.value=v,A.latitudinal.value=l==="latitudinal",c&&(A.poleAxis.value=c);const{_lodMax:y}=this;A.dTheta.value=E,A.mipInt.value=y-n;const x=this._sizeLods[r],w=3*x*(r>y-ga?r-y+ga:0),b=4*(this._cubeSize-x);Yu(t,w,b,3*x,2*x),f.setRenderTarget(t),f.render(p,NA)}}function V4(i){const e=[],t=[],n=[];let r=i;const o=i-ga+1+h_.length;for(let l=0;l<o;l++){const c=Math.pow(2,r);t.push(c);let f=1/c;l>i-ga?f=h_[l-i+ga-1]:l===0&&(f=0),n.push(f);const u=1/(c-2),d=-u,p=1+u,A=[d,d,p,d,p,p,d,d,p,p,d,p],g=6,E=6,C=3,_=2,v=1,S=new Float32Array(C*E*g),y=new Float32Array(_*E*g),x=new Float32Array(v*E*g);for(let b=0;b<g;b++){const B=b%3*2/3-1,L=b>2?0:-1,R=[B,L,0,B+2/3,L,0,B+2/3,L+1,0,B,L,0,B+2/3,L+1,0,B,L+1,0];S.set(R,C*E*b),y.set(A,_*E*b);const T=[b,b,b,b,b,b];x.set(T,v*E*b)}const w=new xi;w.setAttribute("position",new bn(S,C)),w.setAttribute("uv",new bn(y,_)),w.setAttribute("faceIndex",new bn(x,v)),e.push(w),r>ga&&r--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function g_(i,e,t){const n=new Xi(i,e,t);return n.texture.mapping=au,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Yu(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function W4(i,e,t){const n=new Float32Array(mo),r=new j(0,1,0);return new Si({name:"SphericalGaussianBlur",defines:{n:mo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:FA(),fragmentShader:`
3412
+ }`},Le={common:{diffuse:{value:new tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new _t}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new _t}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new _t}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new _t},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new _t},normalScale:{value:new Ke(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new _t},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new _t}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new _t}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new _t}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new tt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0},uvTransform:{value:new _t}},sprite:{diffuse:{value:new tt(16777215)},opacity:{value:1},center:{value:new Ke(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new _t},alphaMap:{value:null},alphaMapTransform:{value:new _t},alphaTest:{value:0}}},vr={basic:{uniforms:Zn([Le.common,Le.specularmap,Le.envmap,Le.aomap,Le.lightmap,Le.fog]),vertexShader:mt.meshbasic_vert,fragmentShader:mt.meshbasic_frag},lambert:{uniforms:Zn([Le.common,Le.specularmap,Le.envmap,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.fog,Le.lights,{emissive:{value:new tt(0)}}]),vertexShader:mt.meshlambert_vert,fragmentShader:mt.meshlambert_frag},phong:{uniforms:Zn([Le.common,Le.specularmap,Le.envmap,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.fog,Le.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:mt.meshphong_vert,fragmentShader:mt.meshphong_frag},standard:{uniforms:Zn([Le.common,Le.envmap,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.roughnessmap,Le.metalnessmap,Le.fog,Le.lights,{emissive:{value:new tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag},toon:{uniforms:Zn([Le.common,Le.aomap,Le.lightmap,Le.emissivemap,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.gradientmap,Le.fog,Le.lights,{emissive:{value:new tt(0)}}]),vertexShader:mt.meshtoon_vert,fragmentShader:mt.meshtoon_frag},matcap:{uniforms:Zn([Le.common,Le.bumpmap,Le.normalmap,Le.displacementmap,Le.fog,{matcap:{value:null}}]),vertexShader:mt.meshmatcap_vert,fragmentShader:mt.meshmatcap_frag},points:{uniforms:Zn([Le.points,Le.fog]),vertexShader:mt.points_vert,fragmentShader:mt.points_frag},dashed:{uniforms:Zn([Le.common,Le.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mt.linedashed_vert,fragmentShader:mt.linedashed_frag},depth:{uniforms:Zn([Le.common,Le.displacementmap]),vertexShader:mt.depth_vert,fragmentShader:mt.depth_frag},normal:{uniforms:Zn([Le.common,Le.bumpmap,Le.normalmap,Le.displacementmap,{opacity:{value:1}}]),vertexShader:mt.meshnormal_vert,fragmentShader:mt.meshnormal_frag},sprite:{uniforms:Zn([Le.sprite,Le.fog]),vertexShader:mt.sprite_vert,fragmentShader:mt.sprite_frag},background:{uniforms:{uvTransform:{value:new _t},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mt.background_vert,fragmentShader:mt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:mt.backgroundCube_vert,fragmentShader:mt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mt.cube_vert,fragmentShader:mt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mt.equirect_vert,fragmentShader:mt.equirect_frag},distanceRGBA:{uniforms:Zn([Le.common,Le.displacementmap,{referencePosition:{value:new j},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mt.distanceRGBA_vert,fragmentShader:mt.distanceRGBA_frag},shadow:{uniforms:Zn([Le.lights,Le.fog,{color:{value:new tt(0)},opacity:{value:1}}]),vertexShader:mt.shadow_vert,fragmentShader:mt.shadow_frag}};vr.physical={uniforms:Zn([vr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new _t},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new _t},clearcoatNormalScale:{value:new Ke(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new _t},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new _t},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new _t},sheen:{value:0},sheenColor:{value:new tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new _t},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new _t},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new _t},transmissionSamplerSize:{value:new Ke},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new _t},attenuationDistance:{value:0},attenuationColor:{value:new tt(0)},specularColor:{value:new tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new _t},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new _t},anisotropyVector:{value:new Ke},anisotropyMap:{value:null},anisotropyMapTransform:{value:new _t}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag};const ju={r:0,b:0,g:0};function F4(i,e,t,n,r,o,l){const c=new tt(0);let f=o===!0?0:1,u,d,p=null,A=0,g=null;function E(_,v){let S=!1,y=v.isScene===!0?v.background:null;y&&y.isTexture&&(y=(v.backgroundBlurriness>0?t:e).get(y)),y===null?C(c,f):y&&y.isColor&&(C(y,1),S=!0);const x=i.xr.getEnvironmentBlendMode();x==="additive"?n.buffers.color.setClear(0,0,0,1,l):x==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,l),(i.autoClear||S)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),y&&(y.isCubeTexture||y.mapping===au)?(d===void 0&&(d=new Wn(new jl(1,1,1),new Si({name:"BackgroundCubeMaterial",uniforms:da(vr.backgroundCube.uniforms),vertexShader:vr.backgroundCube.vertexShader,fragmentShader:vr.backgroundCube.fragmentShader,side:Bn,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(w,b,B){this.matrixWorld.copyPosition(B.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),d.material.uniforms.envMap.value=y,d.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,d.material.toneMapped=Nt.getTransfer(y.colorSpace)!==Vt,(p!==y||A!==y.version||g!==i.toneMapping)&&(d.material.needsUpdate=!0,p=y,A=y.version,g=i.toneMapping),d.layers.enableAll(),_.unshift(d,d.geometry,d.material,0,0,null)):y&&y.isTexture&&(u===void 0&&(u=new Wn(new Wu(2,2),new Si({name:"BackgroundMaterial",uniforms:da(vr.background.uniforms),vertexShader:vr.background.vertexShader,fragmentShader:vr.background.fragmentShader,side:ji,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=y,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=Nt.getTransfer(y.colorSpace)!==Vt,y.matrixAutoUpdate===!0&&y.updateMatrix(),u.material.uniforms.uvTransform.value.copy(y.matrix),(p!==y||A!==y.version||g!==i.toneMapping)&&(u.material.needsUpdate=!0,p=y,A=y.version,g=i.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null))}function C(_,v){_.getRGB(ju,l_(i)),n.buffers.color.setClear(ju.r,ju.g,ju.b,v,l)}return{getClearColor:function(){return c},setClearColor:function(_,v=1){c.set(_),f=v,C(c,f)},getClearAlpha:function(){return f},setClearAlpha:function(_){f=_,C(c,f)},render:E}}function Q4(i,e,t,n){const r=i.getParameter(i.MAX_VERTEX_ATTRIBS),o=n.isWebGL2?null:e.get("OES_vertex_array_object"),l=n.isWebGL2||o!==null,c={},f=_(null);let u=f,d=!1;function p(F,V,X,te,Y){let $=!1;if(l){const U=C(te,X,V);u!==U&&(u=U,g(u.object)),$=v(F,te,X,Y),$&&S(F,te,X,Y)}else{const U=V.wireframe===!0;(u.geometry!==te.id||u.program!==X.id||u.wireframe!==U)&&(u.geometry=te.id,u.program=X.id,u.wireframe=U,$=!0)}Y!==null&&t.update(Y,i.ELEMENT_ARRAY_BUFFER),($||d)&&(d=!1,L(F,V,X,te),Y!==null&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t.get(Y).buffer))}function A(){return n.isWebGL2?i.createVertexArray():o.createVertexArrayOES()}function g(F){return n.isWebGL2?i.bindVertexArray(F):o.bindVertexArrayOES(F)}function E(F){return n.isWebGL2?i.deleteVertexArray(F):o.deleteVertexArrayOES(F)}function C(F,V,X){const te=X.wireframe===!0;let Y=c[F.id];Y===void 0&&(Y={},c[F.id]=Y);let $=Y[V.id];$===void 0&&($={},Y[V.id]=$);let U=$[te];return U===void 0&&(U=_(A()),$[te]=U),U}function _(F){const V=[],X=[],te=[];for(let Y=0;Y<r;Y++)V[Y]=0,X[Y]=0,te[Y]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:V,enabledAttributes:X,attributeDivisors:te,object:F,attributes:{},index:null}}function v(F,V,X,te){const Y=u.attributes,$=V.attributes;let U=0;const D=X.getAttributes();for(const G in D)if(D[G].location>=0){const J=Y[G];let Ae=$[G];if(Ae===void 0&&(G==="instanceMatrix"&&F.instanceMatrix&&(Ae=F.instanceMatrix),G==="instanceColor"&&F.instanceColor&&(Ae=F.instanceColor)),J===void 0||J.attribute!==Ae||Ae&&J.data!==Ae.data)return!0;U++}return u.attributesNum!==U||u.index!==te}function S(F,V,X,te){const Y={},$=V.attributes;let U=0;const D=X.getAttributes();for(const G in D)if(D[G].location>=0){let J=$[G];J===void 0&&(G==="instanceMatrix"&&F.instanceMatrix&&(J=F.instanceMatrix),G==="instanceColor"&&F.instanceColor&&(J=F.instanceColor));const Ae={};Ae.attribute=J,J&&J.data&&(Ae.data=J.data),Y[G]=Ae,U++}u.attributes=Y,u.attributesNum=U,u.index=te}function y(){const F=u.newAttributes;for(let V=0,X=F.length;V<X;V++)F[V]=0}function x(F){w(F,0)}function w(F,V){const X=u.newAttributes,te=u.enabledAttributes,Y=u.attributeDivisors;X[F]=1,te[F]===0&&(i.enableVertexAttribArray(F),te[F]=1),Y[F]!==V&&((n.isWebGL2?i:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](F,V),Y[F]=V)}function b(){const F=u.newAttributes,V=u.enabledAttributes;for(let X=0,te=V.length;X<te;X++)V[X]!==F[X]&&(i.disableVertexAttribArray(X),V[X]=0)}function B(F,V,X,te,Y,$,U){U===!0?i.vertexAttribIPointer(F,V,X,Y,$):i.vertexAttribPointer(F,V,X,te,Y,$)}function L(F,V,X,te){if(n.isWebGL2===!1&&(F.isInstancedMesh||te.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;y();const Y=te.attributes,$=X.getAttributes(),U=V.defaultAttributeValues;for(const D in $){const G=$[D];if(G.location>=0){let K=Y[D];if(K===void 0&&(D==="instanceMatrix"&&F.instanceMatrix&&(K=F.instanceMatrix),D==="instanceColor"&&F.instanceColor&&(K=F.instanceColor)),K!==void 0){const J=K.normalized,Ae=K.itemSize,ge=t.get(K);if(ge===void 0)continue;const be=ge.buffer,de=ge.type,Oe=ge.bytesPerElement,It=n.isWebGL2===!0&&(de===i.INT||de===i.UNSIGNED_INT||K.gpuType===Dl);if(K.isInterleavedBufferAttribute){const ot=K.data,oe=ot.stride,Mt=K.offset;if(ot.isInstancedInterleavedBuffer){for(let Ne=0;Ne<G.locationSize;Ne++)w(G.location+Ne,ot.meshPerAttribute);F.isInstancedMesh!==!0&&te._maxInstanceCount===void 0&&(te._maxInstanceCount=ot.meshPerAttribute*ot.count)}else for(let Ne=0;Ne<G.locationSize;Ne++)x(G.location+Ne);i.bindBuffer(i.ARRAY_BUFFER,be);for(let Ne=0;Ne<G.locationSize;Ne++)B(G.location+Ne,Ae/G.locationSize,de,J,oe*Oe,(Mt+Ae/G.locationSize*Ne)*Oe,It)}else{if(K.isInstancedBufferAttribute){for(let ot=0;ot<G.locationSize;ot++)w(G.location+ot,K.meshPerAttribute);F.isInstancedMesh!==!0&&te._maxInstanceCount===void 0&&(te._maxInstanceCount=K.meshPerAttribute*K.count)}else for(let ot=0;ot<G.locationSize;ot++)x(G.location+ot);i.bindBuffer(i.ARRAY_BUFFER,be);for(let ot=0;ot<G.locationSize;ot++)B(G.location+ot,Ae/G.locationSize,de,J,Ae*Oe,Ae/G.locationSize*ot*Oe,It)}}else if(U!==void 0){const J=U[D];if(J!==void 0)switch(J.length){case 2:i.vertexAttrib2fv(G.location,J);break;case 3:i.vertexAttrib3fv(G.location,J);break;case 4:i.vertexAttrib4fv(G.location,J);break;default:i.vertexAttrib1fv(G.location,J)}}}}b()}function R(){k();for(const F in c){const V=c[F];for(const X in V){const te=V[X];for(const Y in te)E(te[Y].object),delete te[Y];delete V[X]}delete c[F]}}function T(F){if(c[F.id]===void 0)return;const V=c[F.id];for(const X in V){const te=V[X];for(const Y in te)E(te[Y].object),delete te[Y];delete V[X]}delete c[F.id]}function N(F){for(const V in c){const X=c[V];if(X[F.id]===void 0)continue;const te=X[F.id];for(const Y in te)E(te[Y].object),delete te[Y];delete X[F.id]}}function k(){O(),d=!0,u!==f&&(u=f,g(u.object))}function O(){f.geometry=null,f.program=null,f.wireframe=!1}return{setup:p,reset:k,resetDefaultState:O,dispose:R,releaseStatesOfGeometry:T,releaseStatesOfProgram:N,initAttributes:y,enableAttribute:x,disableUnusedAttributes:b}}function O4(i,e,t,n){const r=n.isWebGL2;let o;function l(u){o=u}function c(u,d){i.drawArrays(o,u,d),t.update(d,o,1)}function f(u,d,p){if(p===0)return;let A,g;if(r)A=i,g="drawArraysInstanced";else if(A=e.get("ANGLE_instanced_arrays"),g="drawArraysInstancedANGLE",A===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}A[g](o,u,d,p),t.update(d,o,p)}this.setMode=l,this.render=c,this.renderInstances=f}function z4(i,e,t){let n;function r(){if(n!==void 0)return n;if(e.has("EXT_texture_filter_anisotropic")===!0){const B=e.get("EXT_texture_filter_anisotropic");n=i.getParameter(B.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n}function o(B){if(B==="highp"){if(i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.HIGH_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";B="mediump"}return B==="mediump"&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const l=typeof WebGL2RenderingContext<"u"&&i.constructor.name==="WebGL2RenderingContext";let c=t.precision!==void 0?t.precision:"highp";const f=o(c);f!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",f,"instead."),c=f);const u=l||e.has("WEBGL_draw_buffers"),d=t.logarithmicDepthBuffer===!0,p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),A=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS),g=i.getParameter(i.MAX_TEXTURE_SIZE),E=i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),C=i.getParameter(i.MAX_VERTEX_ATTRIBS),_=i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),v=i.getParameter(i.MAX_VARYING_VECTORS),S=i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),y=A>0,x=l||e.has("OES_texture_float"),w=y&&x,b=l?i.getParameter(i.MAX_SAMPLES):0;return{isWebGL2:l,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:o,precision:c,logarithmicDepthBuffer:d,maxTextures:p,maxVertexTextures:A,maxTextureSize:g,maxCubemapSize:E,maxAttributes:C,maxVertexUniforms:_,maxVaryings:v,maxFragmentUniforms:S,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:w,maxSamples:b}}function G4(i){const e=this;let t=null,n=0,r=!1,o=!1;const l=new mr,c=new _t,f={value:null,needsUpdate:!1};this.uniform=f,this.numPlanes=0,this.numIntersection=0,this.init=function(p,A){const g=p.length!==0||A||n!==0||r;return r=A,n=p.length,g},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(p,A){t=d(p,A,0)},this.setState=function(p,A,g){const E=p.clippingPlanes,C=p.clipIntersection,_=p.clipShadows,v=i.get(p);if(!r||E===null||E.length===0||o&&!_)o?d(null):u();else{const S=o?0:n,y=S*4;let x=v.clippingState||null;f.value=x,x=d(E,A,y,g);for(let w=0;w!==y;++w)x[w]=t[w];v.clippingState=x,this.numIntersection=C?this.numPlanes:0,this.numPlanes+=S}};function u(){f.value!==t&&(f.value=t,f.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(p,A,g,E){const C=p!==null?p.length:0;let _=null;if(C!==0){if(_=f.value,E!==!0||_===null){const v=g+C*4,S=A.matrixWorldInverse;c.getNormalMatrix(S),(_===null||_.length<v)&&(_=new Float32Array(v));for(let y=0,x=g;y!==C;++y,x+=4)l.copy(p[y]).applyMatrix4(S,c),l.normal.toArray(_,x),_[x+3]=l.constant}f.value=_,f.needsUpdate=!0}return e.numPlanes=C,e.numIntersection=0,_}}function H4(i){let e=new WeakMap;function t(l,c){return c===Ll?l.mapping=so:c===Jd&&(l.mapping=qo),l}function n(l){if(l&&l.isTexture&&l.isRenderTargetTexture===!1){const c=l.mapping;if(c===Ll||c===Jd)if(e.has(l)){const f=e.get(l).texture;return t(f,l.mapping)}else{const f=l.image;if(f&&f.height>0){const u=new k3(f.height/2);return u.fromEquirectangularTexture(i,l),e.set(l,u),l.addEventListener("dispose",r),t(u.texture,l.mapping)}else return null}}return l}function r(l){const c=l.target;c.removeEventListener("dispose",r);const f=e.get(c);f!==void 0&&(e.delete(c),f.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}class Yl extends c_{constructor(e=-1,t=1,n=1,r=-1,o=.1,l=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=o,this.far=l,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,o,l){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=l,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let o=n-e,l=n+e,c=r+t,f=r-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=u*this.view.offsetX,l=o+u*this.view.width,c-=d*this.view.offsetY,f=c-d*this.view.height}this.projectionMatrix.makeOrthographic(o,l,c,f,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const ga=4,h_=[.125,.215,.35,.446,.526,.582],mo=20,NA=new Yl,d_=new tt;let PA=null,UA=0,kA=0;const vo=(1+Math.sqrt(5))/2,ma=1/vo,A_=[new j(1,1,1),new j(-1,1,1),new j(1,1,-1),new j(-1,1,-1),new j(0,vo,ma),new j(0,vo,-ma),new j(ma,0,vo),new j(-ma,0,vo),new j(vo,ma,0),new j(-vo,ma,0)];class p_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){PA=this._renderer.getRenderTarget(),UA=this._renderer.getActiveCubeFace(),kA=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,r,o),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=v_(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=m_(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(PA,UA,kA),e.scissorTest=!1,Yu(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===so||e.mapping===qo?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),PA=this._renderer.getRenderTarget(),UA=this._renderer.getActiveCubeFace(),kA=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:un,minFilter:un,generateMipmaps:!1,type:Jn,format:on,colorSpace:En,depthBuffer:!1},r=g_(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=g_(e,t,n);const{_lodMax:o}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=V4(o)),this._blurMaterial=W4(o,e,t)}return r}_compileMaterial(e){const t=new Wn(this._lodPlanes[0],e);this._renderer.compile(t,NA)}_sceneToCubeUV(e,t,n,r){const c=new $n(90,1,t,n),f=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],d=this._renderer,p=d.autoClear,A=d.toneMapping;d.getClearColor(d_),d.toneMapping=hs,d.autoClear=!1;const g=new Gr({name:"PMREM.Background",side:Bn,depthWrite:!1,depthTest:!1}),E=new Wn(new jl,g);let C=!1;const _=e.background;_?_.isColor&&(g.color.copy(_),e.background=null,C=!0):(g.color.copy(d_),C=!0);for(let v=0;v<6;v++){const S=v%3;S===0?(c.up.set(0,f[v],0),c.lookAt(u[v],0,0)):S===1?(c.up.set(0,0,f[v]),c.lookAt(0,u[v],0)):(c.up.set(0,f[v],0),c.lookAt(0,0,u[v]));const y=this._cubeSize;Yu(r,S*y,v>2?y:0,y,y),d.setRenderTarget(r),C&&d.render(E,c),d.render(e,c)}E.geometry.dispose(),E.material.dispose(),d.toneMapping=A,d.autoClear=p,e.background=_}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===so||e.mapping===qo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=v_()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=m_());const o=r?this._cubemapMaterial:this._equirectMaterial,l=new Wn(this._lodPlanes[0],o),c=o.uniforms;c.envMap.value=e;const f=this._cubeSize;Yu(t,0,0,3*f,2*f),n.setRenderTarget(t),n.render(l,NA)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;r<this._lodPlanes.length;r++){const o=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),l=A_[(r-1)%A_.length];this._blur(e,r-1,r,o,l)}t.autoClear=n}_blur(e,t,n,r,o){const l=this._pingPongRenderTarget;this._halfBlur(e,l,t,n,r,"latitudinal",o),this._halfBlur(l,e,n,n,r,"longitudinal",o)}_halfBlur(e,t,n,r,o,l,c){const f=this._renderer,u=this._blurMaterial;l!=="latitudinal"&&l!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,p=new Wn(this._lodPlanes[r],u),A=u.uniforms,g=this._sizeLods[n]-1,E=isFinite(o)?Math.PI/(2*g):2*Math.PI/(2*mo-1),C=o/E,_=isFinite(o)?1+Math.floor(d*C):mo;_>mo&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${mo}`);const v=[];let S=0;for(let B=0;B<mo;++B){const L=B/C,R=Math.exp(-L*L/2);v.push(R),B===0?S+=R:B<_&&(S+=2*R)}for(let B=0;B<v.length;B++)v[B]=v[B]/S;A.envMap.value=e.texture,A.samples.value=_,A.weights.value=v,A.latitudinal.value=l==="latitudinal",c&&(A.poleAxis.value=c);const{_lodMax:y}=this;A.dTheta.value=E,A.mipInt.value=y-n;const x=this._sizeLods[r],w=3*x*(r>y-ga?r-y+ga:0),b=4*(this._cubeSize-x);Yu(t,w,b,3*x,2*x),f.setRenderTarget(t),f.render(p,NA)}}function V4(i){const e=[],t=[],n=[];let r=i;const o=i-ga+1+h_.length;for(let l=0;l<o;l++){const c=Math.pow(2,r);t.push(c);let f=1/c;l>i-ga?f=h_[l-i+ga-1]:l===0&&(f=0),n.push(f);const u=1/(c-2),d=-u,p=1+u,A=[d,d,p,d,p,p,d,d,p,p,d,p],g=6,E=6,C=3,_=2,v=1,S=new Float32Array(C*E*g),y=new Float32Array(_*E*g),x=new Float32Array(v*E*g);for(let b=0;b<g;b++){const B=b%3*2/3-1,L=b>2?0:-1,R=[B,L,0,B+2/3,L,0,B+2/3,L+1,0,B,L,0,B+2/3,L+1,0,B,L+1,0];S.set(R,C*E*b),y.set(A,_*E*b);const T=[b,b,b,b,b,b];x.set(T,v*E*b)}const w=new xi;w.setAttribute("position",new bn(S,C)),w.setAttribute("uv",new bn(y,_)),w.setAttribute("faceIndex",new bn(x,v)),e.push(w),r>ga&&r--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function g_(i,e,t){const n=new Xi(i,e,t);return n.texture.mapping=au,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Yu(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function W4(i,e,t){const n=new Float32Array(mo),r=new j(0,1,0);return new Si({name:"SphericalGaussianBlur",defines:{n:mo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:FA(),fragmentShader:`
3413
3413
 
3414
3414
  precision mediump float;
3415
3415
  precision mediump int;
@@ -3567,7 +3567,7 @@ void main() {
3567
3567
 
3568
3568
  `+YB(i.getShaderSource(e),l)}else return r}function XB(i,e){const t=qB(e);return`vec4 ${i}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function KB(i,e){let t;switch(e){case $v:t="Linear";break;case e1:t="Reinhard";break;case t1:t="OptimizedCineon";break;case Kd:t="ACESFilmic";break;case UM:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+i+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function JB(i){return[i.extensionDerivatives||i.envMapCubeUVHeight||i.bumpMap||i.normalMapTangentSpace||i.clearcoatNormalMap||i.flatShading||i.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(i.extensionFragDepth||i.logarithmicDepthBuffer)&&i.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",i.extensionDrawBuffers&&i.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(i.extensionShaderTextureLOD||i.envMap||i.transmission)&&i.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(ql).join(`
3569
3569
  `)}function ZB(i){const e=[];for(const t in i){const n=i[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
3570
- `)}function $B(i,e){const t={},n=i.getProgramParameter(e,i.ACTIVE_ATTRIBUTES);for(let r=0;r<n;r++){const o=i.getActiveAttrib(e,r),l=o.name;let c=1;o.type===i.FLOAT_MAT2&&(c=2),o.type===i.FLOAT_MAT3&&(c=3),o.type===i.FLOAT_MAT4&&(c=4),t[l]={type:o.type,location:i.getAttribLocation(e,l),locationSize:c}}return t}function ql(i){return i!==""}function b_(i,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return i.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function L_(i,e){return i.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const eR=/^[ \t]*#include +<([\w\d./]+)>/gm;function OA(i){return i.replace(eR,nR)}const tR=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function nR(i,e){let t=gt[e];if(t===void 0){const n=tR.get(e);if(n!==void 0)t=gt[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return OA(t)}const iR=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function D_(i){return i.replace(iR,rR)}function rR(i,e,t,n){let r="";for(let o=parseInt(e);o<parseInt(t);o++)r+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return r}function N_(i){let e="precision "+i.precision+` float;
3570
+ `)}function $B(i,e){const t={},n=i.getProgramParameter(e,i.ACTIVE_ATTRIBUTES);for(let r=0;r<n;r++){const o=i.getActiveAttrib(e,r),l=o.name;let c=1;o.type===i.FLOAT_MAT2&&(c=2),o.type===i.FLOAT_MAT3&&(c=3),o.type===i.FLOAT_MAT4&&(c=4),t[l]={type:o.type,location:i.getAttribLocation(e,l),locationSize:c}}return t}function ql(i){return i!==""}function b_(i,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return i.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function L_(i,e){return i.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const eR=/^[ \t]*#include +<([\w\d./]+)>/gm;function OA(i){return i.replace(eR,nR)}const tR=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function nR(i,e){let t=mt[e];if(t===void 0){const n=tR.get(e);if(n!==void 0)t=mt[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return OA(t)}const iR=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function D_(i){return i.replace(iR,rR)}function rR(i,e,t,n){let r="";for(let o=parseInt(e);o<parseInt(t);o++)r+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return r}function N_(i){let e="precision "+i.precision+` float;
3571
3571
  precision `+i.precision+" int;";return i.precision==="highp"?e+=`
3572
3572
  #define HIGH_PRECISION`:i.precision==="mediump"?e+=`
3573
3573
  #define MEDIUM_PRECISION`:i.precision==="lowp"&&(e+=`
@@ -3578,7 +3578,7 @@ precision `+i.precision+" int;";return i.precision==="highp"?e+=`
3578
3578
  `),v.length>0&&(v+=`
3579
3579
  `)):(_=[N_(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,E,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+f:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
3580
3580
  `].filter(ql).join(`
3581
- `),v=[g,N_(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,E,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+d:"",t.envMap?"#define "+p:"",A?"#define CUBEUV_TEXEL_WIDTH "+A.texelWidth:"",A?"#define CUBEUV_TEXEL_HEIGHT "+A.texelHeight:"",A?"#define CUBEUV_MAX_MIP "+A.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+f:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==hs?"#define TONE_MAPPING":"",t.toneMapping!==hs?gt.tonemapping_pars_fragment:"",t.toneMapping!==hs?KB("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",gt.colorspace_pars_fragment,XB("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
3581
+ `),v=[g,N_(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,E,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+d:"",t.envMap?"#define "+p:"",A?"#define CUBEUV_TEXEL_WIDTH "+A.texelWidth:"",A?"#define CUBEUV_TEXEL_HEIGHT "+A.texelHeight:"",A?"#define CUBEUV_MAX_MIP "+A.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+f:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==hs?"#define TONE_MAPPING":"",t.toneMapping!==hs?mt.tonemapping_pars_fragment:"",t.toneMapping!==hs?KB("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",mt.colorspace_pars_fragment,XB("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
3582
3582
  `].filter(ql).join(`
3583
3583
  `)),l=OA(l),l=b_(l,t),l=L_(l,t),c=OA(c),c=b_(c,t),c=L_(c,t),l=D_(l),c=D_(c),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(S=`#version 300 es
3584
3584
  `,_=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
@@ -3589,7 +3589,7 @@ precision `+i.precision+" int;";return i.precision==="highp"?e+=`
3589
3589
 
3590
3590
  Program Info Log: `+k+`
3591
3591
  `+te+`
3592
- `+Y)}else k!==""?console.warn("THREE.WebGLProgram: Program Info Log:",k):(O===""||F==="")&&(X=!1);X&&(N.diagnostics={runnable:V,programLog:k,vertexShader:{log:O,prefix:_},fragmentShader:{log:F,prefix:v}})}r.deleteShader(w),r.deleteShader(b),L=new Xu(r,C),R=$B(r,C)}let L;this.getUniforms=function(){return L===void 0&&B(this),L};let R;this.getAttributes=function(){return R===void 0&&B(this),R};let T=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return T===!1&&(T=r.getProgramParameter(C,WB)),T},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(C),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=jB++,this.cacheKey=e,this.usedTimes=1,this.program=C,this.vertexShader=w,this.fragmentShader=b,this}let fR=0;class hR{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),o=this._getShaderStage(n),l=this._getShaderCacheForMaterial(e);return l.has(r)===!1&&(l.add(r),r.usedTimes++),l.has(o)===!1&&(l.add(o),o.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new dR(e),t.set(e,n)),n}}class dR{constructor(e){this.id=fR++,this.code=e,this.usedTimes=0}}function AR(i,e,t,n,r,o,l){const c=new xA,f=new hR,u=[],d=r.isWebGL2,p=r.logarithmicDepthBuffer,A=r.vertexTextures;let g=r.precision;const E={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function C(R){return R===0?"uv":`uv${R}`}function _(R,T,N,k,O){const F=k.fog,V=O.geometry,X=R.isMeshStandardMaterial?k.environment:null,te=(R.isMeshStandardMaterial?t:e).get(R.envMap||X),Y=te&&te.mapping===au?te.image.height:null,$=E[R.type];R.precision!==null&&(g=r.getMaxPrecision(R.precision),g!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",g,"instead."));const U=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,D=U!==void 0?U.length:0;let G=0;V.morphAttributes.position!==void 0&&(G=1),V.morphAttributes.normal!==void 0&&(G=2),V.morphAttributes.color!==void 0&&(G=3);let K,J,Ae,ge;if($){const Wt=vr[$];K=Wt.vertexShader,J=Wt.fragmentShader}else K=R.vertexShader,J=R.fragmentShader,f.update(R),Ae=f.getVertexShaderID(R),ge=f.getFragmentShaderID(R);const be=i.getRenderTarget(),de=O.isInstancedMesh===!0,Oe=!!R.map,It=!!R.matcap,ot=!!te,oe=!!R.aoMap,Mt=!!R.lightMap,Ne=!!R.bumpMap,Ze=!!R.normalMap,_e=!!R.displacementMap,it=!!R.emissiveMap,Ue=!!R.metalnessMap,He=!!R.roughnessMap,$e=R.anisotropy>0,lt=R.clearcoat>0,mt=R.iridescence>0,H=R.sheen>0,Q=R.transmission>0,se=$e&&!!R.anisotropyMap,Ce=lt&&!!R.clearcoatMap,me=lt&&!!R.clearcoatNormalMap,xe=lt&&!!R.clearcoatRoughnessMap,We=mt&&!!R.iridescenceMap,Se=mt&&!!R.iridescenceThicknessMap,Re=H&&!!R.sheenColorMap,q=H&&!!R.sheenRoughnessMap,Me=!!R.specularMap,pe=!!R.specularColorMap,nt=!!R.specularIntensityMap,je=Q&&!!R.transmissionMap,Je=Q&&!!R.thicknessMap,Ge=!!R.gradientMap,Pe=!!R.alphaMap,dt=R.alphaTest>0,ee=!!R.alphaHash,Te=!!R.extensions,ye=!!V.attributes.uv1,he=!!V.attributes.uv2,we=!!V.attributes.uv3;let qe=hs;return R.toneMapped&&(be===null||be.isXRRenderTarget===!0)&&(qe=i.toneMapping),{isWebGL2:d,shaderID:$,shaderType:R.type,shaderName:R.name,vertexShader:K,fragmentShader:J,defines:R.defines,customVertexShaderID:Ae,customFragmentShaderID:ge,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:g,instancing:de,instancingColor:de&&O.instanceColor!==null,supportsVertexTextures:A,outputColorSpace:be===null?i.outputColorSpace:be.isXRRenderTarget===!0?be.texture.colorSpace:En,map:Oe,matcap:It,envMap:ot,envMapMode:ot&&te.mapping,envMapCubeUVHeight:Y,aoMap:oe,lightMap:Mt,bumpMap:Ne,normalMap:Ze,displacementMap:A&&_e,emissiveMap:it,normalMapObjectSpace:Ze&&R.normalMapType===jM,normalMapTangentSpace:Ze&&R.normalMapType===D1,metalnessMap:Ue,roughnessMap:He,anisotropy:$e,anisotropyMap:se,clearcoat:lt,clearcoatMap:Ce,clearcoatNormalMap:me,clearcoatRoughnessMap:xe,iridescence:mt,iridescenceMap:We,iridescenceThicknessMap:Se,sheen:H,sheenColorMap:Re,sheenRoughnessMap:q,specularMap:Me,specularColorMap:pe,specularIntensityMap:nt,transmission:Q,transmissionMap:je,thicknessMap:Je,gradientMap:Ge,opaque:R.transparent===!1&&R.blending===Yo,alphaMap:Pe,alphaTest:dt,alphaHash:ee,combine:R.combine,mapUv:Oe&&C(R.map.channel),aoMapUv:oe&&C(R.aoMap.channel),lightMapUv:Mt&&C(R.lightMap.channel),bumpMapUv:Ne&&C(R.bumpMap.channel),normalMapUv:Ze&&C(R.normalMap.channel),displacementMapUv:_e&&C(R.displacementMap.channel),emissiveMapUv:it&&C(R.emissiveMap.channel),metalnessMapUv:Ue&&C(R.metalnessMap.channel),roughnessMapUv:He&&C(R.roughnessMap.channel),anisotropyMapUv:se&&C(R.anisotropyMap.channel),clearcoatMapUv:Ce&&C(R.clearcoatMap.channel),clearcoatNormalMapUv:me&&C(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:xe&&C(R.clearcoatRoughnessMap.channel),iridescenceMapUv:We&&C(R.iridescenceMap.channel),iridescenceThicknessMapUv:Se&&C(R.iridescenceThicknessMap.channel),sheenColorMapUv:Re&&C(R.sheenColorMap.channel),sheenRoughnessMapUv:q&&C(R.sheenRoughnessMap.channel),specularMapUv:Me&&C(R.specularMap.channel),specularColorMapUv:pe&&C(R.specularColorMap.channel),specularIntensityMapUv:nt&&C(R.specularIntensityMap.channel),transmissionMapUv:je&&C(R.transmissionMap.channel),thicknessMapUv:Je&&C(R.thicknessMap.channel),alphaMapUv:Pe&&C(R.alphaMap.channel),vertexTangents:!!V.attributes.tangent&&(Ze||$e),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,vertexUv1s:ye,vertexUv2s:he,vertexUv3s:we,pointsUvs:O.isPoints===!0&&!!V.attributes.uv&&(Oe||Pe),fog:!!F,useFog:R.fog===!0,fogExp2:F&&F.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:p,skinning:O.isSkinnedMesh===!0,morphTargets:V.morphAttributes.position!==void 0,morphNormals:V.morphAttributes.normal!==void 0,morphColors:V.morphAttributes.color!==void 0,morphTargetsCount:D,morphTextureStride:G,numDirLights:T.directional.length,numPointLights:T.point.length,numSpotLights:T.spot.length,numSpotLightMaps:T.spotLightMap.length,numRectAreaLights:T.rectArea.length,numHemiLights:T.hemi.length,numDirLightShadows:T.directionalShadowMap.length,numPointLightShadows:T.pointShadowMap.length,numSpotLightShadows:T.spotShadowMap.length,numSpotLightShadowsWithMaps:T.numSpotLightShadowsWithMaps,numLightProbes:T.numLightProbes,numClippingPlanes:l.numPlanes,numClipIntersection:l.numIntersection,dithering:R.dithering,shadowMapEnabled:i.shadowMap.enabled&&N.length>0,shadowMapType:i.shadowMap.type,toneMapping:qe,useLegacyLights:i._useLegacyLights,decodeVideoTexture:Oe&&R.map.isVideoTexture===!0&&Nt.getTransfer(R.map.colorSpace)===Vt,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===Yi,flipSided:R.side===Bn,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionDerivatives:Te&&R.extensions.derivatives===!0,extensionFragDepth:Te&&R.extensions.fragDepth===!0,extensionDrawBuffers:Te&&R.extensions.drawBuffers===!0,extensionShaderTextureLOD:Te&&R.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||n.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()}}function v(R){const T=[];if(R.shaderID?T.push(R.shaderID):(T.push(R.customVertexShaderID),T.push(R.customFragmentShaderID)),R.defines!==void 0)for(const N in R.defines)T.push(N),T.push(R.defines[N]);return R.isRawShaderMaterial===!1&&(S(T,R),y(T,R),T.push(i.outputColorSpace)),T.push(R.customProgramCacheKey),T.join()}function S(R,T){R.push(T.precision),R.push(T.outputColorSpace),R.push(T.envMapMode),R.push(T.envMapCubeUVHeight),R.push(T.mapUv),R.push(T.alphaMapUv),R.push(T.lightMapUv),R.push(T.aoMapUv),R.push(T.bumpMapUv),R.push(T.normalMapUv),R.push(T.displacementMapUv),R.push(T.emissiveMapUv),R.push(T.metalnessMapUv),R.push(T.roughnessMapUv),R.push(T.anisotropyMapUv),R.push(T.clearcoatMapUv),R.push(T.clearcoatNormalMapUv),R.push(T.clearcoatRoughnessMapUv),R.push(T.iridescenceMapUv),R.push(T.iridescenceThicknessMapUv),R.push(T.sheenColorMapUv),R.push(T.sheenRoughnessMapUv),R.push(T.specularMapUv),R.push(T.specularColorMapUv),R.push(T.specularIntensityMapUv),R.push(T.transmissionMapUv),R.push(T.thicknessMapUv),R.push(T.combine),R.push(T.fogExp2),R.push(T.sizeAttenuation),R.push(T.morphTargetsCount),R.push(T.morphAttributeCount),R.push(T.numDirLights),R.push(T.numPointLights),R.push(T.numSpotLights),R.push(T.numSpotLightMaps),R.push(T.numHemiLights),R.push(T.numRectAreaLights),R.push(T.numDirLightShadows),R.push(T.numPointLightShadows),R.push(T.numSpotLightShadows),R.push(T.numSpotLightShadowsWithMaps),R.push(T.numLightProbes),R.push(T.shadowMapType),R.push(T.toneMapping),R.push(T.numClippingPlanes),R.push(T.numClipIntersection),R.push(T.depthPacking)}function y(R,T){c.disableAll(),T.isWebGL2&&c.enable(0),T.supportsVertexTextures&&c.enable(1),T.instancing&&c.enable(2),T.instancingColor&&c.enable(3),T.matcap&&c.enable(4),T.envMap&&c.enable(5),T.normalMapObjectSpace&&c.enable(6),T.normalMapTangentSpace&&c.enable(7),T.clearcoat&&c.enable(8),T.iridescence&&c.enable(9),T.alphaTest&&c.enable(10),T.vertexColors&&c.enable(11),T.vertexAlphas&&c.enable(12),T.vertexUv1s&&c.enable(13),T.vertexUv2s&&c.enable(14),T.vertexUv3s&&c.enable(15),T.vertexTangents&&c.enable(16),T.anisotropy&&c.enable(17),T.alphaHash&&c.enable(18),R.push(c.mask),c.disableAll(),T.fog&&c.enable(0),T.useFog&&c.enable(1),T.flatShading&&c.enable(2),T.logarithmicDepthBuffer&&c.enable(3),T.skinning&&c.enable(4),T.morphTargets&&c.enable(5),T.morphNormals&&c.enable(6),T.morphColors&&c.enable(7),T.premultipliedAlpha&&c.enable(8),T.shadowMapEnabled&&c.enable(9),T.useLegacyLights&&c.enable(10),T.doubleSided&&c.enable(11),T.flipSided&&c.enable(12),T.useDepthPacking&&c.enable(13),T.dithering&&c.enable(14),T.transmission&&c.enable(15),T.sheen&&c.enable(16),T.opaque&&c.enable(17),T.pointsUvs&&c.enable(18),T.decodeVideoTexture&&c.enable(19),R.push(c.mask)}function x(R){const T=E[R.type];let N;if(T){const k=vr[T];N=Hu.clone(k.uniforms)}else N=R.uniforms;return N}function w(R,T){let N;for(let k=0,O=u.length;k<O;k++){const F=u[k];if(F.cacheKey===T){N=F,++N.usedTimes;break}}return N===void 0&&(N=new uR(i,T,R,o),u.push(N)),N}function b(R){if(--R.usedTimes===0){const T=u.indexOf(R);u[T]=u[u.length-1],u.pop(),R.destroy()}}function B(R){f.remove(R)}function L(){f.dispose()}return{getParameters:_,getProgramCacheKey:v,getUniforms:x,acquireProgram:w,releaseProgram:b,releaseShaderCache:B,programs:u,dispose:L}}function pR(){let i=new WeakMap;function e(o){let l=i.get(o);return l===void 0&&(l={},i.set(o,l)),l}function t(o){i.delete(o)}function n(o,l,c){i.get(o)[l]=c}function r(){i=new WeakMap}return{get:e,remove:t,update:n,dispose:r}}function gR(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.material.id!==e.material.id?i.material.id-e.material.id:i.z!==e.z?i.z-e.z:i.id-e.id}function P_(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.z!==e.z?e.z-i.z:i.id-e.id}function U_(){const i=[];let e=0;const t=[],n=[],r=[];function o(){e=0,t.length=0,n.length=0,r.length=0}function l(p,A,g,E,C,_){let v=i[e];return v===void 0?(v={id:p.id,object:p,geometry:A,material:g,groupOrder:E,renderOrder:p.renderOrder,z:C,group:_},i[e]=v):(v.id=p.id,v.object=p,v.geometry=A,v.material=g,v.groupOrder=E,v.renderOrder=p.renderOrder,v.z=C,v.group=_),e++,v}function c(p,A,g,E,C,_){const v=l(p,A,g,E,C,_);g.transmission>0?n.push(v):g.transparent===!0?r.push(v):t.push(v)}function f(p,A,g,E,C,_){const v=l(p,A,g,E,C,_);g.transmission>0?n.unshift(v):g.transparent===!0?r.unshift(v):t.unshift(v)}function u(p,A){t.length>1&&t.sort(p||gR),n.length>1&&n.sort(A||P_),r.length>1&&r.sort(A||P_)}function d(){for(let p=e,A=i.length;p<A;p++){const g=i[p];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:n,transparent:r,init:o,push:c,unshift:f,finish:d,sort:u}}function mR(){let i=new WeakMap;function e(n,r){const o=i.get(n);let l;return o===void 0?(l=new U_,i.set(n,[l])):r>=o.length?(l=new U_,o.push(l)):l=o[r],l}function t(){i=new WeakMap}return{get:e,dispose:t}}function vR(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new j,color:new tt};break;case"SpotLight":t={position:new j,direction:new j,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new j,color:new tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new j,skyColor:new tt,groundColor:new tt};break;case"RectAreaLight":t={color:new tt,position:new j,halfWidth:new j,halfHeight:new j};break}return i[e.id]=t,t}}}function _R(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ke};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ke};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ke,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}let ER=0;function yR(i,e){return(e.castShadow?2:0)-(i.castShadow?2:0)+(e.map?1:0)-(i.map?1:0)}function CR(i,e){const t=new vR,n=_R(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)r.probe.push(new j);const o=new j,l=new ct,c=new ct;function f(d,p){let A=0,g=0,E=0;for(let k=0;k<9;k++)r.probe[k].set(0,0,0);let C=0,_=0,v=0,S=0,y=0,x=0,w=0,b=0,B=0,L=0,R=0;d.sort(yR);const T=p===!0?Math.PI:1;for(let k=0,O=d.length;k<O;k++){const F=d[k],V=F.color,X=F.intensity,te=F.distance,Y=F.shadow&&F.shadow.map?F.shadow.map.texture:null;if(F.isAmbientLight)A+=V.r*X*T,g+=V.g*X*T,E+=V.b*X*T;else if(F.isLightProbe){for(let $=0;$<9;$++)r.probe[$].addScaledVector(F.sh.coefficients[$],X);R++}else if(F.isDirectionalLight){const $=t.get(F);if($.color.copy(F.color).multiplyScalar(F.intensity*T),F.castShadow){const U=F.shadow,D=n.get(F);D.shadowBias=U.bias,D.shadowNormalBias=U.normalBias,D.shadowRadius=U.radius,D.shadowMapSize=U.mapSize,r.directionalShadow[C]=D,r.directionalShadowMap[C]=Y,r.directionalShadowMatrix[C]=F.shadow.matrix,x++}r.directional[C]=$,C++}else if(F.isSpotLight){const $=t.get(F);$.position.setFromMatrixPosition(F.matrixWorld),$.color.copy(V).multiplyScalar(X*T),$.distance=te,$.coneCos=Math.cos(F.angle),$.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),$.decay=F.decay,r.spot[v]=$;const U=F.shadow;if(F.map&&(r.spotLightMap[B]=F.map,B++,U.updateMatrices(F),F.castShadow&&L++),r.spotLightMatrix[v]=U.matrix,F.castShadow){const D=n.get(F);D.shadowBias=U.bias,D.shadowNormalBias=U.normalBias,D.shadowRadius=U.radius,D.shadowMapSize=U.mapSize,r.spotShadow[v]=D,r.spotShadowMap[v]=Y,b++}v++}else if(F.isRectAreaLight){const $=t.get(F);$.color.copy(V).multiplyScalar(X),$.halfWidth.set(F.width*.5,0,0),$.halfHeight.set(0,F.height*.5,0),r.rectArea[S]=$,S++}else if(F.isPointLight){const $=t.get(F);if($.color.copy(F.color).multiplyScalar(F.intensity*T),$.distance=F.distance,$.decay=F.decay,F.castShadow){const U=F.shadow,D=n.get(F);D.shadowBias=U.bias,D.shadowNormalBias=U.normalBias,D.shadowRadius=U.radius,D.shadowMapSize=U.mapSize,D.shadowCameraNear=U.camera.near,D.shadowCameraFar=U.camera.far,r.pointShadow[_]=D,r.pointShadowMap[_]=Y,r.pointShadowMatrix[_]=F.shadow.matrix,w++}r.point[_]=$,_++}else if(F.isHemisphereLight){const $=t.get(F);$.skyColor.copy(F.color).multiplyScalar(X*T),$.groundColor.copy(F.groundColor).multiplyScalar(X*T),r.hemi[y]=$,y++}}S>0&&(e.isWebGL2||i.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Le.LTC_FLOAT_1,r.rectAreaLTC2=Le.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Le.LTC_HALF_1,r.rectAreaLTC2=Le.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=A,r.ambient[1]=g,r.ambient[2]=E;const N=r.hash;(N.directionalLength!==C||N.pointLength!==_||N.spotLength!==v||N.rectAreaLength!==S||N.hemiLength!==y||N.numDirectionalShadows!==x||N.numPointShadows!==w||N.numSpotShadows!==b||N.numSpotMaps!==B||N.numLightProbes!==R)&&(r.directional.length=C,r.spot.length=v,r.rectArea.length=S,r.point.length=_,r.hemi.length=y,r.directionalShadow.length=x,r.directionalShadowMap.length=x,r.pointShadow.length=w,r.pointShadowMap.length=w,r.spotShadow.length=b,r.spotShadowMap.length=b,r.directionalShadowMatrix.length=x,r.pointShadowMatrix.length=w,r.spotLightMatrix.length=b+B-L,r.spotLightMap.length=B,r.numSpotLightShadowsWithMaps=L,r.numLightProbes=R,N.directionalLength=C,N.pointLength=_,N.spotLength=v,N.rectAreaLength=S,N.hemiLength=y,N.numDirectionalShadows=x,N.numPointShadows=w,N.numSpotShadows=b,N.numSpotMaps=B,N.numLightProbes=R,r.version=ER++)}function u(d,p){let A=0,g=0,E=0,C=0,_=0;const v=p.matrixWorldInverse;for(let S=0,y=d.length;S<y;S++){const x=d[S];if(x.isDirectionalLight){const w=r.directional[A];w.direction.setFromMatrixPosition(x.matrixWorld),o.setFromMatrixPosition(x.target.matrixWorld),w.direction.sub(o),w.direction.transformDirection(v),A++}else if(x.isSpotLight){const w=r.spot[E];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(v),w.direction.setFromMatrixPosition(x.matrixWorld),o.setFromMatrixPosition(x.target.matrixWorld),w.direction.sub(o),w.direction.transformDirection(v),E++}else if(x.isRectAreaLight){const w=r.rectArea[C];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(v),c.identity(),l.copy(x.matrixWorld),l.premultiply(v),c.extractRotation(l),w.halfWidth.set(x.width*.5,0,0),w.halfHeight.set(0,x.height*.5,0),w.halfWidth.applyMatrix4(c),w.halfHeight.applyMatrix4(c),C++}else if(x.isPointLight){const w=r.point[g];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(v),g++}else if(x.isHemisphereLight){const w=r.hemi[_];w.direction.setFromMatrixPosition(x.matrixWorld),w.direction.transformDirection(v),_++}}}return{setup:f,setupView:u,state:r}}function k_(i,e){const t=new CR(i,e),n=[],r=[];function o(){n.length=0,r.length=0}function l(p){n.push(p)}function c(p){r.push(p)}function f(p){t.setup(n,p)}function u(p){t.setupView(n,p)}return{init:o,state:{lightsArray:n,shadowsArray:r,lights:t},setupLights:f,setupLightsView:u,pushLight:l,pushShadow:c}}function IR(i,e){let t=new WeakMap;function n(o,l=0){const c=t.get(o);let f;return c===void 0?(f=new k_(i,e),t.set(o,[f])):l>=c.length?(f=new k_(i,e),c.push(f)):f=c[l],f}function r(){t=new WeakMap}return{get:n,dispose:r}}class F_ extends gr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=VM,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class xR extends gr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const SR=`void main() {
3592
+ `+Y)}else k!==""?console.warn("THREE.WebGLProgram: Program Info Log:",k):(O===""||F==="")&&(X=!1);X&&(N.diagnostics={runnable:V,programLog:k,vertexShader:{log:O,prefix:_},fragmentShader:{log:F,prefix:v}})}r.deleteShader(w),r.deleteShader(b),L=new Xu(r,C),R=$B(r,C)}let L;this.getUniforms=function(){return L===void 0&&B(this),L};let R;this.getAttributes=function(){return R===void 0&&B(this),R};let T=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return T===!1&&(T=r.getProgramParameter(C,WB)),T},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(C),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=jB++,this.cacheKey=e,this.usedTimes=1,this.program=C,this.vertexShader=w,this.fragmentShader=b,this}let fR=0;class hR{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),o=this._getShaderStage(n),l=this._getShaderCacheForMaterial(e);return l.has(r)===!1&&(l.add(r),r.usedTimes++),l.has(o)===!1&&(l.add(o),o.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new dR(e),t.set(e,n)),n}}class dR{constructor(e){this.id=fR++,this.code=e,this.usedTimes=0}}function AR(i,e,t,n,r,o,l){const c=new xA,f=new hR,u=[],d=r.isWebGL2,p=r.logarithmicDepthBuffer,A=r.vertexTextures;let g=r.precision;const E={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function C(R){return R===0?"uv":`uv${R}`}function _(R,T,N,k,O){const F=k.fog,V=O.geometry,X=R.isMeshStandardMaterial?k.environment:null,te=(R.isMeshStandardMaterial?t:e).get(R.envMap||X),Y=te&&te.mapping===au?te.image.height:null,$=E[R.type];R.precision!==null&&(g=r.getMaxPrecision(R.precision),g!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",g,"instead."));const U=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,D=U!==void 0?U.length:0;let G=0;V.morphAttributes.position!==void 0&&(G=1),V.morphAttributes.normal!==void 0&&(G=2),V.morphAttributes.color!==void 0&&(G=3);let K,J,Ae,ge;if($){const Wt=vr[$];K=Wt.vertexShader,J=Wt.fragmentShader}else K=R.vertexShader,J=R.fragmentShader,f.update(R),Ae=f.getVertexShaderID(R),ge=f.getFragmentShaderID(R);const be=i.getRenderTarget(),de=O.isInstancedMesh===!0,Oe=!!R.map,It=!!R.matcap,ot=!!te,oe=!!R.aoMap,Mt=!!R.lightMap,Ne=!!R.bumpMap,Ze=!!R.normalMap,_e=!!R.displacementMap,it=!!R.emissiveMap,Ue=!!R.metalnessMap,He=!!R.roughnessMap,$e=R.anisotropy>0,at=R.clearcoat>0,At=R.iridescence>0,H=R.sheen>0,Q=R.transmission>0,se=$e&&!!R.anisotropyMap,Ce=at&&!!R.clearcoatMap,me=at&&!!R.clearcoatNormalMap,xe=at&&!!R.clearcoatRoughnessMap,We=At&&!!R.iridescenceMap,Se=At&&!!R.iridescenceThicknessMap,Re=H&&!!R.sheenColorMap,q=H&&!!R.sheenRoughnessMap,Me=!!R.specularMap,pe=!!R.specularColorMap,nt=!!R.specularIntensityMap,je=Q&&!!R.transmissionMap,Je=Q&&!!R.thicknessMap,Ge=!!R.gradientMap,Pe=!!R.alphaMap,dt=R.alphaTest>0,ee=!!R.alphaHash,Te=!!R.extensions,ye=!!V.attributes.uv1,he=!!V.attributes.uv2,we=!!V.attributes.uv3;let qe=hs;return R.toneMapped&&(be===null||be.isXRRenderTarget===!0)&&(qe=i.toneMapping),{isWebGL2:d,shaderID:$,shaderType:R.type,shaderName:R.name,vertexShader:K,fragmentShader:J,defines:R.defines,customVertexShaderID:Ae,customFragmentShaderID:ge,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:g,instancing:de,instancingColor:de&&O.instanceColor!==null,supportsVertexTextures:A,outputColorSpace:be===null?i.outputColorSpace:be.isXRRenderTarget===!0?be.texture.colorSpace:En,map:Oe,matcap:It,envMap:ot,envMapMode:ot&&te.mapping,envMapCubeUVHeight:Y,aoMap:oe,lightMap:Mt,bumpMap:Ne,normalMap:Ze,displacementMap:A&&_e,emissiveMap:it,normalMapObjectSpace:Ze&&R.normalMapType===jM,normalMapTangentSpace:Ze&&R.normalMapType===D1,metalnessMap:Ue,roughnessMap:He,anisotropy:$e,anisotropyMap:se,clearcoat:at,clearcoatMap:Ce,clearcoatNormalMap:me,clearcoatRoughnessMap:xe,iridescence:At,iridescenceMap:We,iridescenceThicknessMap:Se,sheen:H,sheenColorMap:Re,sheenRoughnessMap:q,specularMap:Me,specularColorMap:pe,specularIntensityMap:nt,transmission:Q,transmissionMap:je,thicknessMap:Je,gradientMap:Ge,opaque:R.transparent===!1&&R.blending===Yo,alphaMap:Pe,alphaTest:dt,alphaHash:ee,combine:R.combine,mapUv:Oe&&C(R.map.channel),aoMapUv:oe&&C(R.aoMap.channel),lightMapUv:Mt&&C(R.lightMap.channel),bumpMapUv:Ne&&C(R.bumpMap.channel),normalMapUv:Ze&&C(R.normalMap.channel),displacementMapUv:_e&&C(R.displacementMap.channel),emissiveMapUv:it&&C(R.emissiveMap.channel),metalnessMapUv:Ue&&C(R.metalnessMap.channel),roughnessMapUv:He&&C(R.roughnessMap.channel),anisotropyMapUv:se&&C(R.anisotropyMap.channel),clearcoatMapUv:Ce&&C(R.clearcoatMap.channel),clearcoatNormalMapUv:me&&C(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:xe&&C(R.clearcoatRoughnessMap.channel),iridescenceMapUv:We&&C(R.iridescenceMap.channel),iridescenceThicknessMapUv:Se&&C(R.iridescenceThicknessMap.channel),sheenColorMapUv:Re&&C(R.sheenColorMap.channel),sheenRoughnessMapUv:q&&C(R.sheenRoughnessMap.channel),specularMapUv:Me&&C(R.specularMap.channel),specularColorMapUv:pe&&C(R.specularColorMap.channel),specularIntensityMapUv:nt&&C(R.specularIntensityMap.channel),transmissionMapUv:je&&C(R.transmissionMap.channel),thicknessMapUv:Je&&C(R.thicknessMap.channel),alphaMapUv:Pe&&C(R.alphaMap.channel),vertexTangents:!!V.attributes.tangent&&(Ze||$e),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,vertexUv1s:ye,vertexUv2s:he,vertexUv3s:we,pointsUvs:O.isPoints===!0&&!!V.attributes.uv&&(Oe||Pe),fog:!!F,useFog:R.fog===!0,fogExp2:F&&F.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:p,skinning:O.isSkinnedMesh===!0,morphTargets:V.morphAttributes.position!==void 0,morphNormals:V.morphAttributes.normal!==void 0,morphColors:V.morphAttributes.color!==void 0,morphTargetsCount:D,morphTextureStride:G,numDirLights:T.directional.length,numPointLights:T.point.length,numSpotLights:T.spot.length,numSpotLightMaps:T.spotLightMap.length,numRectAreaLights:T.rectArea.length,numHemiLights:T.hemi.length,numDirLightShadows:T.directionalShadowMap.length,numPointLightShadows:T.pointShadowMap.length,numSpotLightShadows:T.spotShadowMap.length,numSpotLightShadowsWithMaps:T.numSpotLightShadowsWithMaps,numLightProbes:T.numLightProbes,numClippingPlanes:l.numPlanes,numClipIntersection:l.numIntersection,dithering:R.dithering,shadowMapEnabled:i.shadowMap.enabled&&N.length>0,shadowMapType:i.shadowMap.type,toneMapping:qe,useLegacyLights:i._useLegacyLights,decodeVideoTexture:Oe&&R.map.isVideoTexture===!0&&Nt.getTransfer(R.map.colorSpace)===Vt,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===Yi,flipSided:R.side===Bn,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionDerivatives:Te&&R.extensions.derivatives===!0,extensionFragDepth:Te&&R.extensions.fragDepth===!0,extensionDrawBuffers:Te&&R.extensions.drawBuffers===!0,extensionShaderTextureLOD:Te&&R.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||n.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()}}function v(R){const T=[];if(R.shaderID?T.push(R.shaderID):(T.push(R.customVertexShaderID),T.push(R.customFragmentShaderID)),R.defines!==void 0)for(const N in R.defines)T.push(N),T.push(R.defines[N]);return R.isRawShaderMaterial===!1&&(S(T,R),y(T,R),T.push(i.outputColorSpace)),T.push(R.customProgramCacheKey),T.join()}function S(R,T){R.push(T.precision),R.push(T.outputColorSpace),R.push(T.envMapMode),R.push(T.envMapCubeUVHeight),R.push(T.mapUv),R.push(T.alphaMapUv),R.push(T.lightMapUv),R.push(T.aoMapUv),R.push(T.bumpMapUv),R.push(T.normalMapUv),R.push(T.displacementMapUv),R.push(T.emissiveMapUv),R.push(T.metalnessMapUv),R.push(T.roughnessMapUv),R.push(T.anisotropyMapUv),R.push(T.clearcoatMapUv),R.push(T.clearcoatNormalMapUv),R.push(T.clearcoatRoughnessMapUv),R.push(T.iridescenceMapUv),R.push(T.iridescenceThicknessMapUv),R.push(T.sheenColorMapUv),R.push(T.sheenRoughnessMapUv),R.push(T.specularMapUv),R.push(T.specularColorMapUv),R.push(T.specularIntensityMapUv),R.push(T.transmissionMapUv),R.push(T.thicknessMapUv),R.push(T.combine),R.push(T.fogExp2),R.push(T.sizeAttenuation),R.push(T.morphTargetsCount),R.push(T.morphAttributeCount),R.push(T.numDirLights),R.push(T.numPointLights),R.push(T.numSpotLights),R.push(T.numSpotLightMaps),R.push(T.numHemiLights),R.push(T.numRectAreaLights),R.push(T.numDirLightShadows),R.push(T.numPointLightShadows),R.push(T.numSpotLightShadows),R.push(T.numSpotLightShadowsWithMaps),R.push(T.numLightProbes),R.push(T.shadowMapType),R.push(T.toneMapping),R.push(T.numClippingPlanes),R.push(T.numClipIntersection),R.push(T.depthPacking)}function y(R,T){c.disableAll(),T.isWebGL2&&c.enable(0),T.supportsVertexTextures&&c.enable(1),T.instancing&&c.enable(2),T.instancingColor&&c.enable(3),T.matcap&&c.enable(4),T.envMap&&c.enable(5),T.normalMapObjectSpace&&c.enable(6),T.normalMapTangentSpace&&c.enable(7),T.clearcoat&&c.enable(8),T.iridescence&&c.enable(9),T.alphaTest&&c.enable(10),T.vertexColors&&c.enable(11),T.vertexAlphas&&c.enable(12),T.vertexUv1s&&c.enable(13),T.vertexUv2s&&c.enable(14),T.vertexUv3s&&c.enable(15),T.vertexTangents&&c.enable(16),T.anisotropy&&c.enable(17),T.alphaHash&&c.enable(18),R.push(c.mask),c.disableAll(),T.fog&&c.enable(0),T.useFog&&c.enable(1),T.flatShading&&c.enable(2),T.logarithmicDepthBuffer&&c.enable(3),T.skinning&&c.enable(4),T.morphTargets&&c.enable(5),T.morphNormals&&c.enable(6),T.morphColors&&c.enable(7),T.premultipliedAlpha&&c.enable(8),T.shadowMapEnabled&&c.enable(9),T.useLegacyLights&&c.enable(10),T.doubleSided&&c.enable(11),T.flipSided&&c.enable(12),T.useDepthPacking&&c.enable(13),T.dithering&&c.enable(14),T.transmission&&c.enable(15),T.sheen&&c.enable(16),T.opaque&&c.enable(17),T.pointsUvs&&c.enable(18),T.decodeVideoTexture&&c.enable(19),R.push(c.mask)}function x(R){const T=E[R.type];let N;if(T){const k=vr[T];N=Hu.clone(k.uniforms)}else N=R.uniforms;return N}function w(R,T){let N;for(let k=0,O=u.length;k<O;k++){const F=u[k];if(F.cacheKey===T){N=F,++N.usedTimes;break}}return N===void 0&&(N=new uR(i,T,R,o),u.push(N)),N}function b(R){if(--R.usedTimes===0){const T=u.indexOf(R);u[T]=u[u.length-1],u.pop(),R.destroy()}}function B(R){f.remove(R)}function L(){f.dispose()}return{getParameters:_,getProgramCacheKey:v,getUniforms:x,acquireProgram:w,releaseProgram:b,releaseShaderCache:B,programs:u,dispose:L}}function pR(){let i=new WeakMap;function e(o){let l=i.get(o);return l===void 0&&(l={},i.set(o,l)),l}function t(o){i.delete(o)}function n(o,l,c){i.get(o)[l]=c}function r(){i=new WeakMap}return{get:e,remove:t,update:n,dispose:r}}function gR(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.material.id!==e.material.id?i.material.id-e.material.id:i.z!==e.z?i.z-e.z:i.id-e.id}function P_(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.z!==e.z?e.z-i.z:i.id-e.id}function U_(){const i=[];let e=0;const t=[],n=[],r=[];function o(){e=0,t.length=0,n.length=0,r.length=0}function l(p,A,g,E,C,_){let v=i[e];return v===void 0?(v={id:p.id,object:p,geometry:A,material:g,groupOrder:E,renderOrder:p.renderOrder,z:C,group:_},i[e]=v):(v.id=p.id,v.object=p,v.geometry=A,v.material=g,v.groupOrder=E,v.renderOrder=p.renderOrder,v.z=C,v.group=_),e++,v}function c(p,A,g,E,C,_){const v=l(p,A,g,E,C,_);g.transmission>0?n.push(v):g.transparent===!0?r.push(v):t.push(v)}function f(p,A,g,E,C,_){const v=l(p,A,g,E,C,_);g.transmission>0?n.unshift(v):g.transparent===!0?r.unshift(v):t.unshift(v)}function u(p,A){t.length>1&&t.sort(p||gR),n.length>1&&n.sort(A||P_),r.length>1&&r.sort(A||P_)}function d(){for(let p=e,A=i.length;p<A;p++){const g=i[p];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:t,transmissive:n,transparent:r,init:o,push:c,unshift:f,finish:d,sort:u}}function mR(){let i=new WeakMap;function e(n,r){const o=i.get(n);let l;return o===void 0?(l=new U_,i.set(n,[l])):r>=o.length?(l=new U_,o.push(l)):l=o[r],l}function t(){i=new WeakMap}return{get:e,dispose:t}}function vR(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new j,color:new tt};break;case"SpotLight":t={position:new j,direction:new j,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new j,color:new tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new j,skyColor:new tt,groundColor:new tt};break;case"RectAreaLight":t={color:new tt,position:new j,halfWidth:new j,halfHeight:new j};break}return i[e.id]=t,t}}}function _R(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ke};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ke};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ke,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}let ER=0;function yR(i,e){return(e.castShadow?2:0)-(i.castShadow?2:0)+(e.map?1:0)-(i.map?1:0)}function CR(i,e){const t=new vR,n=_R(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)r.probe.push(new j);const o=new j,l=new ct,c=new ct;function f(d,p){let A=0,g=0,E=0;for(let k=0;k<9;k++)r.probe[k].set(0,0,0);let C=0,_=0,v=0,S=0,y=0,x=0,w=0,b=0,B=0,L=0,R=0;d.sort(yR);const T=p===!0?Math.PI:1;for(let k=0,O=d.length;k<O;k++){const F=d[k],V=F.color,X=F.intensity,te=F.distance,Y=F.shadow&&F.shadow.map?F.shadow.map.texture:null;if(F.isAmbientLight)A+=V.r*X*T,g+=V.g*X*T,E+=V.b*X*T;else if(F.isLightProbe){for(let $=0;$<9;$++)r.probe[$].addScaledVector(F.sh.coefficients[$],X);R++}else if(F.isDirectionalLight){const $=t.get(F);if($.color.copy(F.color).multiplyScalar(F.intensity*T),F.castShadow){const U=F.shadow,D=n.get(F);D.shadowBias=U.bias,D.shadowNormalBias=U.normalBias,D.shadowRadius=U.radius,D.shadowMapSize=U.mapSize,r.directionalShadow[C]=D,r.directionalShadowMap[C]=Y,r.directionalShadowMatrix[C]=F.shadow.matrix,x++}r.directional[C]=$,C++}else if(F.isSpotLight){const $=t.get(F);$.position.setFromMatrixPosition(F.matrixWorld),$.color.copy(V).multiplyScalar(X*T),$.distance=te,$.coneCos=Math.cos(F.angle),$.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),$.decay=F.decay,r.spot[v]=$;const U=F.shadow;if(F.map&&(r.spotLightMap[B]=F.map,B++,U.updateMatrices(F),F.castShadow&&L++),r.spotLightMatrix[v]=U.matrix,F.castShadow){const D=n.get(F);D.shadowBias=U.bias,D.shadowNormalBias=U.normalBias,D.shadowRadius=U.radius,D.shadowMapSize=U.mapSize,r.spotShadow[v]=D,r.spotShadowMap[v]=Y,b++}v++}else if(F.isRectAreaLight){const $=t.get(F);$.color.copy(V).multiplyScalar(X),$.halfWidth.set(F.width*.5,0,0),$.halfHeight.set(0,F.height*.5,0),r.rectArea[S]=$,S++}else if(F.isPointLight){const $=t.get(F);if($.color.copy(F.color).multiplyScalar(F.intensity*T),$.distance=F.distance,$.decay=F.decay,F.castShadow){const U=F.shadow,D=n.get(F);D.shadowBias=U.bias,D.shadowNormalBias=U.normalBias,D.shadowRadius=U.radius,D.shadowMapSize=U.mapSize,D.shadowCameraNear=U.camera.near,D.shadowCameraFar=U.camera.far,r.pointShadow[_]=D,r.pointShadowMap[_]=Y,r.pointShadowMatrix[_]=F.shadow.matrix,w++}r.point[_]=$,_++}else if(F.isHemisphereLight){const $=t.get(F);$.skyColor.copy(F.color).multiplyScalar(X*T),$.groundColor.copy(F.groundColor).multiplyScalar(X*T),r.hemi[y]=$,y++}}S>0&&(e.isWebGL2||i.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Le.LTC_FLOAT_1,r.rectAreaLTC2=Le.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Le.LTC_HALF_1,r.rectAreaLTC2=Le.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=A,r.ambient[1]=g,r.ambient[2]=E;const N=r.hash;(N.directionalLength!==C||N.pointLength!==_||N.spotLength!==v||N.rectAreaLength!==S||N.hemiLength!==y||N.numDirectionalShadows!==x||N.numPointShadows!==w||N.numSpotShadows!==b||N.numSpotMaps!==B||N.numLightProbes!==R)&&(r.directional.length=C,r.spot.length=v,r.rectArea.length=S,r.point.length=_,r.hemi.length=y,r.directionalShadow.length=x,r.directionalShadowMap.length=x,r.pointShadow.length=w,r.pointShadowMap.length=w,r.spotShadow.length=b,r.spotShadowMap.length=b,r.directionalShadowMatrix.length=x,r.pointShadowMatrix.length=w,r.spotLightMatrix.length=b+B-L,r.spotLightMap.length=B,r.numSpotLightShadowsWithMaps=L,r.numLightProbes=R,N.directionalLength=C,N.pointLength=_,N.spotLength=v,N.rectAreaLength=S,N.hemiLength=y,N.numDirectionalShadows=x,N.numPointShadows=w,N.numSpotShadows=b,N.numSpotMaps=B,N.numLightProbes=R,r.version=ER++)}function u(d,p){let A=0,g=0,E=0,C=0,_=0;const v=p.matrixWorldInverse;for(let S=0,y=d.length;S<y;S++){const x=d[S];if(x.isDirectionalLight){const w=r.directional[A];w.direction.setFromMatrixPosition(x.matrixWorld),o.setFromMatrixPosition(x.target.matrixWorld),w.direction.sub(o),w.direction.transformDirection(v),A++}else if(x.isSpotLight){const w=r.spot[E];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(v),w.direction.setFromMatrixPosition(x.matrixWorld),o.setFromMatrixPosition(x.target.matrixWorld),w.direction.sub(o),w.direction.transformDirection(v),E++}else if(x.isRectAreaLight){const w=r.rectArea[C];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(v),c.identity(),l.copy(x.matrixWorld),l.premultiply(v),c.extractRotation(l),w.halfWidth.set(x.width*.5,0,0),w.halfHeight.set(0,x.height*.5,0),w.halfWidth.applyMatrix4(c),w.halfHeight.applyMatrix4(c),C++}else if(x.isPointLight){const w=r.point[g];w.position.setFromMatrixPosition(x.matrixWorld),w.position.applyMatrix4(v),g++}else if(x.isHemisphereLight){const w=r.hemi[_];w.direction.setFromMatrixPosition(x.matrixWorld),w.direction.transformDirection(v),_++}}}return{setup:f,setupView:u,state:r}}function k_(i,e){const t=new CR(i,e),n=[],r=[];function o(){n.length=0,r.length=0}function l(p){n.push(p)}function c(p){r.push(p)}function f(p){t.setup(n,p)}function u(p){t.setupView(n,p)}return{init:o,state:{lightsArray:n,shadowsArray:r,lights:t},setupLights:f,setupLightsView:u,pushLight:l,pushShadow:c}}function IR(i,e){let t=new WeakMap;function n(o,l=0){const c=t.get(o);let f;return c===void 0?(f=new k_(i,e),t.set(o,[f])):l>=c.length?(f=new k_(i,e),c.push(f)):f=c[l],f}function r(){t=new WeakMap}return{get:n,dispose:r}}class F_ extends gr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=VM,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class xR extends gr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const SR=`void main() {
3593
3593
  gl_Position = vec4( position, 1.0 );
3594
3594
  }`,wR=`uniform sampler2D shadow_pass;
3595
3595
  uniform vec2 resolution;
@@ -3617,7 +3617,7 @@ void main() {
3617
3617
  squared_mean = squared_mean / samples;
3618
3618
  float std_dev = sqrt( squared_mean - mean * mean );
3619
3619
  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
3620
- }`;function MR(i,e,t){let n=new DA;const r=new Ke,o=new Ke,l=new Gt,c=new F_({depthPacking:WM}),f=new xR,u={},d=t.maxTextureSize,p={[ji]:Bn,[Bn]:ji,[Yi]:Yi},A=new Si({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ke},radius:{value:4}},vertexShader:SR,fragmentShader:wR}),g=A.clone();g.defines.HORIZONTAL_PASS=1;const E=new xi;E.setAttribute("position",new bn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const C=new Wn(E,A),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=jv;let v=this.type;this.render=function(w,b,B){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||w.length===0)return;const L=i.getRenderTarget(),R=i.getActiveCubeFace(),T=i.getActiveMipmapLevel(),N=i.state;N.setBlending(Nr),N.buffers.color.setClear(1,1,1,1),N.buffers.depth.setTest(!0),N.setScissorTest(!1);const k=v!==Dr&&this.type===Dr,O=v===Dr&&this.type!==Dr;for(let F=0,V=w.length;F<V;F++){const X=w[F],te=X.shadow;if(te===void 0){console.warn("THREE.WebGLShadowMap:",X,"has no shadow.");continue}if(te.autoUpdate===!1&&te.needsUpdate===!1)continue;r.copy(te.mapSize);const Y=te.getFrameExtents();if(r.multiply(Y),o.copy(te.mapSize),(r.x>d||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/Y.x),r.x=o.x*Y.x,te.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/Y.y),r.y=o.y*Y.y,te.mapSize.y=o.y)),te.map===null||k===!0||O===!0){const U=this.type!==Dr?{minFilter:qt,magFilter:qt}:{};te.map!==null&&te.map.dispose(),te.map=new Xi(r.x,r.y,U),te.map.texture.name=X.name+".shadowMap",te.camera.updateProjectionMatrix()}i.setRenderTarget(te.map),i.clear();const $=te.getViewportCount();for(let U=0;U<$;U++){const D=te.getViewport(U);l.set(o.x*D.x,o.y*D.y,o.x*D.z,o.y*D.w),N.viewport(l),te.updateMatrices(X,U),n=te.getFrustum(),x(b,B,te.camera,X,this.type)}te.isPointLightShadow!==!0&&this.type===Dr&&S(te,B),te.needsUpdate=!1}v=this.type,_.needsUpdate=!1,i.setRenderTarget(L,R,T)};function S(w,b){const B=e.update(C);A.defines.VSM_SAMPLES!==w.blurSamples&&(A.defines.VSM_SAMPLES=w.blurSamples,g.defines.VSM_SAMPLES=w.blurSamples,A.needsUpdate=!0,g.needsUpdate=!0),w.mapPass===null&&(w.mapPass=new Xi(r.x,r.y)),A.uniforms.shadow_pass.value=w.map.texture,A.uniforms.resolution.value=w.mapSize,A.uniforms.radius.value=w.radius,i.setRenderTarget(w.mapPass),i.clear(),i.renderBufferDirect(b,null,B,A,C,null),g.uniforms.shadow_pass.value=w.mapPass.texture,g.uniforms.resolution.value=w.mapSize,g.uniforms.radius.value=w.radius,i.setRenderTarget(w.map),i.clear(),i.renderBufferDirect(b,null,B,g,C,null)}function y(w,b,B,L){let R=null;const T=B.isPointLight===!0?w.customDistanceMaterial:w.customDepthMaterial;if(T!==void 0)R=T;else if(R=B.isPointLight===!0?f:c,i.localClippingEnabled&&b.clipShadows===!0&&Array.isArray(b.clippingPlanes)&&b.clippingPlanes.length!==0||b.displacementMap&&b.displacementScale!==0||b.alphaMap&&b.alphaTest>0||b.map&&b.alphaTest>0){const N=R.uuid,k=b.uuid;let O=u[N];O===void 0&&(O={},u[N]=O);let F=O[k];F===void 0&&(F=R.clone(),O[k]=F),R=F}if(R.visible=b.visible,R.wireframe=b.wireframe,L===Dr?R.side=b.shadowSide!==null?b.shadowSide:b.side:R.side=b.shadowSide!==null?b.shadowSide:p[b.side],R.alphaMap=b.alphaMap,R.alphaTest=b.alphaTest,R.map=b.map,R.clipShadows=b.clipShadows,R.clippingPlanes=b.clippingPlanes,R.clipIntersection=b.clipIntersection,R.displacementMap=b.displacementMap,R.displacementScale=b.displacementScale,R.displacementBias=b.displacementBias,R.wireframeLinewidth=b.wireframeLinewidth,R.linewidth=b.linewidth,B.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const N=i.properties.get(R);N.light=B}return R}function x(w,b,B,L,R){if(w.visible===!1)return;if(w.layers.test(b.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&R===Dr)&&(!w.frustumCulled||n.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,w.matrixWorld);const k=e.update(w),O=w.material;if(Array.isArray(O)){const F=k.groups;for(let V=0,X=F.length;V<X;V++){const te=F[V],Y=O[te.materialIndex];if(Y&&Y.visible){const $=y(w,Y,L,R);i.renderBufferDirect(B,null,k,$,w,te)}}}else if(O.visible){const F=y(w,O,L,R);i.renderBufferDirect(B,null,k,F,w,null)}}const N=w.children;for(let k=0,O=N.length;k<O;k++)x(N[k],b,B,L,R)}}function TR(i,e,t){const n=t.isWebGL2;function r(){let ee=!1;const Te=new Gt;let ye=null;const he=new Gt(0,0,0,0);return{setMask:function(we){ye!==we&&!ee&&(i.colorMask(we,we,we,we),ye=we)},setLocked:function(we){ee=we},setClear:function(we,qe,At,Wt,Dn){Dn===!0&&(we*=Wt,qe*=Wt,At*=Wt),Te.set(we,qe,At,Wt),he.equals(Te)===!1&&(i.clearColor(we,qe,At,Wt),he.copy(Te))},reset:function(){ee=!1,ye=null,he.set(-1,0,0,0)}}}function o(){let ee=!1,Te=null,ye=null,he=null;return{setTest:function(we){we?Oe(i.DEPTH_TEST):It(i.DEPTH_TEST)},setMask:function(we){Te!==we&&!ee&&(i.depthMask(we),Te=we)},setFunc:function(we){if(ye!==we){switch(we){case MM:i.depthFunc(i.NEVER);break;case TM:i.depthFunc(i.ALWAYS);break;case BM:i.depthFunc(i.LESS);break;case ou:i.depthFunc(i.LEQUAL);break;case RM:i.depthFunc(i.EQUAL);break;case bM:i.depthFunc(i.GEQUAL);break;case LM:i.depthFunc(i.GREATER);break;case DM:i.depthFunc(i.NOTEQUAL);break;default:i.depthFunc(i.LEQUAL)}ye=we}},setLocked:function(we){ee=we},setClear:function(we){he!==we&&(i.clearDepth(we),he=we)},reset:function(){ee=!1,Te=null,ye=null,he=null}}}function l(){let ee=!1,Te=null,ye=null,he=null,we=null,qe=null,At=null,Wt=null,Dn=null;return{setTest:function(Tt){ee||(Tt?Oe(i.STENCIL_TEST):It(i.STENCIL_TEST))},setMask:function(Tt){Te!==Tt&&!ee&&(i.stencilMask(Tt),Te=Tt)},setFunc:function(Tt,an,Pt){(ye!==Tt||he!==an||we!==Pt)&&(i.stencilFunc(Tt,an,Pt),ye=Tt,he=an,we=Pt)},setOp:function(Tt,an,Pt){(qe!==Tt||At!==an||Wt!==Pt)&&(i.stencilOp(Tt,an,Pt),qe=Tt,At=an,Wt=Pt)},setLocked:function(Tt){ee=Tt},setClear:function(Tt){Dn!==Tt&&(i.clearStencil(Tt),Dn=Tt)},reset:function(){ee=!1,Te=null,ye=null,he=null,we=null,qe=null,At=null,Wt=null,Dn=null}}}const c=new r,f=new o,u=new l,d=new WeakMap,p=new WeakMap;let A={},g={},E=new WeakMap,C=[],_=null,v=!1,S=null,y=null,x=null,w=null,b=null,B=null,L=null,R=new tt(0,0,0),T=0,N=!1,k=null,O=null,F=null,V=null,X=null;const te=i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let Y=!1,$=0;const U=i.getParameter(i.VERSION);U.indexOf("WebGL")!==-1?($=parseFloat(/^WebGL (\d)/.exec(U)[1]),Y=$>=1):U.indexOf("OpenGL ES")!==-1&&($=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),Y=$>=2);let D=null,G={};const K=i.getParameter(i.SCISSOR_BOX),J=i.getParameter(i.VIEWPORT),Ae=new Gt().fromArray(K),ge=new Gt().fromArray(J);function be(ee,Te,ye,he){const we=new Uint8Array(4),qe=i.createTexture();i.bindTexture(ee,qe),i.texParameteri(ee,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(ee,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let At=0;At<ye;At++)n&&(ee===i.TEXTURE_3D||ee===i.TEXTURE_2D_ARRAY)?i.texImage3D(Te,0,i.RGBA,1,1,he,0,i.RGBA,i.UNSIGNED_BYTE,we):i.texImage2D(Te+At,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,we);return qe}const de={};de[i.TEXTURE_2D]=be(i.TEXTURE_2D,i.TEXTURE_2D,1),de[i.TEXTURE_CUBE_MAP]=be(i.TEXTURE_CUBE_MAP,i.TEXTURE_CUBE_MAP_POSITIVE_X,6),n&&(de[i.TEXTURE_2D_ARRAY]=be(i.TEXTURE_2D_ARRAY,i.TEXTURE_2D_ARRAY,1,1),de[i.TEXTURE_3D]=be(i.TEXTURE_3D,i.TEXTURE_3D,1,1)),c.setClear(0,0,0,1),f.setClear(1),u.setClear(0),Oe(i.DEPTH_TEST),f.setFunc(ou),Ue(!1),He(Wv),Oe(i.CULL_FACE),_e(Nr);function Oe(ee){A[ee]!==!0&&(i.enable(ee),A[ee]=!0)}function It(ee){A[ee]!==!1&&(i.disable(ee),A[ee]=!1)}function ot(ee,Te){return g[ee]!==Te?(i.bindFramebuffer(ee,Te),g[ee]=Te,n&&(ee===i.DRAW_FRAMEBUFFER&&(g[i.FRAMEBUFFER]=Te),ee===i.FRAMEBUFFER&&(g[i.DRAW_FRAMEBUFFER]=Te)),!0):!1}function oe(ee,Te){let ye=C,he=!1;if(ee)if(ye=E.get(Te),ye===void 0&&(ye=[],E.set(Te,ye)),ee.isWebGLMultipleRenderTargets){const we=ee.texture;if(ye.length!==we.length||ye[0]!==i.COLOR_ATTACHMENT0){for(let qe=0,At=we.length;qe<At;qe++)ye[qe]=i.COLOR_ATTACHMENT0+qe;ye.length=we.length,he=!0}}else ye[0]!==i.COLOR_ATTACHMENT0&&(ye[0]=i.COLOR_ATTACHMENT0,he=!0);else ye[0]!==i.BACK&&(ye[0]=i.BACK,he=!0);he&&(t.isWebGL2?i.drawBuffers(ye):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(ye))}function Mt(ee){return _!==ee?(i.useProgram(ee),_=ee,!0):!1}const Ne={[ro]:i.FUNC_ADD,[hM]:i.FUNC_SUBTRACT,[dM]:i.FUNC_REVERSE_SUBTRACT};if(n)Ne[Kv]=i.MIN,Ne[Jv]=i.MAX;else{const ee=e.get("EXT_blend_minmax");ee!==null&&(Ne[Kv]=ee.MIN_EXT,Ne[Jv]=ee.MAX_EXT)}const Ze={[AM]:i.ZERO,[pM]:i.ONE,[gM]:i.SRC_COLOR,[qd]:i.SRC_ALPHA,[CM]:i.SRC_ALPHA_SATURATE,[EM]:i.DST_COLOR,[vM]:i.DST_ALPHA,[mM]:i.ONE_MINUS_SRC_COLOR,[Xd]:i.ONE_MINUS_SRC_ALPHA,[yM]:i.ONE_MINUS_DST_COLOR,[_M]:i.ONE_MINUS_DST_ALPHA,[IM]:i.CONSTANT_COLOR,[xM]:i.ONE_MINUS_CONSTANT_COLOR,[SM]:i.CONSTANT_ALPHA,[wM]:i.ONE_MINUS_CONSTANT_ALPHA};function _e(ee,Te,ye,he,we,qe,At,Wt,Dn,Tt){if(ee===Nr){v===!0&&(It(i.BLEND),v=!1);return}if(v===!1&&(Oe(i.BLEND),v=!0),ee!==fM){if(ee!==S||Tt!==N){if((y!==ro||b!==ro)&&(i.blendEquation(i.FUNC_ADD),y=ro,b=ro),Tt)switch(ee){case Yo:i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case Yv:i.blendFunc(i.ONE,i.ONE);break;case qv:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Xv:i.blendFuncSeparate(i.ZERO,i.SRC_COLOR,i.ZERO,i.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",ee);break}else switch(ee){case Yo:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case Yv:i.blendFunc(i.SRC_ALPHA,i.ONE);break;case qv:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Xv:i.blendFunc(i.ZERO,i.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",ee);break}x=null,w=null,B=null,L=null,R.set(0,0,0),T=0,S=ee,N=Tt}return}we=we||Te,qe=qe||ye,At=At||he,(Te!==y||we!==b)&&(i.blendEquationSeparate(Ne[Te],Ne[we]),y=Te,b=we),(ye!==x||he!==w||qe!==B||At!==L)&&(i.blendFuncSeparate(Ze[ye],Ze[he],Ze[qe],Ze[At]),x=ye,w=he,B=qe,L=At),(Wt.equals(R)===!1||Dn!==T)&&(i.blendColor(Wt.r,Wt.g,Wt.b,Dn),R.copy(Wt),T=Dn),S=ee,N=!1}function it(ee,Te){ee.side===Yi?It(i.CULL_FACE):Oe(i.CULL_FACE);let ye=ee.side===Bn;Te&&(ye=!ye),Ue(ye),ee.blending===Yo&&ee.transparent===!1?_e(Nr):_e(ee.blending,ee.blendEquation,ee.blendSrc,ee.blendDst,ee.blendEquationAlpha,ee.blendSrcAlpha,ee.blendDstAlpha,ee.blendColor,ee.blendAlpha,ee.premultipliedAlpha),f.setFunc(ee.depthFunc),f.setTest(ee.depthTest),f.setMask(ee.depthWrite),c.setMask(ee.colorWrite);const he=ee.stencilWrite;u.setTest(he),he&&(u.setMask(ee.stencilWriteMask),u.setFunc(ee.stencilFunc,ee.stencilRef,ee.stencilFuncMask),u.setOp(ee.stencilFail,ee.stencilZFail,ee.stencilZPass)),lt(ee.polygonOffset,ee.polygonOffsetFactor,ee.polygonOffsetUnits),ee.alphaToCoverage===!0?Oe(i.SAMPLE_ALPHA_TO_COVERAGE):It(i.SAMPLE_ALPHA_TO_COVERAGE)}function Ue(ee){k!==ee&&(ee?i.frontFace(i.CW):i.frontFace(i.CCW),k=ee)}function He(ee){ee!==lM?(Oe(i.CULL_FACE),ee!==O&&(ee===Wv?i.cullFace(i.BACK):ee===cM?i.cullFace(i.FRONT):i.cullFace(i.FRONT_AND_BACK))):It(i.CULL_FACE),O=ee}function $e(ee){ee!==F&&(Y&&i.lineWidth(ee),F=ee)}function lt(ee,Te,ye){ee?(Oe(i.POLYGON_OFFSET_FILL),(V!==Te||X!==ye)&&(i.polygonOffset(Te,ye),V=Te,X=ye)):It(i.POLYGON_OFFSET_FILL)}function mt(ee){ee?Oe(i.SCISSOR_TEST):It(i.SCISSOR_TEST)}function H(ee){ee===void 0&&(ee=i.TEXTURE0+te-1),D!==ee&&(i.activeTexture(ee),D=ee)}function Q(ee,Te,ye){ye===void 0&&(D===null?ye=i.TEXTURE0+te-1:ye=D);let he=G[ye];he===void 0&&(he={type:void 0,texture:void 0},G[ye]=he),(he.type!==ee||he.texture!==Te)&&(D!==ye&&(i.activeTexture(ye),D=ye),i.bindTexture(ee,Te||de[ee]),he.type=ee,he.texture=Te)}function se(){const ee=G[D];ee!==void 0&&ee.type!==void 0&&(i.bindTexture(ee.type,null),ee.type=void 0,ee.texture=void 0)}function Ce(){try{i.compressedTexImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function me(){try{i.compressedTexImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function xe(){try{i.texSubImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function We(){try{i.texSubImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Se(){try{i.compressedTexSubImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Re(){try{i.compressedTexSubImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function q(){try{i.texStorage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Me(){try{i.texStorage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function pe(){try{i.texImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function nt(){try{i.texImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function je(ee){Ae.equals(ee)===!1&&(i.scissor(ee.x,ee.y,ee.z,ee.w),Ae.copy(ee))}function Je(ee){ge.equals(ee)===!1&&(i.viewport(ee.x,ee.y,ee.z,ee.w),ge.copy(ee))}function Ge(ee,Te){let ye=p.get(Te);ye===void 0&&(ye=new WeakMap,p.set(Te,ye));let he=ye.get(ee);he===void 0&&(he=i.getUniformBlockIndex(Te,ee.name),ye.set(ee,he))}function Pe(ee,Te){const he=p.get(Te).get(ee);d.get(Te)!==he&&(i.uniformBlockBinding(Te,he,ee.__bindingPointIndex),d.set(Te,he))}function dt(){i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.DEPTH_TEST),i.disable(i.POLYGON_OFFSET_FILL),i.disable(i.SCISSOR_TEST),i.disable(i.STENCIL_TEST),i.disable(i.SAMPLE_ALPHA_TO_COVERAGE),i.blendEquation(i.FUNC_ADD),i.blendFunc(i.ONE,i.ZERO),i.blendFuncSeparate(i.ONE,i.ZERO,i.ONE,i.ZERO),i.blendColor(0,0,0,0),i.colorMask(!0,!0,!0,!0),i.clearColor(0,0,0,0),i.depthMask(!0),i.depthFunc(i.LESS),i.clearDepth(1),i.stencilMask(4294967295),i.stencilFunc(i.ALWAYS,0,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),i.clearStencil(0),i.cullFace(i.BACK),i.frontFace(i.CCW),i.polygonOffset(0,0),i.activeTexture(i.TEXTURE0),i.bindFramebuffer(i.FRAMEBUFFER,null),n===!0&&(i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),i.bindFramebuffer(i.READ_FRAMEBUFFER,null)),i.useProgram(null),i.lineWidth(1),i.scissor(0,0,i.canvas.width,i.canvas.height),i.viewport(0,0,i.canvas.width,i.canvas.height),A={},D=null,G={},g={},E=new WeakMap,C=[],_=null,v=!1,S=null,y=null,x=null,w=null,b=null,B=null,L=null,R=new tt(0,0,0),T=0,N=!1,k=null,O=null,F=null,V=null,X=null,Ae.set(0,0,i.canvas.width,i.canvas.height),ge.set(0,0,i.canvas.width,i.canvas.height),c.reset(),f.reset(),u.reset()}return{buffers:{color:c,depth:f,stencil:u},enable:Oe,disable:It,bindFramebuffer:ot,drawBuffers:oe,useProgram:Mt,setBlending:_e,setMaterial:it,setFlipSided:Ue,setCullFace:He,setLineWidth:$e,setPolygonOffset:lt,setScissorTest:mt,activeTexture:H,bindTexture:Q,unbindTexture:se,compressedTexImage2D:Ce,compressedTexImage3D:me,texImage2D:pe,texImage3D:nt,updateUBOMapping:Ge,uniformBlockBinding:Pe,texStorage2D:q,texStorage3D:Me,texSubImage2D:xe,texSubImage3D:We,compressedTexSubImage2D:Se,compressedTexSubImage3D:Re,scissor:je,viewport:Je,reset:dt}}function BR(i,e,t,n,r,o,l){const c=r.isWebGL2,f=r.maxTextures,u=r.maxCubemapSize,d=r.maxTextureSize,p=r.maxSamples,A=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,g=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),E=new WeakMap;let C;const _=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(H,Q){return v?new OffscreenCanvas(H,Q):Ql("canvas")}function y(H,Q,se,Ce){let me=1;if((H.width>Ce||H.height>Ce)&&(me=Ce/Math.max(H.width,H.height)),me<1||Q===!0)if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap){const xe=Q?yu:Math.floor,We=xe(me*H.width),Se=xe(me*H.height);C===void 0&&(C=S(We,Se));const Re=se?S(We,Se):C;return Re.width=We,Re.height=Se,Re.getContext("2d").drawImage(H,0,0,We,Se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+H.width+"x"+H.height+") to ("+We+"x"+Se+")."),Re}else return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+H.width+"x"+H.height+")."),H;return H}function x(H){return dA(H.width)&&dA(H.height)}function w(H){return c?!1:H.wrapS!==Fn||H.wrapT!==Fn||H.minFilter!==qt&&H.minFilter!==un}function b(H,Q){return H.generateMipmaps&&Q&&H.minFilter!==qt&&H.minFilter!==un}function B(H){i.generateMipmap(H)}function L(H,Q,se,Ce,me=!1){if(c===!1)return Q;if(H!==null){if(i[H]!==void 0)return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let xe=Q;if(Q===i.RED&&(se===i.FLOAT&&(xe=i.R32F),se===i.HALF_FLOAT&&(xe=i.R16F),se===i.UNSIGNED_BYTE&&(xe=i.R8)),Q===i.RED_INTEGER&&(se===i.UNSIGNED_BYTE&&(xe=i.R8UI),se===i.UNSIGNED_SHORT&&(xe=i.R16UI),se===i.UNSIGNED_INT&&(xe=i.R32UI),se===i.BYTE&&(xe=i.R8I),se===i.SHORT&&(xe=i.R16I),se===i.INT&&(xe=i.R32I)),Q===i.RG&&(se===i.FLOAT&&(xe=i.RG32F),se===i.HALF_FLOAT&&(xe=i.RG16F),se===i.UNSIGNED_BYTE&&(xe=i.RG8)),Q===i.RGBA){const We=me?mu:Nt.getTransfer(Ce);se===i.FLOAT&&(xe=i.RGBA32F),se===i.HALF_FLOAT&&(xe=i.RGBA16F),se===i.UNSIGNED_BYTE&&(xe=We===Vt?i.SRGB8_ALPHA8:i.RGBA8),se===i.UNSIGNED_SHORT_4_4_4_4&&(xe=i.RGBA4),se===i.UNSIGNED_SHORT_5_5_5_1&&(xe=i.RGB5_A1)}return(xe===i.R16F||xe===i.R32F||xe===i.RG16F||xe===i.RG32F||xe===i.RGBA16F||xe===i.RGBA32F)&&e.get("EXT_color_buffer_float"),xe}function R(H,Q,se){return b(H,se)===!0||H.isFramebufferTexture&&H.minFilter!==qt&&H.minFilter!==un?Math.log2(Math.max(Q.width,Q.height))+1:H.mipmaps!==void 0&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?Q.mipmaps.length:1}function T(H){return H===qt||H===Zd||H===cu?i.NEAREST:i.LINEAR}function N(H){const Q=H.target;Q.removeEventListener("dispose",N),O(Q),Q.isVideoTexture&&E.delete(Q)}function k(H){const Q=H.target;Q.removeEventListener("dispose",k),V(Q)}function O(H){const Q=n.get(H);if(Q.__webglInit===void 0)return;const se=H.source,Ce=_.get(se);if(Ce){const me=Ce[Q.__cacheKey];me.usedTimes--,me.usedTimes===0&&F(H),Object.keys(Ce).length===0&&_.delete(se)}n.remove(H)}function F(H){const Q=n.get(H);i.deleteTexture(Q.__webglTexture);const se=H.source,Ce=_.get(se);delete Ce[Q.__cacheKey],l.memory.textures--}function V(H){const Q=H.texture,se=n.get(H),Ce=n.get(Q);if(Ce.__webglTexture!==void 0&&(i.deleteTexture(Ce.__webglTexture),l.memory.textures--),H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let me=0;me<6;me++){if(Array.isArray(se.__webglFramebuffer[me]))for(let xe=0;xe<se.__webglFramebuffer[me].length;xe++)i.deleteFramebuffer(se.__webglFramebuffer[me][xe]);else i.deleteFramebuffer(se.__webglFramebuffer[me]);se.__webglDepthbuffer&&i.deleteRenderbuffer(se.__webglDepthbuffer[me])}else{if(Array.isArray(se.__webglFramebuffer))for(let me=0;me<se.__webglFramebuffer.length;me++)i.deleteFramebuffer(se.__webglFramebuffer[me]);else i.deleteFramebuffer(se.__webglFramebuffer);if(se.__webglDepthbuffer&&i.deleteRenderbuffer(se.__webglDepthbuffer),se.__webglMultisampledFramebuffer&&i.deleteFramebuffer(se.__webglMultisampledFramebuffer),se.__webglColorRenderbuffer)for(let me=0;me<se.__webglColorRenderbuffer.length;me++)se.__webglColorRenderbuffer[me]&&i.deleteRenderbuffer(se.__webglColorRenderbuffer[me]);se.__webglDepthRenderbuffer&&i.deleteRenderbuffer(se.__webglDepthRenderbuffer)}if(H.isWebGLMultipleRenderTargets)for(let me=0,xe=Q.length;me<xe;me++){const We=n.get(Q[me]);We.__webglTexture&&(i.deleteTexture(We.__webglTexture),l.memory.textures--),n.remove(Q[me])}n.remove(Q),n.remove(H)}let X=0;function te(){X=0}function Y(){const H=X;return H>=f&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+f),X+=1,H}function $(H){const Q=[];return Q.push(H.wrapS),Q.push(H.wrapT),Q.push(H.wrapR||0),Q.push(H.magFilter),Q.push(H.minFilter),Q.push(H.anisotropy),Q.push(H.internalFormat),Q.push(H.format),Q.push(H.type),Q.push(H.generateMipmaps),Q.push(H.premultiplyAlpha),Q.push(H.flipY),Q.push(H.unpackAlignment),Q.push(H.colorSpace),Q.join()}function U(H,Q){const se=n.get(H);if(H.isVideoTexture&&lt(H),H.isRenderTargetTexture===!1&&H.version>0&&se.__version!==H.version){const Ce=H.image;if(Ce===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ce.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Oe(se,H,Q);return}}t.bindTexture(i.TEXTURE_2D,se.__webglTexture,i.TEXTURE0+Q)}function D(H,Q){const se=n.get(H);if(H.version>0&&se.__version!==H.version){Oe(se,H,Q);return}t.bindTexture(i.TEXTURE_2D_ARRAY,se.__webglTexture,i.TEXTURE0+Q)}function G(H,Q){const se=n.get(H);if(H.version>0&&se.__version!==H.version){Oe(se,H,Q);return}t.bindTexture(i.TEXTURE_3D,se.__webglTexture,i.TEXTURE0+Q)}function K(H,Q){const se=n.get(H);if(H.version>0&&se.__version!==H.version){It(se,H,Q);return}t.bindTexture(i.TEXTURE_CUBE_MAP,se.__webglTexture,i.TEXTURE0+Q)}const J={[Xo]:i.REPEAT,[Fn]:i.CLAMP_TO_EDGE,[lu]:i.MIRRORED_REPEAT},Ae={[qt]:i.NEAREST,[Zd]:i.NEAREST_MIPMAP_NEAREST,[cu]:i.NEAREST_MIPMAP_LINEAR,[un]:i.LINEAR,[r1]:i.LINEAR_MIPMAP_NEAREST,[Pr]:i.LINEAR_MIPMAP_LINEAR},ge={[YM]:i.NEVER,[e3]:i.ALWAYS,[qM]:i.LESS,[KM]:i.LEQUAL,[XM]:i.EQUAL,[$M]:i.GEQUAL,[JM]:i.GREATER,[ZM]:i.NOTEQUAL};function be(H,Q,se){if(se?(i.texParameteri(H,i.TEXTURE_WRAP_S,J[Q.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[Q.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[Q.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,Ae[Q.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,Ae[Q.minFilter])):(i.texParameteri(H,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(H,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,i.CLAMP_TO_EDGE),(Q.wrapS!==Fn||Q.wrapT!==Fn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(H,i.TEXTURE_MAG_FILTER,T(Q.magFilter)),i.texParameteri(H,i.TEXTURE_MIN_FILTER,T(Q.minFilter)),Q.minFilter!==qt&&Q.minFilter!==un&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),Q.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,ge[Q.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const Ce=e.get("EXT_texture_filter_anisotropic");if(Q.magFilter===qt||Q.minFilter!==cu&&Q.minFilter!==Pr||Q.type===hn&&e.has("OES_texture_float_linear")===!1||c===!1&&Q.type===Jn&&e.has("OES_texture_half_float_linear")===!1)return;(Q.anisotropy>1||n.get(Q).__currentAnisotropy)&&(i.texParameterf(H,Ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Q.anisotropy,r.getMaxAnisotropy())),n.get(Q).__currentAnisotropy=Q.anisotropy)}}function de(H,Q){let se=!1;H.__webglInit===void 0&&(H.__webglInit=!0,Q.addEventListener("dispose",N));const Ce=Q.source;let me=_.get(Ce);me===void 0&&(me={},_.set(Ce,me));const xe=$(Q);if(xe!==H.__cacheKey){me[xe]===void 0&&(me[xe]={texture:i.createTexture(),usedTimes:0},l.memory.textures++,se=!0),me[xe].usedTimes++;const We=me[H.__cacheKey];We!==void 0&&(me[H.__cacheKey].usedTimes--,We.usedTimes===0&&F(Q)),H.__cacheKey=xe,H.__webglTexture=me[xe].texture}return se}function Oe(H,Q,se){let Ce=i.TEXTURE_2D;(Q.isDataArrayTexture||Q.isCompressedArrayTexture)&&(Ce=i.TEXTURE_2D_ARRAY),Q.isData3DTexture&&(Ce=i.TEXTURE_3D);const me=de(H,Q),xe=Q.source;t.bindTexture(Ce,H.__webglTexture,i.TEXTURE0+se);const We=n.get(xe);if(xe.version!==We.__version||me===!0){t.activeTexture(i.TEXTURE0+se);const Se=Nt.getPrimaries(Nt.workingColorSpace),Re=Q.colorSpace===ci?null:Nt.getPrimaries(Q.colorSpace),q=Q.colorSpace===ci||Se===Re?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,Q.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,Q.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,q);const Me=w(Q)&&x(Q.image)===!1;let pe=y(Q.image,Me,!1,d);pe=mt(Q,pe);const nt=x(pe)||c,je=o.convert(Q.format,Q.colorSpace);let Je=o.convert(Q.type),Ge=L(Q.internalFormat,je,Je,Q.colorSpace,Q.isVideoTexture);be(Ce,Q,nt);let Pe;const dt=Q.mipmaps,ee=c&&Q.isVideoTexture!==!0,Te=We.__version===void 0||me===!0,ye=R(Q,pe,nt);if(Q.isDepthTexture)Ge=i.DEPTH_COMPONENT,c?Q.type===hn?Ge=i.DEPTH_COMPONENT32F:Q.type===yi?Ge=i.DEPTH_COMPONENT24:Q.type===oo?Ge=i.DEPTH24_STENCIL8:Ge=i.DEPTH_COMPONENT16:Q.type===hn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Q.format===ao&&Ge===i.DEPTH_COMPONENT&&Q.type!==uu&&Q.type!==yi&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Q.type=yi,Je=o.convert(Q.type)),Q.format===Ko&&Ge===i.DEPTH_COMPONENT&&(Ge=i.DEPTH_STENCIL,Q.type!==oo&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Q.type=oo,Je=o.convert(Q.type))),Te&&(ee?t.texStorage2D(i.TEXTURE_2D,1,Ge,pe.width,pe.height):t.texImage2D(i.TEXTURE_2D,0,Ge,pe.width,pe.height,0,je,Je,null));else if(Q.isDataTexture)if(dt.length>0&&nt){ee&&Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,dt[0].width,dt[0].height);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],ee?t.texSubImage2D(i.TEXTURE_2D,he,0,0,Pe.width,Pe.height,je,Je,Pe.data):t.texImage2D(i.TEXTURE_2D,he,Ge,Pe.width,Pe.height,0,je,Je,Pe.data);Q.generateMipmaps=!1}else ee?(Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,pe.width,pe.height),t.texSubImage2D(i.TEXTURE_2D,0,0,0,pe.width,pe.height,je,Je,pe.data)):t.texImage2D(i.TEXTURE_2D,0,Ge,pe.width,pe.height,0,je,Je,pe.data);else if(Q.isCompressedTexture)if(Q.isCompressedArrayTexture){ee&&Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,ye,Ge,dt[0].width,dt[0].height,pe.depth);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],Q.format!==on?je!==null?ee?t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,he,0,0,0,Pe.width,Pe.height,pe.depth,je,Pe.data,0,0):t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,he,Ge,Pe.width,Pe.height,pe.depth,0,Pe.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ee?t.texSubImage3D(i.TEXTURE_2D_ARRAY,he,0,0,0,Pe.width,Pe.height,pe.depth,je,Je,Pe.data):t.texImage3D(i.TEXTURE_2D_ARRAY,he,Ge,Pe.width,Pe.height,pe.depth,0,je,Je,Pe.data)}else{ee&&Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,dt[0].width,dt[0].height);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],Q.format!==on?je!==null?ee?t.compressedTexSubImage2D(i.TEXTURE_2D,he,0,0,Pe.width,Pe.height,je,Pe.data):t.compressedTexImage2D(i.TEXTURE_2D,he,Ge,Pe.width,Pe.height,0,Pe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ee?t.texSubImage2D(i.TEXTURE_2D,he,0,0,Pe.width,Pe.height,je,Je,Pe.data):t.texImage2D(i.TEXTURE_2D,he,Ge,Pe.width,Pe.height,0,je,Je,Pe.data)}else if(Q.isDataArrayTexture)ee?(Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,ye,Ge,pe.width,pe.height,pe.depth),t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,pe.width,pe.height,pe.depth,je,Je,pe.data)):t.texImage3D(i.TEXTURE_2D_ARRAY,0,Ge,pe.width,pe.height,pe.depth,0,je,Je,pe.data);else if(Q.isData3DTexture)ee?(Te&&t.texStorage3D(i.TEXTURE_3D,ye,Ge,pe.width,pe.height,pe.depth),t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,pe.width,pe.height,pe.depth,je,Je,pe.data)):t.texImage3D(i.TEXTURE_3D,0,Ge,pe.width,pe.height,pe.depth,0,je,Je,pe.data);else if(Q.isFramebufferTexture){if(Te)if(ee)t.texStorage2D(i.TEXTURE_2D,ye,Ge,pe.width,pe.height);else{let he=pe.width,we=pe.height;for(let qe=0;qe<ye;qe++)t.texImage2D(i.TEXTURE_2D,qe,Ge,he,we,0,je,Je,null),he>>=1,we>>=1}}else if(dt.length>0&&nt){ee&&Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,dt[0].width,dt[0].height);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],ee?t.texSubImage2D(i.TEXTURE_2D,he,0,0,je,Je,Pe):t.texImage2D(i.TEXTURE_2D,he,Ge,je,Je,Pe);Q.generateMipmaps=!1}else ee?(Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,pe.width,pe.height),t.texSubImage2D(i.TEXTURE_2D,0,0,0,je,Je,pe)):t.texImage2D(i.TEXTURE_2D,0,Ge,je,Je,pe);b(Q,nt)&&B(Ce),We.__version=xe.version,Q.onUpdate&&Q.onUpdate(Q)}H.__version=Q.version}function It(H,Q,se){if(Q.image.length!==6)return;const Ce=de(H,Q),me=Q.source;t.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+se);const xe=n.get(me);if(me.version!==xe.__version||Ce===!0){t.activeTexture(i.TEXTURE0+se);const We=Nt.getPrimaries(Nt.workingColorSpace),Se=Q.colorSpace===ci?null:Nt.getPrimaries(Q.colorSpace),Re=Q.colorSpace===ci||We===Se?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,Q.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,Q.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,Re);const q=Q.isCompressedTexture||Q.image[0].isCompressedTexture,Me=Q.image[0]&&Q.image[0].isDataTexture,pe=[];for(let he=0;he<6;he++)!q&&!Me?pe[he]=y(Q.image[he],!1,!0,u):pe[he]=Me?Q.image[he].image:Q.image[he],pe[he]=mt(Q,pe[he]);const nt=pe[0],je=x(nt)||c,Je=o.convert(Q.format,Q.colorSpace),Ge=o.convert(Q.type),Pe=L(Q.internalFormat,Je,Ge,Q.colorSpace),dt=c&&Q.isVideoTexture!==!0,ee=xe.__version===void 0||Ce===!0;let Te=R(Q,nt,je);be(i.TEXTURE_CUBE_MAP,Q,je);let ye;if(q){dt&&ee&&t.texStorage2D(i.TEXTURE_CUBE_MAP,Te,Pe,nt.width,nt.height);for(let he=0;he<6;he++){ye=pe[he].mipmaps;for(let we=0;we<ye.length;we++){const qe=ye[we];Q.format!==on?Je!==null?dt?t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,0,0,qe.width,qe.height,Je,qe.data):t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,Pe,qe.width,qe.height,0,qe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,0,0,qe.width,qe.height,Je,Ge,qe.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,Pe,qe.width,qe.height,0,Je,Ge,qe.data)}}}else{ye=Q.mipmaps,dt&&ee&&(ye.length>0&&Te++,t.texStorage2D(i.TEXTURE_CUBE_MAP,Te,Pe,pe[0].width,pe[0].height));for(let he=0;he<6;he++)if(Me){dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,pe[he].width,pe[he].height,Je,Ge,pe[he].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,Pe,pe[he].width,pe[he].height,0,Je,Ge,pe[he].data);for(let we=0;we<ye.length;we++){const At=ye[we].image[he].image;dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,0,0,At.width,At.height,Je,Ge,At.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,Pe,At.width,At.height,0,Je,Ge,At.data)}}else{dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,Je,Ge,pe[he]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,Pe,Je,Ge,pe[he]);for(let we=0;we<ye.length;we++){const qe=ye[we];dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,0,0,Je,Ge,qe.image[he]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,Pe,Je,Ge,qe.image[he])}}}b(Q,je)&&B(i.TEXTURE_CUBE_MAP),xe.__version=me.version,Q.onUpdate&&Q.onUpdate(Q)}H.__version=Q.version}function ot(H,Q,se,Ce,me,xe){const We=o.convert(se.format,se.colorSpace),Se=o.convert(se.type),Re=L(se.internalFormat,We,Se,se.colorSpace);if(!n.get(Q).__hasExternalTextures){const Me=Math.max(1,Q.width>>xe),pe=Math.max(1,Q.height>>xe);me===i.TEXTURE_3D||me===i.TEXTURE_2D_ARRAY?t.texImage3D(me,xe,Re,Me,pe,Q.depth,0,We,Se,null):t.texImage2D(me,xe,Re,Me,pe,0,We,Se,null)}t.bindFramebuffer(i.FRAMEBUFFER,H),$e(Q)?A.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ce,me,n.get(se).__webglTexture,0,He(Q)):(me===i.TEXTURE_2D||me>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&me<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ce,me,n.get(se).__webglTexture,xe),t.bindFramebuffer(i.FRAMEBUFFER,null)}function oe(H,Q,se){if(i.bindRenderbuffer(i.RENDERBUFFER,H),Q.depthBuffer&&!Q.stencilBuffer){let Ce=c===!0?i.DEPTH_COMPONENT24:i.DEPTH_COMPONENT16;if(se||$e(Q)){const me=Q.depthTexture;me&&me.isDepthTexture&&(me.type===hn?Ce=i.DEPTH_COMPONENT32F:me.type===yi&&(Ce=i.DEPTH_COMPONENT24));const xe=He(Q);$e(Q)?A.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,xe,Ce,Q.width,Q.height):i.renderbufferStorageMultisample(i.RENDERBUFFER,xe,Ce,Q.width,Q.height)}else i.renderbufferStorage(i.RENDERBUFFER,Ce,Q.width,Q.height);i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,H)}else if(Q.depthBuffer&&Q.stencilBuffer){const Ce=He(Q);se&&$e(Q)===!1?i.renderbufferStorageMultisample(i.RENDERBUFFER,Ce,i.DEPTH24_STENCIL8,Q.width,Q.height):$e(Q)?A.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Ce,i.DEPTH24_STENCIL8,Q.width,Q.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,Q.width,Q.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,H)}else{const Ce=Q.isWebGLMultipleRenderTargets===!0?Q.texture:[Q.texture];for(let me=0;me<Ce.length;me++){const xe=Ce[me],We=o.convert(xe.format,xe.colorSpace),Se=o.convert(xe.type),Re=L(xe.internalFormat,We,Se,xe.colorSpace),q=He(Q);se&&$e(Q)===!1?i.renderbufferStorageMultisample(i.RENDERBUFFER,q,Re,Q.width,Q.height):$e(Q)?A.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,q,Re,Q.width,Q.height):i.renderbufferStorage(i.RENDERBUFFER,Re,Q.width,Q.height)}}i.bindRenderbuffer(i.RENDERBUFFER,null)}function Mt(H,Q){if(Q&&Q.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(i.FRAMEBUFFER,H),!(Q.depthTexture&&Q.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(Q.depthTexture).__webglTexture||Q.depthTexture.image.width!==Q.width||Q.depthTexture.image.height!==Q.height)&&(Q.depthTexture.image.width=Q.width,Q.depthTexture.image.height=Q.height,Q.depthTexture.needsUpdate=!0),U(Q.depthTexture,0);const Ce=n.get(Q.depthTexture).__webglTexture,me=He(Q);if(Q.depthTexture.format===ao)$e(Q)?A.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,Ce,0,me):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,Ce,0);else if(Q.depthTexture.format===Ko)$e(Q)?A.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,Ce,0,me):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,Ce,0);else throw new Error("Unknown depthTexture format")}function Ne(H){const Q=n.get(H),se=H.isWebGLCubeRenderTarget===!0;if(H.depthTexture&&!Q.__autoAllocateDepthBuffer){if(se)throw new Error("target.depthTexture not supported in Cube render targets");Mt(Q.__webglFramebuffer,H)}else if(se){Q.__webglDepthbuffer=[];for(let Ce=0;Ce<6;Ce++)t.bindFramebuffer(i.FRAMEBUFFER,Q.__webglFramebuffer[Ce]),Q.__webglDepthbuffer[Ce]=i.createRenderbuffer(),oe(Q.__webglDepthbuffer[Ce],H,!1)}else t.bindFramebuffer(i.FRAMEBUFFER,Q.__webglFramebuffer),Q.__webglDepthbuffer=i.createRenderbuffer(),oe(Q.__webglDepthbuffer,H,!1);t.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,Q,se){const Ce=n.get(H);Q!==void 0&&ot(Ce.__webglFramebuffer,H,H.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),se!==void 0&&Ne(H)}function _e(H){const Q=H.texture,se=n.get(H),Ce=n.get(Q);H.addEventListener("dispose",k),H.isWebGLMultipleRenderTargets!==!0&&(Ce.__webglTexture===void 0&&(Ce.__webglTexture=i.createTexture()),Ce.__version=Q.version,l.memory.textures++);const me=H.isWebGLCubeRenderTarget===!0,xe=H.isWebGLMultipleRenderTargets===!0,We=x(H)||c;if(me){se.__webglFramebuffer=[];for(let Se=0;Se<6;Se++)if(c&&Q.mipmaps&&Q.mipmaps.length>0){se.__webglFramebuffer[Se]=[];for(let Re=0;Re<Q.mipmaps.length;Re++)se.__webglFramebuffer[Se][Re]=i.createFramebuffer()}else se.__webglFramebuffer[Se]=i.createFramebuffer()}else{if(c&&Q.mipmaps&&Q.mipmaps.length>0){se.__webglFramebuffer=[];for(let Se=0;Se<Q.mipmaps.length;Se++)se.__webglFramebuffer[Se]=i.createFramebuffer()}else se.__webglFramebuffer=i.createFramebuffer();if(xe)if(r.drawBuffers){const Se=H.texture;for(let Re=0,q=Se.length;Re<q;Re++){const Me=n.get(Se[Re]);Me.__webglTexture===void 0&&(Me.__webglTexture=i.createTexture(),l.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(c&&H.samples>0&&$e(H)===!1){const Se=xe?Q:[Q];se.__webglMultisampledFramebuffer=i.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Re=0;Re<Se.length;Re++){const q=Se[Re];se.__webglColorRenderbuffer[Re]=i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,se.__webglColorRenderbuffer[Re]);const Me=o.convert(q.format,q.colorSpace),pe=o.convert(q.type),nt=L(q.internalFormat,Me,pe,q.colorSpace,H.isXRRenderTarget===!0),je=He(H);i.renderbufferStorageMultisample(i.RENDERBUFFER,je,nt,H.width,H.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+Re,i.RENDERBUFFER,se.__webglColorRenderbuffer[Re])}i.bindRenderbuffer(i.RENDERBUFFER,null),H.depthBuffer&&(se.__webglDepthRenderbuffer=i.createRenderbuffer(),oe(se.__webglDepthRenderbuffer,H,!0)),t.bindFramebuffer(i.FRAMEBUFFER,null)}}if(me){t.bindTexture(i.TEXTURE_CUBE_MAP,Ce.__webglTexture),be(i.TEXTURE_CUBE_MAP,Q,We);for(let Se=0;Se<6;Se++)if(c&&Q.mipmaps&&Q.mipmaps.length>0)for(let Re=0;Re<Q.mipmaps.length;Re++)ot(se.__webglFramebuffer[Se][Re],H,Q,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Se,Re);else ot(se.__webglFramebuffer[Se],H,Q,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Se,0);b(Q,We)&&B(i.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(xe){const Se=H.texture;for(let Re=0,q=Se.length;Re<q;Re++){const Me=Se[Re],pe=n.get(Me);t.bindTexture(i.TEXTURE_2D,pe.__webglTexture),be(i.TEXTURE_2D,Me,We),ot(se.__webglFramebuffer,H,Me,i.COLOR_ATTACHMENT0+Re,i.TEXTURE_2D,0),b(Me,We)&&B(i.TEXTURE_2D)}t.unbindTexture()}else{let Se=i.TEXTURE_2D;if((H.isWebGL3DRenderTarget||H.isWebGLArrayRenderTarget)&&(c?Se=H.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),t.bindTexture(Se,Ce.__webglTexture),be(Se,Q,We),c&&Q.mipmaps&&Q.mipmaps.length>0)for(let Re=0;Re<Q.mipmaps.length;Re++)ot(se.__webglFramebuffer[Re],H,Q,i.COLOR_ATTACHMENT0,Se,Re);else ot(se.__webglFramebuffer,H,Q,i.COLOR_ATTACHMENT0,Se,0);b(Q,We)&&B(Se),t.unbindTexture()}H.depthBuffer&&Ne(H)}function it(H){const Q=x(H)||c,se=H.isWebGLMultipleRenderTargets===!0?H.texture:[H.texture];for(let Ce=0,me=se.length;Ce<me;Ce++){const xe=se[Ce];if(b(xe,Q)){const We=H.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:i.TEXTURE_2D,Se=n.get(xe).__webglTexture;t.bindTexture(We,Se),B(We),t.unbindTexture()}}}function Ue(H){if(c&&H.samples>0&&$e(H)===!1){const Q=H.isWebGLMultipleRenderTargets?H.texture:[H.texture],se=H.width,Ce=H.height;let me=i.COLOR_BUFFER_BIT;const xe=[],We=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Se=n.get(H),Re=H.isWebGLMultipleRenderTargets===!0;if(Re)for(let q=0;q<Q.length;q++)t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.RENDERBUFFER,null),t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.TEXTURE_2D,null,0);t.bindFramebuffer(i.READ_FRAMEBUFFER,Se.__webglMultisampledFramebuffer),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Se.__webglFramebuffer);for(let q=0;q<Q.length;q++){xe.push(i.COLOR_ATTACHMENT0+q),H.depthBuffer&&xe.push(We);const Me=Se.__ignoreDepthValues!==void 0?Se.__ignoreDepthValues:!1;if(Me===!1&&(H.depthBuffer&&(me|=i.DEPTH_BUFFER_BIT),H.stencilBuffer&&(me|=i.STENCIL_BUFFER_BIT)),Re&&i.framebufferRenderbuffer(i.READ_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,Se.__webglColorRenderbuffer[q]),Me===!0&&(i.invalidateFramebuffer(i.READ_FRAMEBUFFER,[We]),i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,[We])),Re){const pe=n.get(Q[q]).__webglTexture;i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,pe,0)}i.blitFramebuffer(0,0,se,Ce,0,0,se,Ce,me,i.NEAREST),g&&i.invalidateFramebuffer(i.READ_FRAMEBUFFER,xe)}if(t.bindFramebuffer(i.READ_FRAMEBUFFER,null),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),Re)for(let q=0;q<Q.length;q++){t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.RENDERBUFFER,Se.__webglColorRenderbuffer[q]);const Me=n.get(Q[q]).__webglTexture;t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.TEXTURE_2D,Me,0)}t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Se.__webglMultisampledFramebuffer)}}function He(H){return Math.min(p,H.samples)}function $e(H){const Q=n.get(H);return c&&H.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&Q.__useRenderToTexture!==!1}function lt(H){const Q=l.render.frame;E.get(H)!==Q&&(E.set(H,Q),H.update())}function mt(H,Q){const se=H.colorSpace,Ce=H.format,me=H.type;return H.isCompressedTexture===!0||H.isVideoTexture===!0||H.format===fA||se!==En&&se!==ci&&(Nt.getTransfer(se)===Vt?c===!1?e.has("EXT_sRGB")===!0&&Ce===on?(H.format=fA,H.minFilter=un,H.generateMipmaps=!1):Q=G1.sRGBToLinear(Q):(Ce!==on||me!==fn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),Q}this.allocateTextureUnit=Y,this.resetTextureUnits=te,this.setTexture2D=U,this.setTexture2DArray=D,this.setTexture3D=G,this.setTextureCube=K,this.rebindTextures=Ze,this.setupRenderTarget=_e,this.updateRenderTargetMipmap=it,this.updateMultisampleRenderTarget=Ue,this.setupDepthRenderbuffer=Ne,this.setupFrameBufferTexture=ot,this.useMultisampledRTT=$e}function RR(i,e,t){const n=t.isWebGL2;function r(o,l=ci){let c;const f=Nt.getTransfer(l);if(o===fn)return i.UNSIGNED_BYTE;if(o===o1)return i.UNSIGNED_SHORT_4_4_4_4;if(o===a1)return i.UNSIGNED_SHORT_5_5_5_1;if(o===$d)return i.BYTE;if(o===s1)return i.SHORT;if(o===uu)return i.UNSIGNED_SHORT;if(o===Dl)return i.INT;if(o===yi)return i.UNSIGNED_INT;if(o===hn)return i.FLOAT;if(o===Jn)return n?i.HALF_FLOAT:(c=e.get("OES_texture_half_float"),c!==null?c.HALF_FLOAT_OES:null);if(o===FM)return i.ALPHA;if(o===on)return i.RGBA;if(o===QM)return i.LUMINANCE;if(o===OM)return i.LUMINANCE_ALPHA;if(o===ao)return i.DEPTH_COMPONENT;if(o===Ko)return i.DEPTH_STENCIL;if(o===fA)return c=e.get("EXT_sRGB"),c!==null?c.SRGB_ALPHA_EXT:null;if(o===lo)return i.RED;if(o===eA)return i.RED_INTEGER;if(o===co)return i.RG;if(o===fu)return i.RG_INTEGER;if(o===Nl)return i.RGBA_INTEGER;if(o===hu||o===tA||o===nA||o===du)if(f===Vt)if(c=e.get("WEBGL_compressed_texture_s3tc_srgb"),c!==null){if(o===hu)return c.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===tA)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===nA)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===du)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(c=e.get("WEBGL_compressed_texture_s3tc"),c!==null){if(o===hu)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===tA)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===nA)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===du)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===iA||o===l1||o===rA||o===c1)if(c=e.get("WEBGL_compressed_texture_pvrtc"),c!==null){if(o===iA)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===l1)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===rA)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===c1)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===u1)return c=e.get("WEBGL_compressed_texture_etc1"),c!==null?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===sA||o===oA)if(c=e.get("WEBGL_compressed_texture_etc"),c!==null){if(o===sA)return f===Vt?c.COMPRESSED_SRGB8_ETC2:c.COMPRESSED_RGB8_ETC2;if(o===oA)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:c.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===aA||o===f1||o===h1||o===d1||o===Au||o===A1||o===p1||o===g1||o===m1||o===v1||o===_1||o===E1||o===y1||o===C1)if(c=e.get("WEBGL_compressed_texture_astc"),c!==null){if(o===aA)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:c.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===f1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:c.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===h1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:c.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===d1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:c.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===Au)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:c.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===A1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:c.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===p1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:c.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===g1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:c.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===m1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:c.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===v1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:c.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===_1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:c.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===E1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:c.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===y1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:c.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===C1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:c.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===pu||o===I1||o===x1)if(c=e.get("EXT_texture_compression_bptc"),c!==null){if(o===pu)return f===Vt?c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:c.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===I1)return c.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===x1)return c.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===zM||o===S1||o===w1||o===M1)if(c=e.get("EXT_texture_compression_rgtc"),c!==null){if(o===pu)return c.COMPRESSED_RED_RGTC1_EXT;if(o===S1)return c.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===w1)return c.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===M1)return c.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===oo?n?i.UNSIGNED_INT_24_8:(c=e.get("WEBGL_depth_texture"),c!==null?c.UNSIGNED_INT_24_8_WEBGL:null):i[o]!==void 0?i[o]:null}return{convert:r}}class bR extends $n{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class vs extends tn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const LR={type:"move"};class zA{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new vs,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new vs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new j,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new j),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new vs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new j,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new j),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,o=null,l=null;const c=this._targetRay,f=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){l=!0;for(const C of e.hand.values()){const _=t.getJointPose(C,n),v=this._getHandJoint(u,C);_!==null&&(v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=_.radius),v.visible=_!==null}const d=u.joints["index-finger-tip"],p=u.joints["thumb-tip"],A=d.position.distanceTo(p.position),g=.02,E=.005;u.inputState.pinching&&A>g+E?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&A<=g-E&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else f!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(f.matrix.fromArray(o.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,o.linearVelocity?(f.hasLinearVelocity=!0,f.linearVelocity.copy(o.linearVelocity)):f.hasLinearVelocity=!1,o.angularVelocity?(f.hasAngularVelocity=!0,f.angularVelocity.copy(o.angularVelocity)):f.hasAngularVelocity=!1));c!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&o!==null&&(r=o),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1,this.dispatchEvent(LR)))}return c!==null&&(c.visible=r!==null),f!==null&&(f.visible=o!==null),u!==null&&(u.visible=l!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new vs;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class DR extends Rn{constructor(e,t,n,r,o,l,c,f,u,d){if(d=d!==void 0?d:ao,d!==ao&&d!==Ko)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===ao&&(n=yi),n===void 0&&d===Ko&&(n=oo),super(null,r,o,l,c,f,d,n,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=c!==void 0?c:qt,this.minFilter=f!==void 0?f:qt,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class NR extends fo{constructor(e,t){super();const n=this;let r=null,o=1,l=null,c="local-floor",f=1,u=null,d=null,p=null,A=null,g=null,E=null;const C=t.getContextAttributes();let _=null,v=null;const S=[],y=[],x=new $n;x.layers.enable(1),x.viewport=new Gt;const w=new $n;w.layers.enable(2),w.viewport=new Gt;const b=[x,w],B=new bR;B.layers.enable(1),B.layers.enable(2);let L=null,R=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(D){let G=S[D];return G===void 0&&(G=new zA,S[D]=G),G.getTargetRaySpace()},this.getControllerGrip=function(D){let G=S[D];return G===void 0&&(G=new zA,S[D]=G),G.getGripSpace()},this.getHand=function(D){let G=S[D];return G===void 0&&(G=new zA,S[D]=G),G.getHandSpace()};function T(D){const G=y.indexOf(D.inputSource);if(G===-1)return;const K=S[G];K!==void 0&&(K.update(D.inputSource,D.frame,u||l),K.dispatchEvent({type:D.type,data:D.inputSource}))}function N(){r.removeEventListener("select",T),r.removeEventListener("selectstart",T),r.removeEventListener("selectend",T),r.removeEventListener("squeeze",T),r.removeEventListener("squeezestart",T),r.removeEventListener("squeezeend",T),r.removeEventListener("end",N),r.removeEventListener("inputsourceschange",k);for(let D=0;D<S.length;D++){const G=y[D];G!==null&&(y[D]=null,S[D].disconnect(G))}L=null,R=null,e.setRenderTarget(_),g=null,A=null,p=null,r=null,v=null,U.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(D){o=D,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(D){c=D,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||l},this.setReferenceSpace=function(D){u=D},this.getBaseLayer=function(){return A!==null?A:g},this.getBinding=function(){return p},this.getFrame=function(){return E},this.getSession=function(){return r},this.setSession=async function(D){if(r=D,r!==null){if(_=e.getRenderTarget(),r.addEventListener("select",T),r.addEventListener("selectstart",T),r.addEventListener("selectend",T),r.addEventListener("squeeze",T),r.addEventListener("squeezestart",T),r.addEventListener("squeezeend",T),r.addEventListener("end",N),r.addEventListener("inputsourceschange",k),C.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const G={antialias:r.renderState.layers===void 0?C.antialias:!0,alpha:!0,depth:C.depth,stencil:C.stencil,framebufferScaleFactor:o};g=new XRWebGLLayer(r,t,G),r.updateRenderState({baseLayer:g}),v=new Xi(g.framebufferWidth,g.framebufferHeight,{format:on,type:fn,colorSpace:e.outputColorSpace,stencilBuffer:C.stencil})}else{let G=null,K=null,J=null;C.depth&&(J=C.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,G=C.stencil?Ko:ao,K=C.stencil?oo:yi);const Ae={colorFormat:t.RGBA8,depthFormat:J,scaleFactor:o};p=new XRWebGLBinding(r,t),A=p.createProjectionLayer(Ae),r.updateRenderState({layers:[A]}),v=new Xi(A.textureWidth,A.textureHeight,{format:on,type:fn,depthTexture:new DR(A.textureWidth,A.textureHeight,K,void 0,void 0,void 0,void 0,void 0,void 0,G),stencilBuffer:C.stencil,colorSpace:e.outputColorSpace,samples:C.antialias?4:0});const ge=e.properties.get(v);ge.__ignoreDepthValues=A.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(f),u=null,l=await r.requestReferenceSpace(c),U.setContext(r),U.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function k(D){for(let G=0;G<D.removed.length;G++){const K=D.removed[G],J=y.indexOf(K);J>=0&&(y[J]=null,S[J].disconnect(K))}for(let G=0;G<D.added.length;G++){const K=D.added[G];let J=y.indexOf(K);if(J===-1){for(let ge=0;ge<S.length;ge++)if(ge>=y.length){y.push(K),J=ge;break}else if(y[ge]===null){y[ge]=K,J=ge;break}if(J===-1)break}const Ae=S[J];Ae&&Ae.connect(K)}}const O=new j,F=new j;function V(D,G,K){O.setFromMatrixPosition(G.matrixWorld),F.setFromMatrixPosition(K.matrixWorld);const J=O.distanceTo(F),Ae=G.projectionMatrix.elements,ge=K.projectionMatrix.elements,be=Ae[14]/(Ae[10]-1),de=Ae[14]/(Ae[10]+1),Oe=(Ae[9]+1)/Ae[5],It=(Ae[9]-1)/Ae[5],ot=(Ae[8]-1)/Ae[0],oe=(ge[8]+1)/ge[0],Mt=be*ot,Ne=be*oe,Ze=J/(-ot+oe),_e=Ze*-ot;G.matrixWorld.decompose(D.position,D.quaternion,D.scale),D.translateX(_e),D.translateZ(Ze),D.matrixWorld.compose(D.position,D.quaternion,D.scale),D.matrixWorldInverse.copy(D.matrixWorld).invert();const it=be+Ze,Ue=de+Ze,He=Mt-_e,$e=Ne+(J-_e),lt=Oe*de/Ue*it,mt=It*de/Ue*it;D.projectionMatrix.makePerspective(He,$e,lt,mt,it,Ue),D.projectionMatrixInverse.copy(D.projectionMatrix).invert()}function X(D,G){G===null?D.matrixWorld.copy(D.matrix):D.matrixWorld.multiplyMatrices(G.matrixWorld,D.matrix),D.matrixWorldInverse.copy(D.matrixWorld).invert()}this.updateCamera=function(D){if(r===null)return;B.near=w.near=x.near=D.near,B.far=w.far=x.far=D.far,(L!==B.near||R!==B.far)&&(r.updateRenderState({depthNear:B.near,depthFar:B.far}),L=B.near,R=B.far);const G=D.parent,K=B.cameras;X(B,G);for(let J=0;J<K.length;J++)X(K[J],G);K.length===2?V(B,x,w):B.projectionMatrix.copy(x.projectionMatrix),te(D,B,G)};function te(D,G,K){K===null?D.matrix.copy(G.matrixWorld):(D.matrix.copy(K.matrixWorld),D.matrix.invert(),D.matrix.multiply(G.matrixWorld)),D.matrix.decompose(D.position,D.quaternion,D.scale),D.updateMatrixWorld(!0),D.projectionMatrix.copy(G.projectionMatrix),D.projectionMatrixInverse.copy(G.projectionMatrixInverse),D.isPerspectiveCamera&&(D.fov=$o*2*Math.atan(1/D.projectionMatrix.elements[5]),D.zoom=1)}this.getCamera=function(){return B},this.getFoveation=function(){if(!(A===null&&g===null))return f},this.setFoveation=function(D){f=D,A!==null&&(A.fixedFoveation=D),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=D)};let Y=null;function $(D,G){if(d=G.getViewerPose(u||l),E=G,d!==null){const K=d.views;g!==null&&(e.setRenderTargetFramebuffer(v,g.framebuffer),e.setRenderTarget(v));let J=!1;K.length!==B.cameras.length&&(B.cameras.length=0,J=!0);for(let Ae=0;Ae<K.length;Ae++){const ge=K[Ae];let be=null;if(g!==null)be=g.getViewport(ge);else{const Oe=p.getViewSubImage(A,ge);be=Oe.viewport,Ae===0&&(e.setRenderTargetTextures(v,Oe.colorTexture,A.ignoreDepthValues?void 0:Oe.depthStencilTexture),e.setRenderTarget(v))}let de=b[Ae];de===void 0&&(de=new $n,de.layers.enable(Ae),de.viewport=new Gt,b[Ae]=de),de.matrix.fromArray(ge.transform.matrix),de.matrix.decompose(de.position,de.quaternion,de.scale),de.projectionMatrix.fromArray(ge.projectionMatrix),de.projectionMatrixInverse.copy(de.projectionMatrix).invert(),de.viewport.set(be.x,be.y,be.width,be.height),Ae===0&&(B.matrix.copy(de.matrix),B.matrix.decompose(B.position,B.quaternion,B.scale)),J===!0&&B.cameras.push(de)}}for(let K=0;K<S.length;K++){const J=y[K],Ae=S[K];J!==null&&Ae!==void 0&&Ae.update(J,G,u||l)}Y&&Y(D,G),G.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:G}),E=null}const U=new f_;U.setAnimationLoop($),this.setAnimationLoop=function(D){Y=D},this.dispose=function(){}}}function PR(i,e){function t(_,v){_.matrixAutoUpdate===!0&&_.updateMatrix(),v.value.copy(_.matrix)}function n(_,v){v.color.getRGB(_.fogColor.value,l_(i)),v.isFog?(_.fogNear.value=v.near,_.fogFar.value=v.far):v.isFogExp2&&(_.fogDensity.value=v.density)}function r(_,v,S,y,x){v.isMeshBasicMaterial||v.isMeshLambertMaterial?o(_,v):v.isMeshToonMaterial?(o(_,v),p(_,v)):v.isMeshPhongMaterial?(o(_,v),d(_,v)):v.isMeshStandardMaterial?(o(_,v),A(_,v),v.isMeshPhysicalMaterial&&g(_,v,x)):v.isMeshMatcapMaterial?(o(_,v),E(_,v)):v.isMeshDepthMaterial?o(_,v):v.isMeshDistanceMaterial?(o(_,v),C(_,v)):v.isMeshNormalMaterial?o(_,v):v.isLineBasicMaterial?(l(_,v),v.isLineDashedMaterial&&c(_,v)):v.isPointsMaterial?f(_,v,S,y):v.isSpriteMaterial?u(_,v):v.isShadowMaterial?(_.color.value.copy(v.color),_.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function o(_,v){_.opacity.value=v.opacity,v.color&&_.diffuse.value.copy(v.color),v.emissive&&_.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(_.map.value=v.map,t(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,t(v.alphaMap,_.alphaMapTransform)),v.bumpMap&&(_.bumpMap.value=v.bumpMap,t(v.bumpMap,_.bumpMapTransform),_.bumpScale.value=v.bumpScale,v.side===Bn&&(_.bumpScale.value*=-1)),v.normalMap&&(_.normalMap.value=v.normalMap,t(v.normalMap,_.normalMapTransform),_.normalScale.value.copy(v.normalScale),v.side===Bn&&_.normalScale.value.negate()),v.displacementMap&&(_.displacementMap.value=v.displacementMap,t(v.displacementMap,_.displacementMapTransform),_.displacementScale.value=v.displacementScale,_.displacementBias.value=v.displacementBias),v.emissiveMap&&(_.emissiveMap.value=v.emissiveMap,t(v.emissiveMap,_.emissiveMapTransform)),v.specularMap&&(_.specularMap.value=v.specularMap,t(v.specularMap,_.specularMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest);const S=e.get(v).envMap;if(S&&(_.envMap.value=S,_.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=v.reflectivity,_.ior.value=v.ior,_.refractionRatio.value=v.refractionRatio),v.lightMap){_.lightMap.value=v.lightMap;const y=i._useLegacyLights===!0?Math.PI:1;_.lightMapIntensity.value=v.lightMapIntensity*y,t(v.lightMap,_.lightMapTransform)}v.aoMap&&(_.aoMap.value=v.aoMap,_.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,_.aoMapTransform))}function l(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,v.map&&(_.map.value=v.map,t(v.map,_.mapTransform))}function c(_,v){_.dashSize.value=v.dashSize,_.totalSize.value=v.dashSize+v.gapSize,_.scale.value=v.scale}function f(_,v,S,y){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.size.value=v.size*S,_.scale.value=y*.5,v.map&&(_.map.value=v.map,t(v.map,_.uvTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,t(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function u(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.rotation.value=v.rotation,v.map&&(_.map.value=v.map,t(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,t(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function d(_,v){_.specular.value.copy(v.specular),_.shininess.value=Math.max(v.shininess,1e-4)}function p(_,v){v.gradientMap&&(_.gradientMap.value=v.gradientMap)}function A(_,v){_.metalness.value=v.metalness,v.metalnessMap&&(_.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,_.metalnessMapTransform)),_.roughness.value=v.roughness,v.roughnessMap&&(_.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,_.roughnessMapTransform)),e.get(v).envMap&&(_.envMapIntensity.value=v.envMapIntensity)}function g(_,v,S){_.ior.value=v.ior,v.sheen>0&&(_.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),_.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(_.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,_.sheenColorMapTransform)),v.sheenRoughnessMap&&(_.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,_.sheenRoughnessMapTransform))),v.clearcoat>0&&(_.clearcoat.value=v.clearcoat,_.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(_.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,_.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(_.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Bn&&_.clearcoatNormalScale.value.negate())),v.iridescence>0&&(_.iridescence.value=v.iridescence,_.iridescenceIOR.value=v.iridescenceIOR,_.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(_.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,_.iridescenceMapTransform)),v.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),v.transmission>0&&(_.transmission.value=v.transmission,_.transmissionSamplerMap.value=S.texture,_.transmissionSamplerSize.value.set(S.width,S.height),v.transmissionMap&&(_.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,_.transmissionMapTransform)),_.thickness.value=v.thickness,v.thicknessMap&&(_.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=v.attenuationDistance,_.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(_.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(_.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,_.anisotropyMapTransform))),_.specularIntensity.value=v.specularIntensity,_.specularColor.value.copy(v.specularColor),v.specularColorMap&&(_.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,_.specularColorMapTransform)),v.specularIntensityMap&&(_.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,_.specularIntensityMapTransform))}function E(_,v){v.matcap&&(_.matcap.value=v.matcap)}function C(_,v){const S=e.get(v).light;_.referencePosition.value.setFromMatrixPosition(S.matrixWorld),_.nearDistance.value=S.shadow.camera.near,_.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:r}}function UR(i,e,t,n){let r={},o={},l=[];const c=t.isWebGL2?i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS):0;function f(S,y){const x=y.program;n.uniformBlockBinding(S,x)}function u(S,y){let x=r[S.id];x===void 0&&(E(S),x=d(S),r[S.id]=x,S.addEventListener("dispose",_));const w=y.program;n.updateUBOMapping(S,w);const b=e.render.frame;o[S.id]!==b&&(A(S),o[S.id]=b)}function d(S){const y=p();S.__bindingPointIndex=y;const x=i.createBuffer(),w=S.__size,b=S.usage;return i.bindBuffer(i.UNIFORM_BUFFER,x),i.bufferData(i.UNIFORM_BUFFER,w,b),i.bindBuffer(i.UNIFORM_BUFFER,null),i.bindBufferBase(i.UNIFORM_BUFFER,y,x),x}function p(){for(let S=0;S<c;S++)if(l.indexOf(S)===-1)return l.push(S),S;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function A(S){const y=r[S.id],x=S.uniforms,w=S.__cache;i.bindBuffer(i.UNIFORM_BUFFER,y);for(let b=0,B=x.length;b<B;b++){const L=x[b];if(g(L,b,w)===!0){const R=L.__offset,T=Array.isArray(L.value)?L.value:[L.value];let N=0;for(let k=0;k<T.length;k++){const O=T[k],F=C(O);typeof O=="number"?(L.__data[0]=O,i.bufferSubData(i.UNIFORM_BUFFER,R+N,L.__data)):O.isMatrix3?(L.__data[0]=O.elements[0],L.__data[1]=O.elements[1],L.__data[2]=O.elements[2],L.__data[3]=O.elements[0],L.__data[4]=O.elements[3],L.__data[5]=O.elements[4],L.__data[6]=O.elements[5],L.__data[7]=O.elements[0],L.__data[8]=O.elements[6],L.__data[9]=O.elements[7],L.__data[10]=O.elements[8],L.__data[11]=O.elements[0]):(O.toArray(L.__data,N),N+=F.storage/Float32Array.BYTES_PER_ELEMENT)}i.bufferSubData(i.UNIFORM_BUFFER,R,L.__data)}}i.bindBuffer(i.UNIFORM_BUFFER,null)}function g(S,y,x){const w=S.value;if(x[y]===void 0){if(typeof w=="number")x[y]=w;else{const b=Array.isArray(w)?w:[w],B=[];for(let L=0;L<b.length;L++)B.push(b[L].clone());x[y]=B}return!0}else if(typeof w=="number"){if(x[y]!==w)return x[y]=w,!0}else{const b=Array.isArray(x[y])?x[y]:[x[y]],B=Array.isArray(w)?w:[w];for(let L=0;L<b.length;L++){const R=b[L];if(R.equals(B[L])===!1)return R.copy(B[L]),!0}}return!1}function E(S){const y=S.uniforms;let x=0;const w=16;let b=0;for(let B=0,L=y.length;B<L;B++){const R=y[B],T={boundary:0,storage:0},N=Array.isArray(R.value)?R.value:[R.value];for(let k=0,O=N.length;k<O;k++){const F=N[k],V=C(F);T.boundary+=V.boundary,T.storage+=V.storage}if(R.__data=new Float32Array(T.storage/Float32Array.BYTES_PER_ELEMENT),R.__offset=x,B>0){b=x%w;const k=w-b;b!==0&&k-T.boundary<0&&(x+=w-b,R.__offset=x)}x+=T.storage}return b=x%w,b>0&&(x+=w-b),S.__size=x,S.__cache={},this}function C(S){const y={boundary:0,storage:0};return typeof S=="number"?(y.boundary=4,y.storage=4):S.isVector2?(y.boundary=8,y.storage=8):S.isVector3||S.isColor?(y.boundary=16,y.storage=12):S.isVector4?(y.boundary=16,y.storage=16):S.isMatrix3?(y.boundary=48,y.storage=48):S.isMatrix4?(y.boundary=64,y.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),y}function _(S){const y=S.target;y.removeEventListener("dispose",_);const x=l.indexOf(y.__bindingPointIndex);l.splice(x,1),i.deleteBuffer(r[y.id]),delete r[y.id],delete o[y.id]}function v(){for(const S in r)i.deleteBuffer(r[S]);l=[],r={},o={}}return{bind:f,update:u,dispose:v}}class Q_{constructor(e={}){const{canvas:t=A3(),context:n=null,depth:r=!0,stencil:o=!0,alpha:l=!1,antialias:c=!1,premultipliedAlpha:f=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:p=!1}=e;this.isWebGLRenderer=!0;let A;n!==null?A=n.getContextAttributes().alpha:A=l;const g=new Uint32Array(4),E=new Int32Array(4);let C=null,_=null;const v=[],S=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Xt,this._useLegacyLights=!1,this.toneMapping=hs,this.toneMappingExposure=1;const y=this;let x=!1,w=0,b=0,B=null,L=-1,R=null;const T=new Gt,N=new Gt;let k=null;const O=new tt(0);let F=0,V=t.width,X=t.height,te=1,Y=null,$=null;const U=new Gt(0,0,V,X),D=new Gt(0,0,V,X);let G=!1;const K=new DA;let J=!1,Ae=!1,ge=null;const be=new ct,de=new Ke,Oe=new j,It={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ot(){return B===null?te:1}let oe=n;function Mt(z,re){for(let ce=0;ce<z.length;ce++){const ue=z[ce],fe=t.getContext(ue,re);if(fe!==null)return fe}return null}try{const z={alpha:!0,depth:r,stencil:o,antialias:c,premultipliedAlpha:f,preserveDrawingBuffer:u,powerPreference:d,failIfMajorPerformanceCaveat:p};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${su}`),t.addEventListener("webglcontextlost",dt,!1),t.addEventListener("webglcontextrestored",ee,!1),t.addEventListener("webglcontextcreationerror",Te,!1),oe===null){const re=["webgl2","webgl","experimental-webgl"];if(y.isWebGL1Renderer===!0&&re.shift(),oe=Mt(re,z),oe===null)throw Mt(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext<"u"&&oe instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),oe.getShaderPrecisionFormat===void 0&&(oe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(z){throw console.error("THREE.WebGLRenderer: "+z.message),z}let Ne,Ze,_e,it,Ue,He,$e,lt,mt,H,Q,se,Ce,me,xe,We,Se,Re,q,Me,pe,nt,je,Je;function Ge(){Ne=new Y4(oe),Ze=new z4(oe,Ne,e),Ne.init(Ze),nt=new RR(oe,Ne,Ze),_e=new TR(oe,Ne,Ze),it=new K4(oe),Ue=new pR,He=new BR(oe,Ne,_e,Ue,Ze,nt,it),$e=new H4(y),lt=new j4(y),mt=new O3(oe,Ze),je=new Q4(oe,Ne,mt,Ze),H=new q4(oe,mt,it,je),Q=new eB(oe,H,mt,it),q=new $4(oe,Ze,He),We=new G4(Ue),se=new AR(y,$e,lt,Ne,Ze,je,We),Ce=new PR(y,Ue),me=new mR,xe=new IR(Ne,Ze),Re=new F4(y,$e,lt,_e,Q,A,f),Se=new MR(y,Q,Ze),Je=new UR(oe,it,Ze,_e),Me=new O4(oe,Ne,it,Ze),pe=new X4(oe,Ne,it,Ze),it.programs=se.programs,y.capabilities=Ze,y.extensions=Ne,y.properties=Ue,y.renderLists=me,y.shadowMap=Se,y.state=_e,y.info=it}Ge();const Pe=new NR(y,oe);this.xr=Pe,this.getContext=function(){return oe},this.getContextAttributes=function(){return oe.getContextAttributes()},this.forceContextLoss=function(){const z=Ne.get("WEBGL_lose_context");z&&z.loseContext()},this.forceContextRestore=function(){const z=Ne.get("WEBGL_lose_context");z&&z.restoreContext()},this.getPixelRatio=function(){return te},this.setPixelRatio=function(z){z!==void 0&&(te=z,this.setSize(V,X,!1))},this.getSize=function(z){return z.set(V,X)},this.setSize=function(z,re,ce=!0){if(Pe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}V=z,X=re,t.width=Math.floor(z*te),t.height=Math.floor(re*te),ce===!0&&(t.style.width=z+"px",t.style.height=re+"px"),this.setViewport(0,0,z,re)},this.getDrawingBufferSize=function(z){return z.set(V*te,X*te).floor()},this.setDrawingBufferSize=function(z,re,ce){V=z,X=re,te=ce,t.width=Math.floor(z*ce),t.height=Math.floor(re*ce),this.setViewport(0,0,z,re)},this.getCurrentViewport=function(z){return z.copy(T)},this.getViewport=function(z){return z.copy(U)},this.setViewport=function(z,re,ce,ue){z.isVector4?U.set(z.x,z.y,z.z,z.w):U.set(z,re,ce,ue),_e.viewport(T.copy(U).multiplyScalar(te).floor())},this.getScissor=function(z){return z.copy(D)},this.setScissor=function(z,re,ce,ue){z.isVector4?D.set(z.x,z.y,z.z,z.w):D.set(z,re,ce,ue),_e.scissor(N.copy(D).multiplyScalar(te).floor())},this.getScissorTest=function(){return G},this.setScissorTest=function(z){_e.setScissorTest(G=z)},this.setOpaqueSort=function(z){Y=z},this.setTransparentSort=function(z){$=z},this.getClearColor=function(z){return z.copy(Re.getClearColor())},this.setClearColor=function(){Re.setClearColor.apply(Re,arguments)},this.getClearAlpha=function(){return Re.getClearAlpha()},this.setClearAlpha=function(){Re.setClearAlpha.apply(Re,arguments)},this.clear=function(z=!0,re=!0,ce=!0){let ue=0;if(z){let fe=!1;if(B!==null){const ke=B.texture.format;fe=ke===Nl||ke===fu||ke===eA}if(fe){const ke=B.texture.type,et=ke===fn||ke===yi||ke===uu||ke===oo||ke===o1||ke===a1,at=Re.getClearColor(),Qe=Re.getClearAlpha(),pt=at.r,ft=at.g,ht=at.b;et?(g[0]=pt,g[1]=ft,g[2]=ht,g[3]=Qe,oe.clearBufferuiv(oe.COLOR,0,g)):(E[0]=pt,E[1]=ft,E[2]=ht,E[3]=Qe,oe.clearBufferiv(oe.COLOR,0,E))}else ue|=oe.COLOR_BUFFER_BIT}re&&(ue|=oe.DEPTH_BUFFER_BIT),ce&&(ue|=oe.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),oe.clear(ue)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",dt,!1),t.removeEventListener("webglcontextrestored",ee,!1),t.removeEventListener("webglcontextcreationerror",Te,!1),me.dispose(),xe.dispose(),Ue.dispose(),$e.dispose(),lt.dispose(),Q.dispose(),je.dispose(),Je.dispose(),se.dispose(),Pe.dispose(),Pe.removeEventListener("sessionstart",Dn),Pe.removeEventListener("sessionend",Tt),ge&&(ge.dispose(),ge=null),an.stop()};function dt(z){z.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function ee(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;const z=it.autoReset,re=Se.enabled,ce=Se.autoUpdate,ue=Se.needsUpdate,fe=Se.type;Ge(),it.autoReset=z,Se.enabled=re,Se.autoUpdate=ce,Se.needsUpdate=ue,Se.type=fe}function Te(z){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",z.statusMessage)}function ye(z){const re=z.target;re.removeEventListener("dispose",ye),he(re)}function he(z){we(z),Ue.remove(z)}function we(z){const re=Ue.get(z).programs;re!==void 0&&(re.forEach(function(ce){se.releaseProgram(ce)}),z.isShaderMaterial&&se.releaseShaderCache(z))}this.renderBufferDirect=function(z,re,ce,ue,fe,ke){re===null&&(re=It);const et=fe.isMesh&&fe.matrixWorld.determinant()<0,at=Wp(z,re,ce,ue,fe);_e.setMaterial(ue,et);let Qe=ce.index,pt=1;if(ue.wireframe===!0){if(Qe=H.getWireframeAttribute(ce),Qe===void 0)return;pt=2}const ft=ce.drawRange,ht=ce.attributes.position;let jt=ft.start*pt,ii=(ft.start+ft.count)*pt;ke!==null&&(jt=Math.max(jt,ke.start*pt),ii=Math.min(ii,(ke.start+ke.count)*pt)),Qe!==null?(jt=Math.max(jt,0),ii=Math.min(ii,Qe.count)):ht!=null&&(jt=Math.max(jt,0),ii=Math.min(ii,ht.count));const dn=ii-jt;if(dn<0||dn===1/0)return;je.setup(fe,ue,at,ce,Qe);let di,Bt=Me;if(Qe!==null&&(di=mt.get(Qe),Bt=pe,Bt.setIndex(di)),fe.isMesh)ue.wireframe===!0?(_e.setLineWidth(ue.wireframeLinewidth*ot()),Bt.setMode(oe.LINES)):Bt.setMode(oe.TRIANGLES);else if(fe.isLine){let Et=ue.linewidth;Et===void 0&&(Et=1),_e.setLineWidth(Et*ot()),fe.isLineSegments?Bt.setMode(oe.LINES):fe.isLineLoop?Bt.setMode(oe.LINE_LOOP):Bt.setMode(oe.LINE_STRIP)}else fe.isPoints?Bt.setMode(oe.POINTS):fe.isSprite&&Bt.setMode(oe.TRIANGLES);if(fe.isInstancedMesh)Bt.renderInstances(jt,dn,fe.count);else if(ce.isInstancedBufferGeometry){const Et=ce._maxInstanceCount!==void 0?ce._maxInstanceCount:1/0,ri=Math.min(ce.instanceCount,Et);Bt.renderInstances(jt,dn,ri)}else Bt.render(jt,dn)};function qe(z,re,ce){z.transparent===!0&&z.side===Yi&&z.forceSinglePass===!1?(z.side=Bn,z.needsUpdate=!0,ws(z,re,ce),z.side=ji,z.needsUpdate=!0,ws(z,re,ce),z.side=Yi):ws(z,re,ce)}this.compile=function(z,re,ce=null){ce===null&&(ce=z),_=xe.get(ce),_.init(),S.push(_),ce.traverseVisible(function(fe){fe.isLight&&fe.layers.test(re.layers)&&(_.pushLight(fe),fe.castShadow&&_.pushShadow(fe))}),z!==ce&&z.traverseVisible(function(fe){fe.isLight&&fe.layers.test(re.layers)&&(_.pushLight(fe),fe.castShadow&&_.pushShadow(fe))}),_.setupLights(y._useLegacyLights);const ue=new Set;return z.traverse(function(fe){const ke=fe.material;if(ke)if(Array.isArray(ke))for(let et=0;et<ke.length;et++){const at=ke[et];qe(at,ce,fe),ue.add(at)}else qe(ke,ce,fe),ue.add(ke)}),S.pop(),_=null,ue},this.compileAsync=function(z,re,ce=null){const ue=this.compile(z,re,ce);return new Promise(fe=>{function ke(){if(ue.forEach(function(et){Ue.get(et).currentProgram.isReady()&&ue.delete(et)}),ue.size===0){fe(z);return}setTimeout(ke,10)}Ne.get("KHR_parallel_shader_compile")!==null?ke():setTimeout(ke,10)})};let At=null;function Wt(z){At&&At(z)}function Dn(){an.stop()}function Tt(){an.start()}const an=new f_;an.setAnimationLoop(Wt),typeof self<"u"&&an.setContext(self),this.setAnimationLoop=function(z){At=z,Pe.setAnimationLoop(z),z===null?an.stop():an.start()},Pe.addEventListener("sessionstart",Dn),Pe.addEventListener("sessionend",Tt),this.render=function(z,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;z.matrixWorldAutoUpdate===!0&&z.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),Pe.enabled===!0&&Pe.isPresenting===!0&&(Pe.cameraAutoUpdate===!0&&Pe.updateCamera(re),re=Pe.getCamera()),z.isScene===!0&&z.onBeforeRender(y,z,re,B),_=xe.get(z,S.length),_.init(),S.push(_),be.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),K.setFromProjectionMatrix(be),Ae=this.localClippingEnabled,J=We.init(this.clippingPlanes,Ae),C=me.get(z,v.length),C.init(),v.push(C),Pt(z,re,0,y.sortObjects),C.finish(),y.sortObjects===!0&&C.sort(Y,$),this.info.render.frame++,J===!0&&We.beginShadows();const ce=_.state.shadowsArray;if(Se.render(ce,z,re),J===!0&&We.endShadows(),this.info.autoReset===!0&&this.info.reset(),Re.render(C,z),_.setupLights(y._useLegacyLights),re.isArrayCamera){const ue=re.cameras;for(let fe=0,ke=ue.length;fe<ke;fe++){const et=ue[fe];Ti(C,z,et,et.viewport)}}else Ti(C,z,re);B!==null&&(He.updateMultisampleRenderTarget(B),He.updateRenderTargetMipmap(B)),z.isScene===!0&&z.onAfterRender(y,z,re),je.resetDefaultState(),L=-1,R=null,S.pop(),S.length>0?_=S[S.length-1]:_=null,v.pop(),v.length>0?C=v[v.length-1]:C=null};function Pt(z,re,ce,ue){if(z.visible===!1)return;if(z.layers.test(re.layers)){if(z.isGroup)ce=z.renderOrder;else if(z.isLOD)z.autoUpdate===!0&&z.update(re);else if(z.isLight)_.pushLight(z),z.castShadow&&_.pushShadow(z);else if(z.isSprite){if(!z.frustumCulled||K.intersectsSprite(z)){ue&&Oe.setFromMatrixPosition(z.matrixWorld).applyMatrix4(be);const et=Q.update(z),at=z.material;at.visible&&C.push(z,et,at,ce,Oe.z,null)}}else if((z.isMesh||z.isLine||z.isPoints)&&(!z.frustumCulled||K.intersectsObject(z))){const et=Q.update(z),at=z.material;if(ue&&(z.boundingSphere!==void 0?(z.boundingSphere===null&&z.computeBoundingSphere(),Oe.copy(z.boundingSphere.center)):(et.boundingSphere===null&&et.computeBoundingSphere(),Oe.copy(et.boundingSphere.center)),Oe.applyMatrix4(z.matrixWorld).applyMatrix4(be)),Array.isArray(at)){const Qe=et.groups;for(let pt=0,ft=Qe.length;pt<ft;pt++){const ht=Qe[pt],jt=at[ht.materialIndex];jt&&jt.visible&&C.push(z,et,jt,ce,Oe.z,ht)}}else at.visible&&C.push(z,et,at,ce,Oe.z,null)}}const ke=z.children;for(let et=0,at=ke.length;et<at;et++)Pt(ke[et],re,ce,ue)}function Ti(z,re,ce,ue){const fe=z.opaque,ke=z.transmissive,et=z.transparent;_.setupLightsView(ce),J===!0&&We.setGlobalState(y.clippingPlanes,ce),ke.length>0&&Cr(fe,ke,re,ce),ue&&_e.viewport(T.copy(ue)),fe.length>0&&ir(fe,re,ce),ke.length>0&&ir(ke,re,ce),et.length>0&&ir(et,re,ce),_e.buffers.depth.setTest(!0),_e.buffers.depth.setMask(!0),_e.buffers.color.setMask(!0),_e.setPolygonOffset(!1)}function Cr(z,re,ce,ue){if((ce.isScene===!0?ce.overrideMaterial:null)!==null)return;const ke=Ze.isWebGL2;ge===null&&(ge=new Xi(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")?Jn:fn,minFilter:Pr,samples:ke?4:0})),y.getDrawingBufferSize(de),ke?ge.setSize(de.x,de.y):ge.setSize(yu(de.x),yu(de.y));const et=y.getRenderTarget();y.setRenderTarget(ge),y.getClearColor(O),F=y.getClearAlpha(),F<1&&y.setClearColor(16777215,.5),y.clear();const at=y.toneMapping;y.toneMapping=hs,ir(z,ce,ue),He.updateMultisampleRenderTarget(ge),He.updateRenderTargetMipmap(ge);let Qe=!1;for(let pt=0,ft=re.length;pt<ft;pt++){const ht=re[pt],jt=ht.object,ii=ht.geometry,dn=ht.material,di=ht.group;if(dn.side===Yi&&jt.layers.test(ue.layers)){const Bt=dn.side;dn.side=Bn,dn.needsUpdate=!0,Co(jt,ce,ue,ii,dn,di),dn.side=Bt,dn.needsUpdate=!0,Qe=!0}}Qe===!0&&(He.updateMultisampleRenderTarget(ge),He.updateRenderTargetMipmap(ge)),y.setRenderTarget(et),y.setClearColor(O,F),y.toneMapping=at}function ir(z,re,ce){const ue=re.isScene===!0?re.overrideMaterial:null;for(let fe=0,ke=z.length;fe<ke;fe++){const et=z[fe],at=et.object,Qe=et.geometry,pt=ue===null?et.material:ue,ft=et.group;at.layers.test(ce.layers)&&Co(at,re,ce,Qe,pt,ft)}}function Co(z,re,ce,ue,fe,ke){z.onBeforeRender(y,re,ce,ue,fe,ke),z.modelViewMatrix.multiplyMatrices(ce.matrixWorldInverse,z.matrixWorld),z.normalMatrix.getNormalMatrix(z.modelViewMatrix),fe.onBeforeRender(y,re,ce,ue,z,ke),fe.transparent===!0&&fe.side===Yi&&fe.forceSinglePass===!1?(fe.side=Bn,fe.needsUpdate=!0,y.renderBufferDirect(ce,re,ue,fe,z,ke),fe.side=ji,fe.needsUpdate=!0,y.renderBufferDirect(ce,re,ue,fe,z,ke),fe.side=Yi):y.renderBufferDirect(ce,re,ue,fe,z,ke),z.onAfterRender(y,re,ce,ue,fe,ke)}function ws(z,re,ce){re.isScene!==!0&&(re=It);const ue=Ue.get(z),fe=_.state.lights,ke=_.state.shadowsArray,et=fe.state.version,at=se.getParameters(z,fe.state,ke,re,ce),Qe=se.getProgramCacheKey(at);let pt=ue.programs;ue.environment=z.isMeshStandardMaterial?re.environment:null,ue.fog=re.fog,ue.envMap=(z.isMeshStandardMaterial?lt:$e).get(z.envMap||ue.environment),pt===void 0&&(z.addEventListener("dispose",ye),pt=new Map,ue.programs=pt);let ft=pt.get(Qe);if(ft!==void 0){if(ue.currentProgram===ft&&ue.lightsStateVersion===et)return Mf(z,at),ft}else at.uniforms=se.getUniforms(z),z.onBuild(ce,at,y),z.onBeforeCompile(at,y),ft=se.acquireProgram(at,Qe),pt.set(Qe,ft),ue.uniforms=at.uniforms;const ht=ue.uniforms;return(!z.isShaderMaterial&&!z.isRawShaderMaterial||z.clipping===!0)&&(ht.clippingPlanes=We.uniform),Mf(z,at),ue.needsLights=Tf(z),ue.lightsStateVersion=et,ue.needsLights&&(ht.ambientLightColor.value=fe.state.ambient,ht.lightProbe.value=fe.state.probe,ht.directionalLights.value=fe.state.directional,ht.directionalLightShadows.value=fe.state.directionalShadow,ht.spotLights.value=fe.state.spot,ht.spotLightShadows.value=fe.state.spotShadow,ht.rectAreaLights.value=fe.state.rectArea,ht.ltc_1.value=fe.state.rectAreaLTC1,ht.ltc_2.value=fe.state.rectAreaLTC2,ht.pointLights.value=fe.state.point,ht.pointLightShadows.value=fe.state.pointShadow,ht.hemisphereLights.value=fe.state.hemi,ht.directionalShadowMap.value=fe.state.directionalShadowMap,ht.directionalShadowMatrix.value=fe.state.directionalShadowMatrix,ht.spotShadowMap.value=fe.state.spotShadowMap,ht.spotLightMatrix.value=fe.state.spotLightMatrix,ht.spotLightMap.value=fe.state.spotLightMap,ht.pointShadowMap.value=fe.state.pointShadowMap,ht.pointShadowMatrix.value=fe.state.pointShadowMatrix),ue.currentProgram=ft,ue.uniformsList=null,ft}function wf(z){if(z.uniformsList===null){const re=z.currentProgram.getUniforms();z.uniformsList=Xu.seqWithValue(re.seq,z.uniforms)}return z.uniformsList}function Mf(z,re){const ce=Ue.get(z);ce.outputColorSpace=re.outputColorSpace,ce.instancing=re.instancing,ce.instancingColor=re.instancingColor,ce.skinning=re.skinning,ce.morphTargets=re.morphTargets,ce.morphNormals=re.morphNormals,ce.morphColors=re.morphColors,ce.morphTargetsCount=re.morphTargetsCount,ce.numClippingPlanes=re.numClippingPlanes,ce.numIntersection=re.numClipIntersection,ce.vertexAlphas=re.vertexAlphas,ce.vertexTangents=re.vertexTangents,ce.toneMapping=re.toneMapping}function Wp(z,re,ce,ue,fe){re.isScene!==!0&&(re=It),He.resetTextureUnits();const ke=re.fog,et=ue.isMeshStandardMaterial?re.environment:null,at=B===null?y.outputColorSpace:B.isXRRenderTarget===!0?B.texture.colorSpace:En,Qe=(ue.isMeshStandardMaterial?lt:$e).get(ue.envMap||et),pt=ue.vertexColors===!0&&!!ce.attributes.color&&ce.attributes.color.itemSize===4,ft=!!ce.attributes.tangent&&(!!ue.normalMap||ue.anisotropy>0),ht=!!ce.morphAttributes.position,jt=!!ce.morphAttributes.normal,ii=!!ce.morphAttributes.color;let dn=hs;ue.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(dn=y.toneMapping);const di=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,Bt=di!==void 0?di.length:0,Et=Ue.get(ue),ri=_.state.lights;if(J===!0&&(Ae===!0||z!==R)){const si=z===R&&ue.id===L;We.setState(ue,z,si)}let ln=!1;ue.version===Et.__version?(Et.needsLights&&Et.lightsStateVersion!==ri.state.version||Et.outputColorSpace!==at||fe.isInstancedMesh&&Et.instancing===!1||!fe.isInstancedMesh&&Et.instancing===!0||fe.isSkinnedMesh&&Et.skinning===!1||!fe.isSkinnedMesh&&Et.skinning===!0||fe.isInstancedMesh&&Et.instancingColor===!0&&fe.instanceColor===null||fe.isInstancedMesh&&Et.instancingColor===!1&&fe.instanceColor!==null||Et.envMap!==Qe||ue.fog===!0&&Et.fog!==ke||Et.numClippingPlanes!==void 0&&(Et.numClippingPlanes!==We.numPlanes||Et.numIntersection!==We.numIntersection)||Et.vertexAlphas!==pt||Et.vertexTangents!==ft||Et.morphTargets!==ht||Et.morphNormals!==jt||Et.morphColors!==ii||Et.toneMapping!==dn||Ze.isWebGL2===!0&&Et.morphTargetsCount!==Bt)&&(ln=!0):(ln=!0,Et.__version=ue.version);let Jr=Et.currentProgram;ln===!0&&(Jr=ws(ue,re,fe));let Bf=!1,Ir=!1,Ms=!1;const An=Jr.getUniforms(),Qi=Et.uniforms;if(_e.useProgram(Jr.program)&&(Bf=!0,Ir=!0,Ms=!0),ue.id!==L&&(L=ue.id,Ir=!0),Bf||R!==z){An.setValue(oe,"projectionMatrix",z.projectionMatrix),An.setValue(oe,"viewMatrix",z.matrixWorldInverse);const si=An.map.cameraPosition;si!==void 0&&si.setValue(oe,Oe.setFromMatrixPosition(z.matrixWorld)),Ze.logarithmicDepthBuffer&&An.setValue(oe,"logDepthBufFC",2/(Math.log(z.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&An.setValue(oe,"isOrthographic",z.isOrthographicCamera===!0),R!==z&&(R=z,Ir=!0,Ms=!0)}if(fe.isSkinnedMesh){An.setOptional(oe,fe,"bindMatrix"),An.setOptional(oe,fe,"bindMatrixInverse");const si=fe.skeleton;si&&(Ze.floatVertexTextures?(si.boneTexture===null&&si.computeBoneTexture(),An.setValue(oe,"boneTexture",si.boneTexture,He),An.setValue(oe,"boneTextureSize",si.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const uc=ce.morphAttributes;if((uc.position!==void 0||uc.normal!==void 0||uc.color!==void 0&&Ze.isWebGL2===!0)&&q.update(fe,ce,Jr),(Ir||Et.receiveShadow!==fe.receiveShadow)&&(Et.receiveShadow=fe.receiveShadow,An.setValue(oe,"receiveShadow",fe.receiveShadow)),ue.isMeshGouraudMaterial&&ue.envMap!==null&&(Qi.envMap.value=Qe,Qi.flipEnvMap.value=Qe.isCubeTexture&&Qe.isRenderTargetTexture===!1?-1:1),Ir&&(An.setValue(oe,"toneMappingExposure",y.toneMappingExposure),Et.needsLights&&Kr(Qi,Ms),ke&&ue.fog===!0&&Ce.refreshFogUniforms(Qi,ke),Ce.refreshMaterialUniforms(Qi,ue,te,X,ge),Xu.upload(oe,wf(Et),Qi,He)),ue.isShaderMaterial&&ue.uniformsNeedUpdate===!0&&(Xu.upload(oe,wf(Et),Qi,He),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&An.setValue(oe,"center",fe.center),An.setValue(oe,"modelViewMatrix",fe.modelViewMatrix),An.setValue(oe,"normalMatrix",fe.normalMatrix),An.setValue(oe,"modelMatrix",fe.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const si=ue.uniformsGroups;for(let Io=0,Rf=si.length;Io<Rf;Io++)if(Ze.isWebGL2){const Ga=si[Io];Je.update(Ga,Jr),Je.bind(Ga,Jr)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return Jr}function Kr(z,re){z.ambientLightColor.needsUpdate=re,z.lightProbe.needsUpdate=re,z.directionalLights.needsUpdate=re,z.directionalLightShadows.needsUpdate=re,z.pointLights.needsUpdate=re,z.pointLightShadows.needsUpdate=re,z.spotLights.needsUpdate=re,z.spotLightShadows.needsUpdate=re,z.rectAreaLights.needsUpdate=re,z.hemisphereLights.needsUpdate=re}function Tf(z){return z.isMeshLambertMaterial||z.isMeshToonMaterial||z.isMeshPhongMaterial||z.isMeshStandardMaterial||z.isShadowMaterial||z.isShaderMaterial&&z.lights===!0}this.getActiveCubeFace=function(){return w},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return B},this.setRenderTargetTextures=function(z,re,ce){Ue.get(z.texture).__webglTexture=re,Ue.get(z.depthTexture).__webglTexture=ce;const ue=Ue.get(z);ue.__hasExternalTextures=!0,ue.__hasExternalTextures&&(ue.__autoAllocateDepthBuffer=ce===void 0,ue.__autoAllocateDepthBuffer||Ne.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(z,re){const ce=Ue.get(z);ce.__webglFramebuffer=re,ce.__useDefaultFramebuffer=re===void 0},this.setRenderTarget=function(z,re=0,ce=0){B=z,w=re,b=ce;let ue=!0,fe=null,ke=!1,et=!1;if(z){const Qe=Ue.get(z);Qe.__useDefaultFramebuffer!==void 0?(_e.bindFramebuffer(oe.FRAMEBUFFER,null),ue=!1):Qe.__webglFramebuffer===void 0?He.setupRenderTarget(z):Qe.__hasExternalTextures&&He.rebindTextures(z,Ue.get(z.texture).__webglTexture,Ue.get(z.depthTexture).__webglTexture);const pt=z.texture;(pt.isData3DTexture||pt.isDataArrayTexture||pt.isCompressedArrayTexture)&&(et=!0);const ft=Ue.get(z).__webglFramebuffer;z.isWebGLCubeRenderTarget?(Array.isArray(ft[re])?fe=ft[re][ce]:fe=ft[re],ke=!0):Ze.isWebGL2&&z.samples>0&&He.useMultisampledRTT(z)===!1?fe=Ue.get(z).__webglMultisampledFramebuffer:Array.isArray(ft)?fe=ft[ce]:fe=ft,T.copy(z.viewport),N.copy(z.scissor),k=z.scissorTest}else T.copy(U).multiplyScalar(te).floor(),N.copy(D).multiplyScalar(te).floor(),k=G;if(_e.bindFramebuffer(oe.FRAMEBUFFER,fe)&&Ze.drawBuffers&&ue&&_e.drawBuffers(z,fe),_e.viewport(T),_e.scissor(N),_e.setScissorTest(k),ke){const Qe=Ue.get(z.texture);oe.framebufferTexture2D(oe.FRAMEBUFFER,oe.COLOR_ATTACHMENT0,oe.TEXTURE_CUBE_MAP_POSITIVE_X+re,Qe.__webglTexture,ce)}else if(et){const Qe=Ue.get(z.texture),pt=re||0;oe.framebufferTextureLayer(oe.FRAMEBUFFER,oe.COLOR_ATTACHMENT0,Qe.__webglTexture,ce||0,pt)}L=-1},this.readRenderTargetPixels=function(z,re,ce,ue,fe,ke,et){if(!(z&&z.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let at=Ue.get(z).__webglFramebuffer;if(z.isWebGLCubeRenderTarget&&et!==void 0&&(at=at[et]),at){_e.bindFramebuffer(oe.FRAMEBUFFER,at);try{const Qe=z.texture,pt=Qe.format,ft=Qe.type;if(pt!==on&&nt.convert(pt)!==oe.getParameter(oe.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ht=ft===Jn&&(Ne.has("EXT_color_buffer_half_float")||Ze.isWebGL2&&Ne.has("EXT_color_buffer_float"));if(ft!==fn&&nt.convert(ft)!==oe.getParameter(oe.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ft===hn&&(Ze.isWebGL2||Ne.has("OES_texture_float")||Ne.has("WEBGL_color_buffer_float")))&&!ht){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=z.width-ue&&ce>=0&&ce<=z.height-fe&&oe.readPixels(re,ce,ue,fe,nt.convert(pt),nt.convert(ft),ke)}finally{const Qe=B!==null?Ue.get(B).__webglFramebuffer:null;_e.bindFramebuffer(oe.FRAMEBUFFER,Qe)}}},this.copyFramebufferToTexture=function(z,re,ce=0){const ue=Math.pow(2,-ce),fe=Math.floor(re.image.width*ue),ke=Math.floor(re.image.height*ue);He.setTexture2D(re,0),oe.copyTexSubImage2D(oe.TEXTURE_2D,ce,0,0,z.x,z.y,fe,ke),_e.unbindTexture()},this.copyTextureToTexture=function(z,re,ce,ue=0){const fe=re.image.width,ke=re.image.height,et=nt.convert(ce.format),at=nt.convert(ce.type);He.setTexture2D(ce,0),oe.pixelStorei(oe.UNPACK_FLIP_Y_WEBGL,ce.flipY),oe.pixelStorei(oe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),oe.pixelStorei(oe.UNPACK_ALIGNMENT,ce.unpackAlignment),re.isDataTexture?oe.texSubImage2D(oe.TEXTURE_2D,ue,z.x,z.y,fe,ke,et,at,re.image.data):re.isCompressedTexture?oe.compressedTexSubImage2D(oe.TEXTURE_2D,ue,z.x,z.y,re.mipmaps[0].width,re.mipmaps[0].height,et,re.mipmaps[0].data):oe.texSubImage2D(oe.TEXTURE_2D,ue,z.x,z.y,et,at,re.image),ue===0&&ce.generateMipmaps&&oe.generateMipmap(oe.TEXTURE_2D),_e.unbindTexture()},this.copyTextureToTexture3D=function(z,re,ce,ue,fe=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const ke=z.max.x-z.min.x+1,et=z.max.y-z.min.y+1,at=z.max.z-z.min.z+1,Qe=nt.convert(ue.format),pt=nt.convert(ue.type);let ft;if(ue.isData3DTexture)He.setTexture3D(ue,0),ft=oe.TEXTURE_3D;else if(ue.isDataArrayTexture)He.setTexture2DArray(ue,0),ft=oe.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}oe.pixelStorei(oe.UNPACK_FLIP_Y_WEBGL,ue.flipY),oe.pixelStorei(oe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ue.premultiplyAlpha),oe.pixelStorei(oe.UNPACK_ALIGNMENT,ue.unpackAlignment);const ht=oe.getParameter(oe.UNPACK_ROW_LENGTH),jt=oe.getParameter(oe.UNPACK_IMAGE_HEIGHT),ii=oe.getParameter(oe.UNPACK_SKIP_PIXELS),dn=oe.getParameter(oe.UNPACK_SKIP_ROWS),di=oe.getParameter(oe.UNPACK_SKIP_IMAGES),Bt=ce.isCompressedTexture?ce.mipmaps[0]:ce.image;oe.pixelStorei(oe.UNPACK_ROW_LENGTH,Bt.width),oe.pixelStorei(oe.UNPACK_IMAGE_HEIGHT,Bt.height),oe.pixelStorei(oe.UNPACK_SKIP_PIXELS,z.min.x),oe.pixelStorei(oe.UNPACK_SKIP_ROWS,z.min.y),oe.pixelStorei(oe.UNPACK_SKIP_IMAGES,z.min.z),ce.isDataTexture||ce.isData3DTexture?oe.texSubImage3D(ft,fe,re.x,re.y,re.z,ke,et,at,Qe,pt,Bt.data):ce.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),oe.compressedTexSubImage3D(ft,fe,re.x,re.y,re.z,ke,et,at,Qe,Bt.data)):oe.texSubImage3D(ft,fe,re.x,re.y,re.z,ke,et,at,Qe,pt,Bt),oe.pixelStorei(oe.UNPACK_ROW_LENGTH,ht),oe.pixelStorei(oe.UNPACK_IMAGE_HEIGHT,jt),oe.pixelStorei(oe.UNPACK_SKIP_PIXELS,ii),oe.pixelStorei(oe.UNPACK_SKIP_ROWS,dn),oe.pixelStorei(oe.UNPACK_SKIP_IMAGES,di),fe===0&&ue.generateMipmaps&&oe.generateMipmap(ft),_e.unbindTexture()},this.initTexture=function(z){z.isCubeTexture?He.setTextureCube(z,0):z.isData3DTexture?He.setTexture3D(z,0):z.isDataArrayTexture||z.isCompressedArrayTexture?He.setTexture2DArray(z,0):He.setTexture2D(z,0),_e.unbindTexture()},this.resetState=function(){w=0,b=0,B=null,_e.reset(),je.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ur}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===gu?"display-p3":"srgb",t.unpackColorSpace=Nt.workingColorSpace===Ul?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Xt?uo:L1}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===uo?Xt:En}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class kR extends Q_{}kR.prototype.isWebGL1Renderer=!0;class FR extends tn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class QR{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=uA,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=qi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,o=this.stride;r<o;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=qi()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=qi()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ei=new j;class GA{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix4(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyNormalMatrix(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.transformDirection(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}setX(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Ar(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Ar(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Ar(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Ar(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),n=Ot(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),n=Ot(n,this.array),r=Ot(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),n=Ot(n,this.array),r=Ot(r,this.array),o=Ot(o,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=o,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[r+o])}return new bn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new GA(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[r+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const O_=new j,z_=new Gt,G_=new Gt,OR=new j,H_=new ct,Ku=new j,HA=new Ji,V_=new ct,VA=new Hl;class zR extends Wn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=n1,this.bindMatrix=new ct,this.bindMatrixInverse=new ct,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new gn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ku),this.boundingBox.expandByPoint(Ku)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ji),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ku),this.boundingSphere.expandByPoint(Ku)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),HA.copy(this.boundingSphere),HA.applyMatrix4(r),e.ray.intersectsSphere(HA)!==!1&&(V_.copy(r).invert(),VA.copy(e.ray).applyMatrix4(V_),!(this.boundingBox!==null&&VA.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,VA)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Gt,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===n1?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===kM?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;z_.fromBufferAttribute(r.attributes.skinIndex,e),G_.fromBufferAttribute(r.attributes.skinWeight,e),O_.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let o=0;o<4;o++){const l=G_.getComponent(o);if(l!==0){const c=z_.getComponent(o);H_.multiplyMatrices(n.bones[c].matrixWorld,n.boneInverses[c]),t.addScaledVector(OR.copy(O_).applyMatrix4(H_),l)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class W_ extends tn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class _a extends Rn{constructor(e=null,t=1,n=1,r,o,l,c,f,u=qt,d=qt,p,A){super(null,l,c,f,u,d,r,o,p,A),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const j_=new ct,GR=new ct;class WA{constructor(e=[],t=[]){this.uuid=qi(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new ct)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new ct;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let o=0,l=e.length;o<l;o++){const c=e[o]?e[o].matrixWorld:GR;j_.multiplyMatrices(c,t[o]),j_.toArray(n,o*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new WA(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=k1(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new _a(t,e,e,on,hn);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const o=e.bones[n];let l=t[o];l===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),l=new W_),this.bones.push(l),this.boneInverses.push(new ct().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,o=t.length;r<o;r++){const l=t[r];e.bones.push(l.uuid);const c=n[r];e.boneInverses.push(c.toArray())}return e}}class jA extends bn{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Ea=new ct,Y_=new ct,Ju=[],q_=new gn,HR=new ct,Xl=new Wn,Kl=new Ji;class VR extends Wn{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new jA(new Float32Array(n*16),16),this.instanceColor=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,HR)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new gn),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Ea),q_.copy(e.boundingBox).applyMatrix4(Ea),this.boundingBox.union(q_)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ji),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Ea),Kl.copy(e.boundingSphere).applyMatrix4(Ea),this.boundingSphere.union(Kl)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Xl.geometry=this.geometry,Xl.material=this.material,Xl.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Kl.copy(this.boundingSphere),Kl.applyMatrix4(n),e.ray.intersectsSphere(Kl)!==!1))for(let o=0;o<r;o++){this.getMatrixAt(o,Ea),Y_.multiplyMatrices(n,Ea),Xl.matrixWorld=Y_,Xl.raycast(e,Ju);for(let l=0,c=Ju.length;l<c;l++){const f=Ju[l];f.instanceId=o,f.object=this,t.push(f)}Ju.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new jA(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class X_ extends gr{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new tt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const K_=new j,J_=new j,Z_=new ct,YA=new Hl,Zu=new Ji;class qA extends tn{constructor(e=new xi,t=new X_){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let r=1,o=t.count;r<o;r++)K_.fromBufferAttribute(t,r-1),J_.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=K_.distanceTo(J_);e.setAttribute("lineDistance",new er(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,o=e.params.Line.threshold,l=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Zu.copy(n.boundingSphere),Zu.applyMatrix4(r),Zu.radius+=o,e.ray.intersectsSphere(Zu)===!1)return;Z_.copy(r).invert(),YA.copy(e.ray).applyMatrix4(Z_);const c=o/((this.scale.x+this.scale.y+this.scale.z)/3),f=c*c,u=new j,d=new j,p=new j,A=new j,g=this.isLineSegments?2:1,E=n.index,_=n.attributes.position;if(E!==null){const v=Math.max(0,l.start),S=Math.min(E.count,l.start+l.count);for(let y=v,x=S-1;y<x;y+=g){const w=E.getX(y),b=E.getX(y+1);if(u.fromBufferAttribute(_,w),d.fromBufferAttribute(_,b),YA.distanceSqToSegment(u,d,A,p)>f)continue;A.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(A);L<e.near||L>e.far||t.push({distance:L,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const v=Math.max(0,l.start),S=Math.min(_.count,l.start+l.count);for(let y=v,x=S-1;y<x;y+=g){if(u.fromBufferAttribute(_,y),d.fromBufferAttribute(_,y+1),YA.distanceSqToSegment(u,d,A,p)>f)continue;A.applyMatrix4(this.matrixWorld);const b=e.ray.origin.distanceTo(A);b<e.near||b>e.far||t.push({distance:b,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=r.length;o<l;o++){const c=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[c]=o}}}}}const $_=new j,eE=new j;class WR extends qA{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let r=0,o=t.count;r<o;r+=2)$_.fromBufferAttribute(t,r),eE.fromBufferAttribute(t,r+1),n[r]=r===0?0:n[r-1],n[r+1]=n[r]+$_.distanceTo(eE);e.setAttribute("lineDistance",new er(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class jR extends qA{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class tE extends gr{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new tt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const nE=new ct,XA=new Hl,$u=new Ji,ef=new j;class YR extends tn{constructor(e=new xi,t=new tE){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,o=e.params.Points.threshold,l=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),$u.copy(n.boundingSphere),$u.applyMatrix4(r),$u.radius+=o,e.ray.intersectsSphere($u)===!1)return;nE.copy(r).invert(),XA.copy(e.ray).applyMatrix4(nE);const c=o/((this.scale.x+this.scale.y+this.scale.z)/3),f=c*c,u=n.index,p=n.attributes.position;if(u!==null){const A=Math.max(0,l.start),g=Math.min(u.count,l.start+l.count);for(let E=A,C=g;E<C;E++){const _=u.getX(E);ef.fromBufferAttribute(p,_),iE(ef,_,f,r,e,t,this)}}else{const A=Math.max(0,l.start),g=Math.min(p.count,l.start+l.count);for(let E=A,C=g;E<C;E++)ef.fromBufferAttribute(p,E),iE(ef,E,f,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=r.length;o<l;o++){const c=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[c]=o}}}}}function iE(i,e,t,n,r,o,l){const c=XA.distanceSqToPoint(i);if(c<t){const f=new j;XA.closestPointToPoint(i,f),f.applyMatrix4(n);const u=r.ray.origin.distanceTo(f);if(u<r.near||u>r.far)return;o.push({distance:u,distanceToRay:Math.sqrt(c),point:f,index:e,face:null,object:l})}}class tf extends Rn{constructor(e,t,n,r,o,l,c,f,u,d,p,A){super(null,l,c,f,u,d,r,o,p,A),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class qR extends tf{constructor(e,t,n,r,o,l){super(e,t,n,o,l),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Fn}}class XR extends tf{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,so),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class KR extends Si{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class KA extends gr{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new tt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=D1,this.normalScale=new Ke(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class _r extends KA{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Ke(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return yn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new tt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new tt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new tt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}function nf(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)}function JR(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function ZR(i){function e(r,o){return i[r]-i[o]}const t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n}function rE(i,e,t){const n=i.length,r=new i.constructor(n);for(let o=0,l=0;l!==n;++o){const c=t[o]*e;for(let f=0;f!==e;++f)r[l++]=i[c+f]}return r}function sE(i,e,t,n){let r=1,o=i[0];for(;o!==void 0&&o[n]===void 0;)o=i[r++];if(o===void 0)return;let l=o[n];if(l!==void 0)if(Array.isArray(l))do l=o[n],l!==void 0&&(e.push(o.time),t.push.apply(t,l)),o=i[r++];while(o!==void 0);else if(l.toArray!==void 0)do l=o[n],l!==void 0&&(e.push(o.time),l.toArray(t,t.length)),o=i[r++];while(o!==void 0);else do l=o[n],l!==void 0&&(e.push(o.time),t.push(l)),o=i[r++];while(o!==void 0)}class Jl{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],o=t[n-1];e:{t:{let l;n:{i:if(!(e<r)){for(let c=n+2;;){if(r===void 0){if(e<o)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===c)break;if(o=r,r=t[++n],e<r)break t}l=t.length;break n}if(!(e>=o)){const c=t[1];e<c&&(n=2,o=c);for(let f=n-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===f)break;if(r=o,o=t[--n-1],e>=o)break t}l=n,n=0;break n}break e}for(;n<l;){const c=n+l>>>1;e<t[c]?l=c:n=c+1}if(r=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,o,r)}return this.interpolate_(n,o,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,o=e*r;for(let l=0;l!==r;++l)t[l]=n[o+l];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class $R extends Jl{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:T1,endingEnd:T1}}intervalChanged_(e,t,n){const r=this.parameterPositions;let o=e-2,l=e+1,c=r[o],f=r[l];if(c===void 0)switch(this.getSettings_().endingStart){case B1:o=e,c=2*t-n;break;case R1:o=r.length-2,c=t+r[o]-r[o+1];break;default:o=e,c=n}if(f===void 0)switch(this.getSettings_().endingEnd){case B1:l=e,f=2*n-t;break;case R1:l=1,f=n+r[1]-r[0];break;default:l=e-1,f=t}const u=(n-t)*.5,d=this.valueSize;this._weightPrev=u/(t-c),this._weightNext=u/(f-n),this._offsetPrev=o*d,this._offsetNext=l*d}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=e*c,u=f-c,d=this._offsetPrev,p=this._offsetNext,A=this._weightPrev,g=this._weightNext,E=(n-t)/(r-t),C=E*E,_=C*E,v=-A*_+2*A*C-A*E,S=(1+A)*_+(-1.5-2*A)*C+(-.5+A)*E+1,y=(-1-g)*_+(1.5+g)*C+.5*E,x=g*_-g*C;for(let w=0;w!==c;++w)o[w]=v*l[d+w]+S*l[u+w]+y*l[f+w]+x*l[p+w];return o}}class eb extends Jl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=e*c,u=f-c,d=(n-t)/(r-t),p=1-d;for(let A=0;A!==c;++A)o[A]=l[u+A]*p+l[f+A]*d;return o}}class tb extends Jl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Er{constructor(e,t,n,r){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=nf(t,this.TimeBufferType),this.values=nf(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:nf(e.times,Array),values:nf(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(n.interpolation=r)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new tb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new eb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new $R(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Pl:t=this.InterpolantFactoryMethodDiscrete;break;case Jo:t=this.InterpolantFactoryMethodLinear;break;case lA:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pl;case this.InterpolantFactoryMethodLinear:return Jo;case this.InterpolantFactoryMethodSmooth:return lA}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let o=0,l=r-1;for(;o!==r&&n[o]<e;)++o;for(;l!==-1&&n[l]>t;)--l;if(++l,o!==0||l!==r){o>=l&&(l=Math.max(l,1),o=l-1);const c=this.getValueSize();this.times=n.slice(o,l),this.values=this.values.slice(o*c,l*c)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let l=null;for(let c=0;c!==o;c++){const f=n[c];if(typeof f=="number"&&isNaN(f)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,c,f),e=!1;break}if(l!==null&&l>f){console.error("THREE.KeyframeTrack: Out of order keys.",this,c,f,l),e=!1;break}l=f}if(r!==void 0&&JR(r))for(let c=0,f=r.length;c!==f;++c){const u=r[c];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,c,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===lA,o=e.length-1;let l=1;for(let c=1;c<o;++c){let f=!1;const u=e[c],d=e[c+1];if(u!==d&&(c!==1||u!==e[0]))if(r)f=!0;else{const p=c*n,A=p-n,g=p+n;for(let E=0;E!==n;++E){const C=t[p+E];if(C!==t[A+E]||C!==t[g+E]){f=!0;break}}}if(f){if(c!==l){e[l]=e[c];const p=c*n,A=l*n;for(let g=0;g!==n;++g)t[A+g]=t[p+g]}++l}}if(o>0){e[l]=e[o];for(let c=o*n,f=l*n,u=0;u!==n;++u)t[f+u]=t[c+u];++l}return l!==e.length?(this.times=e.slice(0,l),this.values=t.slice(0,l*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Er.prototype.TimeBufferType=Float32Array,Er.prototype.ValueBufferType=Float32Array,Er.prototype.DefaultInterpolation=Jo;class ya extends Er{}ya.prototype.ValueTypeName="bool",ya.prototype.ValueBufferType=Array,ya.prototype.DefaultInterpolation=Pl,ya.prototype.InterpolantFactoryMethodLinear=void 0,ya.prototype.InterpolantFactoryMethodSmooth=void 0;class oE extends Er{}oE.prototype.ValueTypeName="color";class Ca extends Er{}Ca.prototype.ValueTypeName="number";class nb extends Jl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=(n-t)/(r-t);let u=e*c;for(let d=u+c;u!==d;u+=4)pr.slerpFlat(o,0,l,u-c,l,u,f);return o}}class _o extends Er{InterpolantFactoryMethodLinear(e){return new nb(this.times,this.values,this.getValueSize(),e)}}_o.prototype.ValueTypeName="quaternion",_o.prototype.DefaultInterpolation=Jo,_o.prototype.InterpolantFactoryMethodSmooth=void 0;class Ia extends Er{}Ia.prototype.ValueTypeName="string",Ia.prototype.ValueBufferType=Array,Ia.prototype.DefaultInterpolation=Pl,Ia.prototype.InterpolantFactoryMethodLinear=void 0,Ia.prototype.InterpolantFactoryMethodSmooth=void 0;class xa extends Er{}xa.prototype.ValueTypeName="vector";class ib{constructor(e,t=-1,n,r=GM){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=qi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let l=0,c=n.length;l!==c;++l)t.push(sb(n[l]).scale(r));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,l=n.length;o!==l;++o)t.push(Er.toJSON(n[o]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const o=t.length,l=[];for(let c=0;c<o;c++){let f=[],u=[];f.push((c+o-1)%o,c,(c+1)%o),u.push(0,1,0);const d=ZR(f);f=rE(f,1,d),u=rE(u,1,d),!r&&f[0]===0&&(f.push(o),u.push(u[0])),l.push(new Ca(".morphTargetInfluences["+t[c].name+"]",f,u).scale(1/n))}return new this(e,-1,l)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const r=e;n=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},o=/^([\w-]*?)([\d]+)$/;for(let c=0,f=e.length;c<f;c++){const u=e[c],d=u.name.match(o);if(d&&d.length>1){const p=d[1];let A=r[p];A||(r[p]=A=[]),A.push(u)}}const l=[];for(const c in r)l.push(this.CreateFromMorphTargetSequence(c,r[c],t,n));return l}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(p,A,g,E,C){if(g.length!==0){const _=[],v=[];sE(g,_,v,E),_.length!==0&&C.push(new p(A,_,v))}},r=[],o=e.name||"default",l=e.fps||30,c=e.blendMode;let f=e.length||-1;const u=e.hierarchy||[];for(let p=0;p<u.length;p++){const A=u[p].keys;if(!(!A||A.length===0))if(A[0].morphTargets){const g={};let E;for(E=0;E<A.length;E++)if(A[E].morphTargets)for(let C=0;C<A[E].morphTargets.length;C++)g[A[E].morphTargets[C]]=-1;for(const C in g){const _=[],v=[];for(let S=0;S!==A[E].morphTargets.length;++S){const y=A[E];_.push(y.time),v.push(y.morphTarget===C?1:0)}r.push(new Ca(".morphTargetInfluence["+C+"]",_,v))}f=g.length*l}else{const g=".bones["+t[p].name+"]";n(xa,g+".position",A,"pos",r),n(_o,g+".quaternion",A,"rot",r),n(xa,g+".scale",A,"scl",r)}}return r.length===0?null:new this(o,f,r,c)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,r=e.length;n!==r;++n){const o=this.tracks[n];t=Math.max(t,o.times[o.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function rb(i){switch(i.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ca;case"vector":case"vector2":case"vector3":case"vector4":return xa;case"color":return oE;case"quaternion":return _o;case"bool":case"boolean":return ya;case"string":return Ia}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+i)}function sb(i){if(i.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=rb(i.type);if(i.times===void 0){const t=[],n=[];sE(i.keys,t,n,"value"),i.times=t,i.values=n}return e.parse!==void 0?e.parse(i):new e(i.name,i.times,i.values,i.interpolation)}const Sa={enabled:!1,files:{},add:function(i,e){this.enabled!==!1&&(this.files[i]=e)},get:function(i){if(this.enabled!==!1)return this.files[i]},remove:function(i){delete this.files[i]},clear:function(){this.files={}}};class aE{constructor(e,t,n){const r=this;let o=!1,l=0,c=0,f;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){c++,o===!1&&r.onStart!==void 0&&r.onStart(d,l,c),o=!0},this.itemEnd=function(d){l++,r.onProgress!==void 0&&r.onProgress(d,l,c),l===c&&(o=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(d){r.onError!==void 0&&r.onError(d)},this.resolveURL=function(d){return f?f(d):d},this.setURLModifier=function(d){return f=d,this},this.addHandler=function(d,p){return u.push(d,p),this},this.removeHandler=function(d){const p=u.indexOf(d);return p!==-1&&u.splice(p,2),this},this.getHandler=function(d){for(let p=0,A=u.length;p<A;p+=2){const g=u[p],E=u[p+1];if(g.global&&(g.lastIndex=0),g.test(d))return E}return null}}}const ob=new aE;class _s{constructor(e){this.manager=e!==void 0?e:ob,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,o){n.load(e,r,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}_s.DEFAULT_MATERIAL_NAME="__DEFAULT";const Vr={};class ab extends Error{constructor(e,t){super(e),this.response=t}}class wa extends _s{constructor(e){super(e)}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=Sa.get(e);if(o!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(o),this.manager.itemEnd(e)},0),o;if(Vr[e]!==void 0){Vr[e].push({onLoad:t,onProgress:n,onError:r});return}Vr[e]=[],Vr[e].push({onLoad:t,onProgress:n,onError:r});const l=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=Vr[e],p=u.body.getReader(),A=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),g=A?parseInt(A):0,E=g!==0;let C=0;const _=new ReadableStream({start(v){S();function S(){p.read().then(({done:y,value:x})=>{if(y)v.close();else{C+=x.byteLength;const w=new ProgressEvent("progress",{lengthComputable:E,loaded:C,total:g});for(let b=0,B=d.length;b<B;b++){const L=d[b];L.onProgress&&L.onProgress(w)}v.enqueue(x),S()}})}}});return new Response(_)}else throw new ab(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(f){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,c));case"json":return u.json();default:if(c===void 0)return u.text();{const p=/charset="?([^;"\s]*)"?/i.exec(c),A=p&&p[1]?p[1].toLowerCase():void 0,g=new TextDecoder(A);return u.arrayBuffer().then(E=>g.decode(E))}}}).then(u=>{Sa.add(e,u);const d=Vr[e];delete Vr[e];for(let p=0,A=d.length;p<A;p++){const g=d[p];g.onLoad&&g.onLoad(u)}}).catch(u=>{const d=Vr[e];if(d===void 0)throw this.manager.itemError(e),u;delete Vr[e];for(let p=0,A=d.length;p<A;p++){const g=d[p];g.onError&&g.onError(u)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class lb extends _s{constructor(e){super(e)}load(e,t,n,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,l=Sa.get(e);if(l!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(l),o.manager.itemEnd(e)},0),l;const c=Ql("img");function f(){d(),Sa.add(e,this),t&&t(this),o.manager.itemEnd(e)}function u(p){d(),r&&r(p),o.manager.itemError(e),o.manager.itemEnd(e)}function d(){c.removeEventListener("load",f,!1),c.removeEventListener("error",u,!1)}return c.addEventListener("load",f,!1),c.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(c.crossOrigin=this.crossOrigin),o.manager.itemStart(e),c.src=e,c}}class cb extends _s{constructor(e){super(e)}load(e,t,n,r){const o=this,l=new _a,c=new wa(this.manager);return c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setPath(this.path),c.setWithCredentials(o.withCredentials),c.load(e,function(f){let u;try{u=o.parse(f)}catch(d){if(r!==void 0)r(d);else{console.error(d);return}}u.image!==void 0?l.image=u.image:u.data!==void 0&&(l.image.width=u.width,l.image.height=u.height,l.image.data=u.data),l.wrapS=u.wrapS!==void 0?u.wrapS:Fn,l.wrapT=u.wrapT!==void 0?u.wrapT:Fn,l.magFilter=u.magFilter!==void 0?u.magFilter:un,l.minFilter=u.minFilter!==void 0?u.minFilter:un,l.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.colorSpace!==void 0?l.colorSpace=u.colorSpace:u.encoding!==void 0&&(l.encoding=u.encoding),u.flipY!==void 0&&(l.flipY=u.flipY),u.format!==void 0&&(l.format=u.format),u.type!==void 0&&(l.type=u.type),u.mipmaps!==void 0&&(l.mipmaps=u.mipmaps,l.minFilter=Pr),u.mipmapCount===1&&(l.minFilter=un),u.generateMipmaps!==void 0&&(l.generateMipmaps=u.generateMipmaps),l.needsUpdate=!0,t&&t(l,u)},n,r),l}}class lE extends _s{constructor(e){super(e)}load(e,t,n,r){const o=new Rn,l=new lb(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(e,function(c){o.image=c,o.needsUpdate=!0,t!==void 0&&t(o)},n,r),o}}class JA extends tn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new tt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const ZA=new ct,cE=new j,uE=new j;class $A{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ke(512,512),this.map=null,this.mapPass=null,this.matrix=new ct,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new DA,this._frameExtents=new Ke(1,1),this._viewportCount=1,this._viewports=[new Gt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;cE.setFromMatrixPosition(e.matrixWorld),t.position.copy(cE),uE.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(uE),t.updateMatrixWorld(),ZA.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ZA),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(ZA)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class ub extends $A{constructor(){super(new $n(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=$o*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,o=e.distance||t.far;(n!==t.fov||r!==t.aspect||o!==t.far)&&(t.fov=n,t.aspect=r,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class fb extends JA{constructor(e,t,n=0,r=Math.PI/3,o=0,l=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(tn.DEFAULT_UP),this.updateMatrix(),this.target=new tn,this.distance=n,this.angle=r,this.penumbra=o,this.decay=l,this.map=null,this.shadow=new ub}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const fE=new ct,Zl=new j,ep=new j;class hb extends $A{constructor(){super(new $n(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ke(4,2),this._viewportCount=6,this._viewports=[new Gt(2,1,1,1),new Gt(0,1,1,1),new Gt(3,1,1,1),new Gt(1,1,1,1),new Gt(3,0,1,1),new Gt(1,0,1,1)],this._cubeDirections=[new j(1,0,0),new j(-1,0,0),new j(0,0,1),new j(0,0,-1),new j(0,1,0),new j(0,-1,0)],this._cubeUps=[new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,0,1),new j(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,o=e.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),Zl.setFromMatrixPosition(e.matrixWorld),n.position.copy(Zl),ep.copy(n.position),ep.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ep),n.updateMatrixWorld(),r.makeTranslation(-Zl.x,-Zl.y,-Zl.z),fE.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fE)}}class db extends JA{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new hb}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Ab extends $A{constructor(){super(new Yl(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class pb extends JA{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(tn.DEFAULT_UP),this.updateMatrix(),this.target=new tn,this.shadow=new Ab}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class tp{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class gb extends _s{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,l=Sa.get(e);if(l!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(l),o.manager.itemEnd(e)},0),l;const c={};c.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",c.headers=this.requestHeader,fetch(e,c).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(f){Sa.add(e,f),t&&t(f),o.manager.itemEnd(e)}).catch(function(f){r&&r(f),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}class mb{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=hE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=hE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function hE(){return(typeof performance>"u"?Date:performance).now()}const np="\\[\\]\\.:\\/",vb=new RegExp("["+np+"]","g"),ip="[^"+np+"]",_b="[^"+np.replace("\\.","")+"]",Eb=/((?:WC+[\/:])*)/.source.replace("WC",ip),yb=/(WCOD+)?/.source.replace("WCOD",_b),Cb=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ip),Ib=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ip),xb=new RegExp("^"+Eb+yb+Cb+Ib+"$"),Sb=["material","materials","bones","map"];class wb{constructor(e,t,n){const r=n||Ut.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=n.length;r!==o;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class Ut{constructor(e,t,n){this.path=t,this.parsedPath=n||Ut.parseTrackName(t),this.node=Ut.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Ut.Composite(e,t,n):new Ut(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(vb,"")}static parseTrackName(e){const t=xb.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const o=n.nodeName.substring(r+1);Sb.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(o){for(let l=0;l<o.length;l++){const c=o[l];if(c.name===t||c.uuid===t)return c;const f=n(c.children);if(f)return f}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let o=t.propertyIndex;if(e||(e=Ut.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let d=0;d<e.length;d++)if(e[d].name===u){u=d;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const l=e[r];if(l===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" but it wasn't found.",e);return}let c=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?c=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(c=this.Versioning.MatrixWorldNeedsUpdate);let f=this.BindingType.Direct;if(o!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}f=this.BindingType.ArrayElement,this.resolvedProperty=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(f=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(f=this.BindingType.EntireArray,this.resolvedProperty=l):this.propertyName=r;this.getValue=this.GetterByBindingType[f],this.setValue=this.SetterByBindingTypeAndVersioning[f][c]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ut.Composite=wb,Ut.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ut.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ut.prototype.GetterByBindingType=[Ut.prototype._getValue_direct,Ut.prototype._getValue_array,Ut.prototype._getValue_arrayElement,Ut.prototype._getValue_toArray],Ut.prototype.SetterByBindingTypeAndVersioning=[[Ut.prototype._setValue_direct,Ut.prototype._setValue_direct_setNeedsUpdate,Ut.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_array,Ut.prototype._setValue_array_setNeedsUpdate,Ut.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_arrayElement,Ut.prototype._setValue_arrayElement_setNeedsUpdate,Ut.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_fromArray,Ut.prototype._setValue_fromArray_setNeedsUpdate,Ut.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class dE{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(yn(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const AE=new j,rf=new j;class Wr{constructor(e=new j,t=new j){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){AE.subVectors(e,this.start),rf.subVectors(this.end,this.start);const n=rf.dot(rf);let o=rf.dot(AE)/n;return t&&(o=yn(o,0,1)),o}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:su}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=su);const pE={type:"change"},rp={type:"start"},gE={type:"end"},sf=new Hl,mE=new mr,Mb=Math.cos(70*AA.DEG2RAD);class Tb extends fo{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new j,this.cursor=new j,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Wo.ROTATE,MIDDLE:Wo.DOLLY,RIGHT:Wo.PAN},this.touches={ONE:jo.ROTATE,TWO:jo.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return c.phi},this.getAzimuthalAngle=function(){return c.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(q){q.addEventListener("keydown",Q),this._domElementKeyEvents=q},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Q),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(pE),n.update(),o=r.NONE},this.update=function(){const q=new j,Me=new pr().setFromUnitVectors(e.up,new j(0,1,0)),pe=Me.clone().invert(),nt=new j,je=new pr,Je=new j,Ge=2*Math.PI;return function(dt=null){const ee=n.object.position;q.copy(ee).sub(n.target),q.applyQuaternion(Me),c.setFromVector3(q),n.autoRotate&&o===r.NONE&&N(R(dt)),n.enableDamping?(c.theta+=f.theta*n.dampingFactor,c.phi+=f.phi*n.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let Te=n.minAzimuthAngle,ye=n.maxAzimuthAngle;isFinite(Te)&&isFinite(ye)&&(Te<-Math.PI?Te+=Ge:Te>Math.PI&&(Te-=Ge),ye<-Math.PI?ye+=Ge:ye>Math.PI&&(ye-=Ge),Te<=ye?c.theta=Math.max(Te,Math.min(ye,c.theta)):c.theta=c.theta>(Te+ye)/2?Math.max(Te,c.theta):Math.min(ye,c.theta)),c.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,c.phi)),c.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(d,n.dampingFactor):n.target.add(d),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor),n.zoomToCursor&&b||n.object.isOrthographicCamera?c.radius=$(c.radius):c.radius=$(c.radius*u),q.setFromSpherical(c),q.applyQuaternion(pe),ee.copy(n.target).add(q),n.object.lookAt(n.target),n.enableDamping===!0?(f.theta*=1-n.dampingFactor,f.phi*=1-n.dampingFactor,d.multiplyScalar(1-n.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let he=!1;if(n.zoomToCursor&&b){let we=null;if(n.object.isPerspectiveCamera){const qe=q.length();we=$(qe*u);const At=qe-we;n.object.position.addScaledVector(x,At),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const qe=new j(w.x,w.y,0);qe.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),he=!0;const At=new j(w.x,w.y,0);At.unproject(n.object),n.object.position.sub(At).add(qe),n.object.updateMatrixWorld(),we=q.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;we!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(we).add(n.object.position):(sf.origin.copy(n.object.position),sf.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(sf.direction))<Mb?e.lookAt(n.target):(mE.setFromNormalAndCoplanarPoint(n.object.up,n.target),sf.intersectPlane(mE,n.target))))}else n.object.isOrthographicCamera&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),he=!0);return u=1,b=!1,he||nt.distanceToSquared(n.object.position)>l||8*(1-je.dot(n.object.quaternion))>l||Je.distanceToSquared(n.target)>0?(n.dispatchEvent(pE),nt.copy(n.object.position),je.copy(n.object.quaternion),Je.copy(n.target),he=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",me),n.domElement.removeEventListener("pointerdown",Ue),n.domElement.removeEventListener("pointercancel",$e),n.domElement.removeEventListener("wheel",H),n.domElement.removeEventListener("pointermove",He),n.domElement.removeEventListener("pointerup",$e),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",Q),n._domElementKeyEvents=null)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=r.NONE;const l=1e-6,c=new dE,f=new dE;let u=1;const d=new j,p=new Ke,A=new Ke,g=new Ke,E=new Ke,C=new Ke,_=new Ke,v=new Ke,S=new Ke,y=new Ke,x=new j,w=new Ke;let b=!1;const B=[],L={};function R(q){return q!==null?2*Math.PI/60*n.autoRotateSpeed*q:2*Math.PI/60/60*n.autoRotateSpeed}function T(){return Math.pow(.95,n.zoomSpeed)}function N(q){f.theta-=q}function k(q){f.phi-=q}const O=function(){const q=new j;return function(pe,nt){q.setFromMatrixColumn(nt,0),q.multiplyScalar(-pe),d.add(q)}}(),F=function(){const q=new j;return function(pe,nt){n.screenSpacePanning===!0?q.setFromMatrixColumn(nt,1):(q.setFromMatrixColumn(nt,0),q.crossVectors(n.object.up,q)),q.multiplyScalar(pe),d.add(q)}}(),V=function(){const q=new j;return function(pe,nt){const je=n.domElement;if(n.object.isPerspectiveCamera){const Je=n.object.position;q.copy(Je).sub(n.target);let Ge=q.length();Ge*=Math.tan(n.object.fov/2*Math.PI/180),O(2*pe*Ge/je.clientHeight,n.object.matrix),F(2*nt*Ge/je.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(O(pe*(n.object.right-n.object.left)/n.object.zoom/je.clientWidth,n.object.matrix),F(nt*(n.object.top-n.object.bottom)/n.object.zoom/je.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function X(q){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u/=q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function te(q){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u*=q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function Y(q){if(!n.zoomToCursor)return;b=!0;const Me=n.domElement.getBoundingClientRect(),pe=q.clientX-Me.left,nt=q.clientY-Me.top,je=Me.width,Je=Me.height;w.x=pe/je*2-1,w.y=-(nt/Je)*2+1,x.set(w.x,w.y,1).unproject(n.object).sub(n.object.position).normalize()}function $(q){return Math.max(n.minDistance,Math.min(n.maxDistance,q))}function U(q){p.set(q.clientX,q.clientY)}function D(q){Y(q),v.set(q.clientX,q.clientY)}function G(q){E.set(q.clientX,q.clientY)}function K(q){A.set(q.clientX,q.clientY),g.subVectors(A,p).multiplyScalar(n.rotateSpeed);const Me=n.domElement;N(2*Math.PI*g.x/Me.clientHeight),k(2*Math.PI*g.y/Me.clientHeight),p.copy(A),n.update()}function J(q){S.set(q.clientX,q.clientY),y.subVectors(S,v),y.y>0?X(T()):y.y<0&&te(T()),v.copy(S),n.update()}function Ae(q){C.set(q.clientX,q.clientY),_.subVectors(C,E).multiplyScalar(n.panSpeed),V(_.x,_.y),E.copy(C),n.update()}function ge(q){Y(q),q.deltaY<0?te(T()):q.deltaY>0&&X(T()),n.update()}function be(q){let Me=!1;switch(q.code){case n.keys.UP:q.ctrlKey||q.metaKey||q.shiftKey?k(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(0,n.keyPanSpeed),Me=!0;break;case n.keys.BOTTOM:q.ctrlKey||q.metaKey||q.shiftKey?k(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(0,-n.keyPanSpeed),Me=!0;break;case n.keys.LEFT:q.ctrlKey||q.metaKey||q.shiftKey?N(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(n.keyPanSpeed,0),Me=!0;break;case n.keys.RIGHT:q.ctrlKey||q.metaKey||q.shiftKey?N(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(-n.keyPanSpeed,0),Me=!0;break}Me&&(q.preventDefault(),n.update())}function de(){if(B.length===1)p.set(B[0].pageX,B[0].pageY);else{const q=.5*(B[0].pageX+B[1].pageX),Me=.5*(B[0].pageY+B[1].pageY);p.set(q,Me)}}function Oe(){if(B.length===1)E.set(B[0].pageX,B[0].pageY);else{const q=.5*(B[0].pageX+B[1].pageX),Me=.5*(B[0].pageY+B[1].pageY);E.set(q,Me)}}function It(){const q=B[0].pageX-B[1].pageX,Me=B[0].pageY-B[1].pageY,pe=Math.sqrt(q*q+Me*Me);v.set(0,pe)}function ot(){n.enableZoom&&It(),n.enablePan&&Oe()}function oe(){n.enableZoom&&It(),n.enableRotate&&de()}function Mt(q){if(B.length==1)A.set(q.pageX,q.pageY);else{const pe=Re(q),nt=.5*(q.pageX+pe.x),je=.5*(q.pageY+pe.y);A.set(nt,je)}g.subVectors(A,p).multiplyScalar(n.rotateSpeed);const Me=n.domElement;N(2*Math.PI*g.x/Me.clientHeight),k(2*Math.PI*g.y/Me.clientHeight),p.copy(A)}function Ne(q){if(B.length===1)C.set(q.pageX,q.pageY);else{const Me=Re(q),pe=.5*(q.pageX+Me.x),nt=.5*(q.pageY+Me.y);C.set(pe,nt)}_.subVectors(C,E).multiplyScalar(n.panSpeed),V(_.x,_.y),E.copy(C)}function Ze(q){const Me=Re(q),pe=q.pageX-Me.x,nt=q.pageY-Me.y,je=Math.sqrt(pe*pe+nt*nt);S.set(0,je),y.set(0,Math.pow(S.y/v.y,n.zoomSpeed)),X(y.y),v.copy(S)}function _e(q){n.enableZoom&&Ze(q),n.enablePan&&Ne(q)}function it(q){n.enableZoom&&Ze(q),n.enableRotate&&Mt(q)}function Ue(q){n.enabled!==!1&&(B.length===0&&(n.domElement.setPointerCapture(q.pointerId),n.domElement.addEventListener("pointermove",He),n.domElement.addEventListener("pointerup",$e)),xe(q),q.pointerType==="touch"?se(q):lt(q))}function He(q){n.enabled!==!1&&(q.pointerType==="touch"?Ce(q):mt(q))}function $e(q){We(q),B.length===0&&(n.domElement.releasePointerCapture(q.pointerId),n.domElement.removeEventListener("pointermove",He),n.domElement.removeEventListener("pointerup",$e)),n.dispatchEvent(gE),o=r.NONE}function lt(q){let Me;switch(q.button){case 0:Me=n.mouseButtons.LEFT;break;case 1:Me=n.mouseButtons.MIDDLE;break;case 2:Me=n.mouseButtons.RIGHT;break;default:Me=-1}switch(Me){case Wo.DOLLY:if(n.enableZoom===!1)return;D(q),o=r.DOLLY;break;case Wo.ROTATE:if(q.ctrlKey||q.metaKey||q.shiftKey){if(n.enablePan===!1)return;G(q),o=r.PAN}else{if(n.enableRotate===!1)return;U(q),o=r.ROTATE}break;case Wo.PAN:if(q.ctrlKey||q.metaKey||q.shiftKey){if(n.enableRotate===!1)return;U(q),o=r.ROTATE}else{if(n.enablePan===!1)return;G(q),o=r.PAN}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(rp)}function mt(q){switch(o){case r.ROTATE:if(n.enableRotate===!1)return;K(q);break;case r.DOLLY:if(n.enableZoom===!1)return;J(q);break;case r.PAN:if(n.enablePan===!1)return;Ae(q);break}}function H(q){n.enabled===!1||n.enableZoom===!1||o!==r.NONE||(q.preventDefault(),n.dispatchEvent(rp),ge(q),n.dispatchEvent(gE))}function Q(q){n.enabled===!1||n.enablePan===!1||be(q)}function se(q){switch(Se(q),B.length){case 1:switch(n.touches.ONE){case jo.ROTATE:if(n.enableRotate===!1)return;de(),o=r.TOUCH_ROTATE;break;case jo.PAN:if(n.enablePan===!1)return;Oe(),o=r.TOUCH_PAN;break;default:o=r.NONE}break;case 2:switch(n.touches.TWO){case jo.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;ot(),o=r.TOUCH_DOLLY_PAN;break;case jo.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;oe(),o=r.TOUCH_DOLLY_ROTATE;break;default:o=r.NONE}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(rp)}function Ce(q){switch(Se(q),o){case r.TOUCH_ROTATE:if(n.enableRotate===!1)return;Mt(q),n.update();break;case r.TOUCH_PAN:if(n.enablePan===!1)return;Ne(q),n.update();break;case r.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;_e(q),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;it(q),n.update();break;default:o=r.NONE}}function me(q){n.enabled!==!1&&q.preventDefault()}function xe(q){B.push(q)}function We(q){delete L[q.pointerId];for(let Me=0;Me<B.length;Me++)if(B[Me].pointerId==q.pointerId){B.splice(Me,1);return}}function Se(q){let Me=L[q.pointerId];Me===void 0&&(Me=new Ke,L[q.pointerId]=Me),Me.set(q.pageX,q.pageY)}function Re(q){const Me=q.pointerId===B[0].pointerId?B[1]:B[0];return L[Me.pointerId]}n.domElement.addEventListener("contextmenu",me),n.domElement.addEventListener("pointerdown",Ue),n.domElement.addEventListener("pointercancel",$e),n.domElement.addEventListener("wheel",H,{passive:!1}),this.update()}}function vE(i,e){if(e===HM)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(e===cA||e===b1){let t=i.getIndex();if(t===null){const l=[],c=i.getAttribute("position");if(c!==void 0){for(let f=0;f<c.count;f++)l.push(f);i.setIndex(l),t=i.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const n=t.count-2,r=[];if(e===cA)for(let l=1;l<=n;l++)r.push(t.getX(0)),r.push(t.getX(l)),r.push(t.getX(l+1));else for(let l=0;l<n;l++)l%2===0?(r.push(t.getX(l)),r.push(t.getX(l+1)),r.push(t.getX(l+2))):(r.push(t.getX(l+2)),r.push(t.getX(l+1)),r.push(t.getX(l)));r.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=i.clone();return o.setIndex(r),o.clearGroups(),o}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),i}class Bb extends _s{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new Nb(t)}),this.register(function(t){return new Gb(t)}),this.register(function(t){return new Hb(t)}),this.register(function(t){return new Vb(t)}),this.register(function(t){return new Ub(t)}),this.register(function(t){return new kb(t)}),this.register(function(t){return new Fb(t)}),this.register(function(t){return new Qb(t)}),this.register(function(t){return new Db(t)}),this.register(function(t){return new Ob(t)}),this.register(function(t){return new Pb(t)}),this.register(function(t){return new zb(t)}),this.register(function(t){return new bb(t)}),this.register(function(t){return new Wb(t)}),this.register(function(t){return new jb(t)})}load(e,t,n,r){const o=this;let l;this.resourcePath!==""?l=this.resourcePath:this.path!==""?l=this.path:l=tp.extractUrlBase(e),this.manager.itemStart(e);const c=function(u){r?r(u):console.error(u),o.manager.itemError(e),o.manager.itemEnd(e)},f=new wa(this.manager);f.setPath(this.path),f.setResponseType("arraybuffer"),f.setRequestHeader(this.requestHeader),f.setWithCredentials(this.withCredentials),f.load(e,function(u){try{o.parse(u,l,function(d){t(d),o.manager.itemEnd(e)},c)}catch(d){c(d)}},n,c)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let o;const l={},c={},f=new TextDecoder;if(typeof e=="string")o=JSON.parse(e);else if(e instanceof ArrayBuffer)if(f.decode(new Uint8Array(e,0,4))===_E){try{l[wt.KHR_BINARY_GLTF]=new Yb(e)}catch(p){r&&r(p);return}o=JSON.parse(l[wt.KHR_BINARY_GLTF].content)}else o=JSON.parse(f.decode(e));else o=e;if(o.asset===void 0||o.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const u=new o5(o,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const p=this.pluginCallbacks[d](u);p.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),c[p.name]=p,l[p.name]=!0}if(o.extensionsUsed)for(let d=0;d<o.extensionsUsed.length;++d){const p=o.extensionsUsed[d],A=o.extensionsRequired||[];switch(p){case wt.KHR_MATERIALS_UNLIT:l[p]=new Lb;break;case wt.KHR_DRACO_MESH_COMPRESSION:l[p]=new qb(o,this.dracoLoader);break;case wt.KHR_TEXTURE_TRANSFORM:l[p]=new Xb;break;case wt.KHR_MESH_QUANTIZATION:l[p]=new Kb;break;default:A.indexOf(p)>=0&&c[p]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+p+'".')}}u.setExtensions(l),u.setPlugins(c),u.parse(n,r)}parseAsync(e,t){const n=this;return new Promise(function(r,o){n.parse(e,t,r,o)})}}function Rb(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class bb{constructor(e){this.parser=e,this.name=wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const o=t[n];o.extensions&&o.extensions[this.name]&&o.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,o.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const o=t.json,f=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e];let u;const d=new tt(16777215);f.color!==void 0&&d.setRGB(f.color[0],f.color[1],f.color[2],En);const p=f.range!==void 0?f.range:0;switch(f.type){case"directional":u=new pb(d),u.target.position.set(0,0,-1),u.add(u.target);break;case"point":u=new db(d),u.distance=p;break;case"spot":u=new fb(d),u.distance=p,f.spot=f.spot||{},f.spot.innerConeAngle=f.spot.innerConeAngle!==void 0?f.spot.innerConeAngle:0,f.spot.outerConeAngle=f.spot.outerConeAngle!==void 0?f.spot.outerConeAngle:Math.PI/4,u.angle=f.spot.outerConeAngle,u.penumbra=1-f.spot.innerConeAngle/f.spot.outerConeAngle,u.target.position.set(0,0,-1),u.add(u.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+f.type)}return u.position.set(0,0,0),u.decay=2,ys(u,f),f.intensity!==void 0&&(u.intensity=f.intensity),u.name=t.createUniqueName(f.name||"light_"+e),r=Promise.resolve(u),t.cache.add(n,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,o=n.json.nodes[e],c=(o.extensions&&o.extensions[this.name]||{}).light;return c===void 0?null:this._loadLight(c).then(function(f){return n._getNodeRef(t.cache,c,f)})}}class Lb{constructor(){this.name=wt.KHR_MATERIALS_UNLIT}getMaterialType(){return Gr}extendParams(e,t,n){const r=[];e.color=new tt(1,1,1),e.opacity=1;const o=t.pbrMetallicRoughness;if(o){if(Array.isArray(o.baseColorFactor)){const l=o.baseColorFactor;e.color.setRGB(l[0],l[1],l[2],En),e.opacity=l[3]}o.baseColorTexture!==void 0&&r.push(n.assignTexture(e,"map",o.baseColorTexture,Xt))}return Promise.all(r)}}class Db{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=r.extensions[this.name].emissiveStrength;return o!==void 0&&(t.emissiveIntensity=o),Promise.resolve()}}class Nb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];if(l.clearcoatFactor!==void 0&&(t.clearcoat=l.clearcoatFactor),l.clearcoatTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatMap",l.clearcoatTexture)),l.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=l.clearcoatRoughnessFactor),l.clearcoatRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatRoughnessMap",l.clearcoatRoughnessTexture)),l.clearcoatNormalTexture!==void 0&&(o.push(n.assignTexture(t,"clearcoatNormalMap",l.clearcoatNormalTexture)),l.clearcoatNormalTexture.scale!==void 0)){const c=l.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Ke(c,c)}return Promise.all(o)}}class Pb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];return l.iridescenceFactor!==void 0&&(t.iridescence=l.iridescenceFactor),l.iridescenceTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceMap",l.iridescenceTexture)),l.iridescenceIor!==void 0&&(t.iridescenceIOR=l.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),l.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=l.iridescenceThicknessMinimum),l.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=l.iridescenceThicknessMaximum),l.iridescenceThicknessTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceThicknessMap",l.iridescenceThicknessTexture)),Promise.all(o)}}class Ub{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[];t.sheenColor=new tt(0,0,0),t.sheenRoughness=0,t.sheen=1;const l=r.extensions[this.name];if(l.sheenColorFactor!==void 0){const c=l.sheenColorFactor;t.sheenColor.setRGB(c[0],c[1],c[2],En)}return l.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=l.sheenRoughnessFactor),l.sheenColorTexture!==void 0&&o.push(n.assignTexture(t,"sheenColorMap",l.sheenColorTexture,Xt)),l.sheenRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"sheenRoughnessMap",l.sheenRoughnessTexture)),Promise.all(o)}}class kb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];return l.transmissionFactor!==void 0&&(t.transmission=l.transmissionFactor),l.transmissionTexture!==void 0&&o.push(n.assignTexture(t,"transmissionMap",l.transmissionTexture)),Promise.all(o)}}class Fb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];t.thickness=l.thicknessFactor!==void 0?l.thicknessFactor:0,l.thicknessTexture!==void 0&&o.push(n.assignTexture(t,"thicknessMap",l.thicknessTexture)),t.attenuationDistance=l.attenuationDistance||1/0;const c=l.attenuationColor||[1,1,1];return t.attenuationColor=new tt().setRGB(c[0],c[1],c[2],En),Promise.all(o)}}class Qb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=r.extensions[this.name];return t.ior=o.ior!==void 0?o.ior:1.5,Promise.resolve()}}class Ob{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];t.specularIntensity=l.specularFactor!==void 0?l.specularFactor:1,l.specularTexture!==void 0&&o.push(n.assignTexture(t,"specularIntensityMap",l.specularTexture));const c=l.specularColorFactor||[1,1,1];return t.specularColor=new tt().setRGB(c[0],c[1],c[2],En),l.specularColorTexture!==void 0&&o.push(n.assignTexture(t,"specularColorMap",l.specularColorTexture,Xt)),Promise.all(o)}}class zb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];return l.anisotropyStrength!==void 0&&(t.anisotropy=l.anisotropyStrength),l.anisotropyRotation!==void 0&&(t.anisotropyRotation=l.anisotropyRotation),l.anisotropyTexture!==void 0&&o.push(n.assignTexture(t,"anisotropyMap",l.anisotropyTexture)),Promise.all(o)}}class Gb{constructor(e){this.parser=e,this.name=wt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const o=r.extensions[this.name],l=t.options.ktx2Loader;if(!l){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o.source,l)}}class Hb{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,o=r.textures[e];if(!o.extensions||!o.extensions[t])return null;const l=o.extensions[t],c=r.images[l.source];let f=n.textureLoader;if(c.uri){const u=n.options.manager.getHandler(c.uri);u!==null&&(f=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,l.source,f);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Vb{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,o=r.textures[e];if(!o.extensions||!o.extensions[t])return null;const l=o.extensions[t],c=r.images[l.source];let f=n.textureLoader;if(c.uri){const u=n.options.manager.getHandler(c.uri);u!==null&&(f=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,l.source,f);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Wb{constructor(e){this.name=wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const r=n.extensions[this.name],o=this.parser.getDependency("buffer",r.buffer),l=this.parser.options.meshoptDecoder;if(!l||!l.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(c){const f=r.byteOffset||0,u=r.byteLength||0,d=r.count,p=r.byteStride,A=new Uint8Array(c,f,u);return l.decodeGltfBufferAsync?l.decodeGltfBufferAsync(d,p,A,r.mode,r.filter).then(function(g){return g.buffer}):l.ready.then(function(){const g=new ArrayBuffer(d*p);return l.decodeGltfBuffer(new Uint8Array(g),d,p,A,r.mode,r.filter),g})})}else return null}}class jb{constructor(e){this.name=wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const r=t.meshes[n.mesh];for(const u of r.primitives)if(u.mode!==Ui.TRIANGLES&&u.mode!==Ui.TRIANGLE_STRIP&&u.mode!==Ui.TRIANGLE_FAN&&u.mode!==void 0)return null;const l=n.extensions[this.name].attributes,c=[],f={};for(const u in l)c.push(this.parser.getDependency("accessor",l[u]).then(d=>(f[u]=d,f[u])));return c.length<1?null:(c.push(this.parser.createNodeMesh(e)),Promise.all(c).then(u=>{const d=u.pop(),p=d.isGroup?d.children:[d],A=u[0].count,g=[];for(const E of p){const C=new ct,_=new j,v=new pr,S=new j(1,1,1),y=new VR(E.geometry,E.material,A);for(let x=0;x<A;x++)f.TRANSLATION&&_.fromBufferAttribute(f.TRANSLATION,x),f.ROTATION&&v.fromBufferAttribute(f.ROTATION,x),f.SCALE&&S.fromBufferAttribute(f.SCALE,x),y.setMatrixAt(x,C.compose(_,v,S));for(const x in f)if(x==="_COLOR_0"){const w=f[x];y.instanceColor=new jA(w.array,w.itemSize,w.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&E.geometry.setAttribute(x,f[x]);tn.prototype.copy.call(y,E),this.parser.assignFinalMaterial(y),g.push(y)}return d.isGroup?(d.clear(),d.add(...g),d):g[0]}))}}const _E="glTF",$l=12,EE={JSON:1313821514,BIN:5130562};class Yb{constructor(e){this.name=wt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,$l),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==_E)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-$l,o=new DataView(e,$l);let l=0;for(;l<r;){const c=o.getUint32(l,!0);l+=4;const f=o.getUint32(l,!0);if(l+=4,f===EE.JSON){const u=new Uint8Array(e,$l+l,c);this.content=n.decode(u)}else if(f===EE.BIN){const u=$l+l;this.body=e.slice(u,u+c)}l+=c}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class qb{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=wt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,o=e.extensions[this.name].bufferView,l=e.extensions[this.name].attributes,c={},f={},u={};for(const d in l){const p=op[d]||d.toLowerCase();c[p]=l[d]}for(const d in e.attributes){const p=op[d]||d.toLowerCase();if(l[d]!==void 0){const A=n.accessors[e.attributes[d]],g=Ma[A.componentType];u[p]=g.name,f[p]=A.normalized===!0}}return t.getDependency("bufferView",o).then(function(d){return new Promise(function(p){r.decodeDracoFile(d,function(A){for(const g in A.attributes){const E=A.attributes[g],C=f[g];C!==void 0&&(E.normalized=C)}p(A)},c,u)})})}}class Xb{constructor(){this.name=wt.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Kb{constructor(){this.name=wt.KHR_MESH_QUANTIZATION}}class yE extends Jl{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,o=e*r*3+r;for(let l=0;l!==r;l++)t[l]=n[o+l];return t}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=c*2,u=c*3,d=r-t,p=(n-t)/d,A=p*p,g=A*p,E=e*u,C=E-u,_=-2*g+3*A,v=g-A,S=1-_,y=v-A+p;for(let x=0;x!==c;x++){const w=l[C+x+c],b=l[C+x+f]*d,B=l[E+x+c],L=l[E+x]*d;o[x]=S*w+y*b+_*B+v*L}return o}}const Jb=new pr;class Zb extends yE{interpolate_(e,t,n,r){const o=super.interpolate_(e,t,n,r);return Jb.fromArray(o).normalize().toArray(o),o}}const Ui={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Ma={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},CE={9728:qt,9729:un,9984:Zd,9985:r1,9986:cu,9987:Pr},IE={33071:Fn,33648:lu,10497:Xo},sp={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},op={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Es={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},$b={CUBICSPLINE:void 0,LINEAR:Jo,STEP:Pl},ap={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function e5(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new KA({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ji})),i.DefaultMaterial}function Eo(i,e,t){for(const n in t.extensions)i[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function ys(i,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(i.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function t5(i,e,t){let n=!1,r=!1,o=!1;for(let u=0,d=e.length;u<d;u++){const p=e[u];if(p.POSITION!==void 0&&(n=!0),p.NORMAL!==void 0&&(r=!0),p.COLOR_0!==void 0&&(o=!0),n&&r&&o)break}if(!n&&!r&&!o)return Promise.resolve(i);const l=[],c=[],f=[];for(let u=0,d=e.length;u<d;u++){const p=e[u];if(n){const A=p.POSITION!==void 0?t.getDependency("accessor",p.POSITION):i.attributes.position;l.push(A)}if(r){const A=p.NORMAL!==void 0?t.getDependency("accessor",p.NORMAL):i.attributes.normal;c.push(A)}if(o){const A=p.COLOR_0!==void 0?t.getDependency("accessor",p.COLOR_0):i.attributes.color;f.push(A)}}return Promise.all([Promise.all(l),Promise.all(c),Promise.all(f)]).then(function(u){const d=u[0],p=u[1],A=u[2];return n&&(i.morphAttributes.position=d),r&&(i.morphAttributes.normal=p),o&&(i.morphAttributes.color=A),i.morphTargetsRelative=!0,i})}function n5(i,e){if(i.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)i.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(i.morphTargetInfluences.length===t.length){i.morphTargetDictionary={};for(let n=0,r=t.length;n<r;n++)i.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function i5(i){let e;const t=i.extensions&&i.extensions[wt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+lp(t.attributes):e=i.indices+":"+lp(i.attributes)+":"+i.mode,i.targets!==void 0)for(let n=0,r=i.targets.length;n<r;n++)e+=":"+lp(i.targets[n]);return e}function lp(i){let e="";const t=Object.keys(i).sort();for(let n=0,r=t.length;n<r;n++)e+=t[n]+":"+i[t[n]]+";";return e}function cp(i){switch(i){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function r5(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const s5=new ct;class o5{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new Rb,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=!1,o=-1;typeof navigator<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,o=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||r&&o<98?this.textureLoader=new lE(this.options.manager):this.textureLoader=new gb(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new wa(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(l){return l._markDefs&&l._markDefs()}),Promise.all(this._invokeAll(function(l){return l.beforeRoot&&l.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(l){const c={scene:l[0][r.scene||0],scenes:l[0],animations:l[1],cameras:l[2],asset:r.asset,parser:n,userData:{}};return Eo(o,c,r),ys(c,r),Promise.all(n._invokeAll(function(f){return f.afterRoot&&f.afterRoot(c)})).then(function(){e(c)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,o=t.length;r<o;r++){const l=t[r].joints;for(let c=0,f=l.length;c<f;c++)e[l[c]].isBone=!0}for(let r=0,o=e.length;r<o;r++){const l=e[r];l.mesh!==void 0&&(this._addNodeRef(this.meshCache,l.mesh),l.skin!==void 0&&(n[l.mesh].isSkinnedMesh=!0)),l.camera!==void 0&&this._addNodeRef(this.cameraCache,l.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),o=(l,c)=>{const f=this.associations.get(l);f!=null&&this.associations.set(c,f);for(const[u,d]of l.children.entries())o(d,c.children[u])};return o(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const o=e(t[r]);o&&n.push(o)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(o){return o.loadNode&&o.loadNode(t)});break;case"mesh":r=this._invokeOne(function(o){return o.loadMesh&&o.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(o){return o.loadBufferView&&o.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(o){return o.loadMaterial&&o.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(o){return o.loadTexture&&o.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(o){return o.loadAnimation&&o.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(o){return o!=this&&o.getDependency&&o.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(o,l){return n.getDependency(e,l)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[wt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(o,l){n.load(tp.resolveURL(t.uri,r.path),o,void 0,function(){l(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const r=t.byteLength||0,o=t.byteOffset||0;return n.slice(o,o+r)})}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const l=sp[r.type],c=Ma[r.componentType],f=r.normalized===!0,u=new c(r.count*l);return Promise.resolve(new bn(u,l,f))}const o=[];return r.bufferView!==void 0?o.push(this.getDependency("bufferView",r.bufferView)):o.push(null),r.sparse!==void 0&&(o.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),o.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(o).then(function(l){const c=l[0],f=sp[r.type],u=Ma[r.componentType],d=u.BYTES_PER_ELEMENT,p=d*f,A=r.byteOffset||0,g=r.bufferView!==void 0?n.bufferViews[r.bufferView].byteStride:void 0,E=r.normalized===!0;let C,_;if(g&&g!==p){const v=Math.floor(A/g),S="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+v+":"+r.count;let y=t.cache.get(S);y||(C=new u(c,v*g,r.count*g/d),y=new QR(C,g/d),t.cache.add(S,y)),_=new GA(y,f,A%g/d,E)}else c===null?C=new u(r.count*f):C=new u(c,A,r.count*f),_=new bn(C,f,E);if(r.sparse!==void 0){const v=sp.SCALAR,S=Ma[r.sparse.indices.componentType],y=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new S(l[1],y,r.sparse.count*v),b=new u(l[2],x,r.sparse.count*f);c!==null&&(_=new bn(_.array.slice(),_.itemSize,_.normalized));for(let B=0,L=w.length;B<L;B++){const R=w[B];if(_.setX(R,b[B*f]),f>=2&&_.setY(R,b[B*f+1]),f>=3&&_.setZ(R,b[B*f+2]),f>=4&&_.setW(R,b[B*f+3]),f>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return _})}loadTexture(e){const t=this.json,n=this.options,o=t.textures[e].source,l=t.images[o];let c=this.textureLoader;if(l.uri){const f=n.manager.getHandler(l.uri);f!==null&&(c=f)}return this.loadTextureImage(e,o,c)}loadTextureImage(e,t,n){const r=this,o=this.json,l=o.textures[e],c=o.images[t],f=(c.uri||c.bufferView)+":"+l.sampler;if(this.textureCache[f])return this.textureCache[f];const u=this.loadImageSource(t,n).then(function(d){d.flipY=!1,d.name=l.name||c.name||"",d.name===""&&typeof c.uri=="string"&&c.uri.startsWith("data:image/")===!1&&(d.name=c.uri);const A=(o.samplers||{})[l.sampler]||{};return d.magFilter=CE[A.magFilter]||un,d.minFilter=CE[A.minFilter]||Pr,d.wrapS=IE[A.wrapS]||Xo,d.wrapT=IE[A.wrapT]||Xo,r.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[f]=u,u}loadImageSource(e,t){const n=this,r=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(p=>p.clone());const l=r.images[e],c=self.URL||self.webkitURL;let f=l.uri||"",u=!1;if(l.bufferView!==void 0)f=n.getDependency("bufferView",l.bufferView).then(function(p){u=!0;const A=new Blob([p],{type:l.mimeType});return f=c.createObjectURL(A),f});else if(l.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(f).then(function(p){return new Promise(function(A,g){let E=A;t.isImageBitmapLoader===!0&&(E=function(C){const _=new Rn(C);_.needsUpdate=!0,A(_)}),t.load(tp.resolveURL(p,o.path),E,void 0,g)})}).then(function(p){return u===!0&&c.revokeObjectURL(f),p.userData.mimeType=l.mimeType||r5(l.uri),p}).catch(function(p){throw console.error("THREE.GLTFLoader: Couldn't load texture",f),p});return this.sourceCache[e]=d,d}assignTexture(e,t,n,r){const o=this;return this.getDependency("texture",n.index).then(function(l){if(!l)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(l=l.clone(),l.channel=n.texCoord),o.extensions[wt.KHR_TEXTURE_TRANSFORM]){const c=n.extensions!==void 0?n.extensions[wt.KHR_TEXTURE_TRANSFORM]:void 0;if(c){const f=o.associations.get(l);l=o.extensions[wt.KHR_TEXTURE_TRANSFORM].extendTexture(l,c),o.associations.set(l,f)}}return r!==void 0&&(l.colorSpace=r),e[t]=l,l})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=t.attributes.tangent===void 0,o=t.attributes.color!==void 0,l=t.attributes.normal===void 0;if(e.isPoints){const c="PointsMaterial:"+n.uuid;let f=this.cache.get(c);f||(f=new tE,gr.prototype.copy.call(f,n),f.color.copy(n.color),f.map=n.map,f.sizeAttenuation=!1,this.cache.add(c,f)),n=f}else if(e.isLine){const c="LineBasicMaterial:"+n.uuid;let f=this.cache.get(c);f||(f=new X_,gr.prototype.copy.call(f,n),f.color.copy(n.color),f.map=n.map,this.cache.add(c,f)),n=f}if(r||o||l){let c="ClonedMaterial:"+n.uuid+":";r&&(c+="derivative-tangents:"),o&&(c+="vertex-colors:"),l&&(c+="flat-shading:");let f=this.cache.get(c);f||(f=n.clone(),o&&(f.vertexColors=!0),l&&(f.flatShading=!0),r&&(f.normalScale&&(f.normalScale.y*=-1),f.clearcoatNormalScale&&(f.clearcoatNormalScale.y*=-1)),this.cache.add(c,f),this.associations.set(f,this.associations.get(n))),n=f}e.material=n}getMaterialType(){return KA}loadMaterial(e){const t=this,n=this.json,r=this.extensions,o=n.materials[e];let l;const c={},f=o.extensions||{},u=[];if(f[wt.KHR_MATERIALS_UNLIT]){const p=r[wt.KHR_MATERIALS_UNLIT];l=p.getMaterialType(),u.push(p.extendParams(c,o,t))}else{const p=o.pbrMetallicRoughness||{};if(c.color=new tt(1,1,1),c.opacity=1,Array.isArray(p.baseColorFactor)){const A=p.baseColorFactor;c.color.setRGB(A[0],A[1],A[2],En),c.opacity=A[3]}p.baseColorTexture!==void 0&&u.push(t.assignTexture(c,"map",p.baseColorTexture,Xt)),c.metalness=p.metallicFactor!==void 0?p.metallicFactor:1,c.roughness=p.roughnessFactor!==void 0?p.roughnessFactor:1,p.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(c,"metalnessMap",p.metallicRoughnessTexture)),u.push(t.assignTexture(c,"roughnessMap",p.metallicRoughnessTexture))),l=this._invokeOne(function(A){return A.getMaterialType&&A.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(A){return A.extendMaterialParams&&A.extendMaterialParams(e,c)})))}o.doubleSided===!0&&(c.side=Yi);const d=o.alphaMode||ap.OPAQUE;if(d===ap.BLEND?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,d===ap.MASK&&(c.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&l!==Gr&&(u.push(t.assignTexture(c,"normalMap",o.normalTexture)),c.normalScale=new Ke(1,1),o.normalTexture.scale!==void 0)){const p=o.normalTexture.scale;c.normalScale.set(p,p)}if(o.occlusionTexture!==void 0&&l!==Gr&&(u.push(t.assignTexture(c,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(c.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&l!==Gr){const p=o.emissiveFactor;c.emissive=new tt().setRGB(p[0],p[1],p[2],En)}return o.emissiveTexture!==void 0&&l!==Gr&&u.push(t.assignTexture(c,"emissiveMap",o.emissiveTexture,Xt)),Promise.all(u).then(function(){const p=new l(c);return o.name&&(p.name=o.name),ys(p,o),t.associations.set(p,{materials:e}),o.extensions&&Eo(r,p,o),p})}createUniqueName(e){const t=Ut.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function o(c){return n[wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c,t).then(function(f){return xE(f,c,t)})}const l=[];for(let c=0,f=e.length;c<f;c++){const u=e[c],d=i5(u),p=r[d];if(p)l.push(p.promise);else{let A;u.extensions&&u.extensions[wt.KHR_DRACO_MESH_COMPRESSION]?A=o(u):A=xE(new xi,u,t),r[d]={primitive:u,promise:A},l.push(A)}}return Promise.all(l)}loadMesh(e){const t=this,n=this.json,r=this.extensions,o=n.meshes[e],l=o.primitives,c=[];for(let f=0,u=l.length;f<u;f++){const d=l[f].material===void 0?e5(this.cache):this.getDependency("material",l[f].material);c.push(d)}return c.push(t.loadGeometries(l)),Promise.all(c).then(function(f){const u=f.slice(0,f.length-1),d=f[f.length-1],p=[];for(let g=0,E=d.length;g<E;g++){const C=d[g],_=l[g];let v;const S=u[g];if(_.mode===Ui.TRIANGLES||_.mode===Ui.TRIANGLE_STRIP||_.mode===Ui.TRIANGLE_FAN||_.mode===void 0)v=o.isSkinnedMesh===!0?new zR(C,S):new Wn(C,S),v.isSkinnedMesh===!0&&v.normalizeSkinWeights(),_.mode===Ui.TRIANGLE_STRIP?v.geometry=vE(v.geometry,b1):_.mode===Ui.TRIANGLE_FAN&&(v.geometry=vE(v.geometry,cA));else if(_.mode===Ui.LINES)v=new WR(C,S);else if(_.mode===Ui.LINE_STRIP)v=new qA(C,S);else if(_.mode===Ui.LINE_LOOP)v=new jR(C,S);else if(_.mode===Ui.POINTS)v=new YR(C,S);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(v.geometry.morphAttributes).length>0&&n5(v,o),v.name=t.createUniqueName(o.name||"mesh_"+e),ys(v,o),_.extensions&&Eo(r,v,_),t.assignFinalMaterial(v),p.push(v)}for(let g=0,E=p.length;g<E;g++)t.associations.set(p[g],{meshes:e,primitives:g});if(p.length===1)return o.extensions&&Eo(r,p[0],o),p[0];const A=new vs;o.extensions&&Eo(r,A,o),t.associations.set(A,{meshes:e});for(let g=0,E=p.length;g<E;g++)A.add(p[g]);return A})}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new $n(AA.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type==="orthographic"&&(t=new Yl(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),ys(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let r=0,o=t.joints.length;r<o;r++)n.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(r){const o=r.pop(),l=r,c=[],f=[];for(let u=0,d=l.length;u<d;u++){const p=l[u];if(p){c.push(p);const A=new ct;o!==null&&A.fromArray(o.array,u*16),f.push(A)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new WA(c,f)})}loadAnimation(e){const t=this.json,n=this,r=t.animations[e],o=r.name?r.name:"animation_"+e,l=[],c=[],f=[],u=[],d=[];for(let p=0,A=r.channels.length;p<A;p++){const g=r.channels[p],E=r.samplers[g.sampler],C=g.target,_=C.node,v=r.parameters!==void 0?r.parameters[E.input]:E.input,S=r.parameters!==void 0?r.parameters[E.output]:E.output;C.node!==void 0&&(l.push(this.getDependency("node",_)),c.push(this.getDependency("accessor",v)),f.push(this.getDependency("accessor",S)),u.push(E),d.push(C))}return Promise.all([Promise.all(l),Promise.all(c),Promise.all(f),Promise.all(u),Promise.all(d)]).then(function(p){const A=p[0],g=p[1],E=p[2],C=p[3],_=p[4],v=[];for(let S=0,y=A.length;S<y;S++){const x=A[S],w=g[S],b=E[S],B=C[S],L=_[S];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const R=n._createAnimationTracks(x,w,b,B,L);if(R)for(let T=0;T<R.length;T++)v.push(R[T])}return new ib(o,void 0,v)})}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return r.mesh===void 0?null:n.getDependency("mesh",r.mesh).then(function(o){const l=n._getNodeRef(n.meshCache,r.mesh,o);return r.weights!==void 0&&l.traverse(function(c){if(c.isMesh)for(let f=0,u=r.weights.length;f<u;f++)c.morphTargetInfluences[f]=r.weights[f]}),l})}loadNode(e){const t=this.json,n=this,r=t.nodes[e],o=n._loadNodeShallow(e),l=[],c=r.children||[];for(let u=0,d=c.length;u<d;u++)l.push(n.getDependency("node",c[u]));const f=r.skin===void 0?Promise.resolve(null):n.getDependency("skin",r.skin);return Promise.all([o,Promise.all(l),f]).then(function(u){const d=u[0],p=u[1],A=u[2];A!==null&&d.traverse(function(g){g.isSkinnedMesh&&g.bind(A,s5)});for(let g=0,E=p.length;g<E;g++)d.add(p[g]);return d})}_loadNodeShallow(e){const t=this.json,n=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const o=t.nodes[e],l=o.name?r.createUniqueName(o.name):"",c=[],f=r._invokeOne(function(u){return u.createNodeMesh&&u.createNodeMesh(e)});return f&&c.push(f),o.camera!==void 0&&c.push(r.getDependency("camera",o.camera).then(function(u){return r._getNodeRef(r.cameraCache,o.camera,u)})),r._invokeAll(function(u){return u.createNodeAttachment&&u.createNodeAttachment(e)}).forEach(function(u){c.push(u)}),this.nodeCache[e]=Promise.all(c).then(function(u){let d;if(o.isBone===!0?d=new W_:u.length>1?d=new vs:u.length===1?d=u[0]:d=new tn,d!==u[0])for(let p=0,A=u.length;p<A;p++)d.add(u[p]);if(o.name&&(d.userData.name=o.name,d.name=l),ys(d,o),o.extensions&&Eo(n,d,o),o.matrix!==void 0){const p=new ct;p.fromArray(o.matrix),d.applyMatrix4(p)}else o.translation!==void 0&&d.position.fromArray(o.translation),o.rotation!==void 0&&d.quaternion.fromArray(o.rotation),o.scale!==void 0&&d.scale.fromArray(o.scale);return r.associations.has(d)||r.associations.set(d,{}),r.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,o=new vs;n.name&&(o.name=r.createUniqueName(n.name)),ys(o,n),n.extensions&&Eo(t,o,n);const l=n.nodes||[],c=[];for(let f=0,u=l.length;f<u;f++)c.push(r.getDependency("node",l[f]));return Promise.all(c).then(function(f){for(let d=0,p=f.length;d<p;d++)o.add(f[d]);const u=d=>{const p=new Map;for(const[A,g]of r.associations)(A instanceof gr||A instanceof Rn)&&p.set(A,g);return d.traverse(A=>{const g=r.associations.get(A);g!=null&&p.set(A,g)}),p};return r.associations=u(o),o})}_createAnimationTracks(e,t,n,r,o){const l=[],c=e.name?e.name:e.uuid,f=[];Es[o.path]===Es.weights?e.traverse(function(A){A.morphTargetInfluences&&f.push(A.name?A.name:A.uuid)}):f.push(c);let u;switch(Es[o.path]){case Es.weights:u=Ca;break;case Es.rotation:u=_o;break;case Es.position:case Es.scale:u=xa;break;default:switch(n.itemSize){case 1:u=Ca;break;case 2:case 3:default:u=xa;break}break}const d=r.interpolation!==void 0?$b[r.interpolation]:Jo,p=this._getArrayFromAccessor(n);for(let A=0,g=f.length;A<g;A++){const E=new u(f[A]+"."+Es[o.path],t.array,p,d);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(E),l.push(E)}return l}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=cp(t.constructor),r=new Float32Array(t.length);for(let o=0,l=t.length;o<l;o++)r[o]=t[o]*n;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const r=this instanceof _o?Zb:yE;return new r(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function a5(i,e,t){const n=e.attributes,r=new gn;if(n.POSITION!==void 0){const c=t.json.accessors[n.POSITION],f=c.min,u=c.max;if(f!==void 0&&u!==void 0){if(r.set(new j(f[0],f[1],f[2]),new j(u[0],u[1],u[2])),c.normalized){const d=cp(Ma[c.componentType]);r.min.multiplyScalar(d),r.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const o=e.targets;if(o!==void 0){const c=new j,f=new j;for(let u=0,d=o.length;u<d;u++){const p=o[u];if(p.POSITION!==void 0){const A=t.json.accessors[p.POSITION],g=A.min,E=A.max;if(g!==void 0&&E!==void 0){if(f.setX(Math.max(Math.abs(g[0]),Math.abs(E[0]))),f.setY(Math.max(Math.abs(g[1]),Math.abs(E[1]))),f.setZ(Math.max(Math.abs(g[2]),Math.abs(E[2]))),A.normalized){const C=cp(Ma[A.componentType]);f.multiplyScalar(C)}c.max(f)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(c)}i.boundingBox=r;const l=new Ji;r.getCenter(l.center),l.radius=r.min.distanceTo(r.max)/2,i.boundingSphere=l}function xE(i,e,t){const n=e.attributes,r=[];function o(l,c){return t.getDependency("accessor",l).then(function(f){i.setAttribute(c,f)})}for(const l in n){const c=op[l]||l.toLowerCase();c in i.attributes||r.push(o(n[l],c))}if(e.indices!==void 0&&!i.index){const l=t.getDependency("accessor",e.indices).then(function(c){i.setIndex(c)});r.push(l)}return Nt.workingColorSpace!==En&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Nt.workingColorSpace}" not supported.`),ys(i,e),a5(i,e,t),Promise.all(r).then(function(){return e.targets!==void 0?t5(i,e.targets,t):i})}class l5{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:r,msg:o,transfer:l}=this.queue.shift();this.workersResolve[e]=r,this.workers[e].postMessage(o,l)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(n=>{const r=this._getIdleWorker();r!==-1?(this._initWorker(r),this.workerStatus|=1<<r,this.workersResolve[r]=n,this.workers[r].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const c5=0,SE=2,u5=1,wE=2,f5=0,h5=1,d5=10,A5=0,ME=9,TE=15,BE=16,RE=22,bE=37,LE=43,DE=76,NE=83,PE=97,UE=100,kE=103,FE=109,QE=165,OE=166;class p5{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class ec{constructor(e,t,n,r){this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=r,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==t&&r<e;)r++,this._offset++;return r<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}const ti=[171,75,84,88,32,50,48,187,13,10,26,10];function zE(i){return typeof TextDecoder<"u"?new TextDecoder().decode(i):Buffer.from(i).toString("utf8")}function g5(i){const e=new Uint8Array(i.buffer,i.byteOffset,ti.length);if(e[0]!==ti[0]||e[1]!==ti[1]||e[2]!==ti[2]||e[3]!==ti[3]||e[4]!==ti[4]||e[5]!==ti[5]||e[6]!==ti[6]||e[7]!==ti[7]||e[8]!==ti[8]||e[9]!==ti[9]||e[10]!==ti[10]||e[11]!==ti[11])throw new Error("Missing KTX 2.0 identifier.");const t=new p5,n=17*Uint32Array.BYTES_PER_ELEMENT,r=new ec(i,ti.length,n,!0);t.vkFormat=r._nextUint32(),t.typeSize=r._nextUint32(),t.pixelWidth=r._nextUint32(),t.pixelHeight=r._nextUint32(),t.pixelDepth=r._nextUint32(),t.layerCount=r._nextUint32(),t.faceCount=r._nextUint32();const o=r._nextUint32();t.supercompressionScheme=r._nextUint32();const l=r._nextUint32(),c=r._nextUint32(),f=r._nextUint32(),u=r._nextUint32(),d=r._nextUint64(),p=r._nextUint64(),A=new ec(i,ti.length+n,3*o*8,!0);for(let te=0;te<o;te++)t.levels.push({levelData:new Uint8Array(i.buffer,i.byteOffset+A._nextUint64(),A._nextUint64()),uncompressedByteLength:A._nextUint64()});const g=new ec(i,l,c,!0),E={vendorId:g._skip(4)._nextUint16(),descriptorType:g._nextUint16(),versionNumber:g._nextUint16(),descriptorBlockSize:g._nextUint16(),colorModel:g._nextUint8(),colorPrimaries:g._nextUint8(),transferFunction:g._nextUint8(),flags:g._nextUint8(),texelBlockDimension:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],bytesPlane:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],samples:[]},C=(E.descriptorBlockSize/4-6)/4;for(let te=0;te<C;te++){const Y={bitOffset:g._nextUint16(),bitLength:g._nextUint8(),channelType:g._nextUint8(),samplePosition:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&Y.channelType?(Y.sampleLower=g._nextInt32(),Y.sampleUpper=g._nextInt32()):(Y.sampleLower=g._nextUint32(),Y.sampleUpper=g._nextUint32()),E.samples[te]=Y}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(E);const _=new ec(i,f,u,!0);for(;_._offset<u;){const te=_._nextUint32(),Y=_._scan(te),$=zE(Y),U=_._scan(te-Y.byteLength);t.keyValue[$]=$.match(/^ktx/i)?zE(U):U,_._offset%4&&_._skip(4-_._offset%4)}if(p<=0)return t;const v=new ec(i,d,p,!0),S=v._nextUint16(),y=v._nextUint16(),x=v._nextUint32(),w=v._nextUint32(),b=v._nextUint32(),B=v._nextUint32(),L=[];for(let te=0;te<o;te++)L.push({imageFlags:v._nextUint32(),rgbSliceByteOffset:v._nextUint32(),rgbSliceByteLength:v._nextUint32(),alphaSliceByteOffset:v._nextUint32(),alphaSliceByteLength:v._nextUint32()});const R=d+v._offset,T=R+x,N=T+w,k=N+b,O=new Uint8Array(i.buffer,i.byteOffset+R,x),F=new Uint8Array(i.buffer,i.byteOffset+T,w),V=new Uint8Array(i.buffer,i.byteOffset+N,b),X=new Uint8Array(i.buffer,i.byteOffset+k,B);return t.globalData={endpointCount:S,selectorCount:y,imageDescs:L,endpointsData:O,selectorsData:F,tablesData:V,extendedData:X},t}let up,jr,fp;const hp={env:{emscripten_notify_memory_growth:function(i){fp=new Uint8Array(jr.exports.memory.buffer)}}};class m5{init(){return up||(up=typeof fetch<"u"?fetch("data:application/wasm;base64,"+GE).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,hp)).then(this._init):WebAssembly.instantiate(Buffer.from(GE,"base64"),hp).then(this._init),up)}_init(e){jr=e.instance,hp.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!jr)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,r=jr.exports.malloc(n);fp.set(e,r),t=t||Number(jr.exports.ZSTD_findDecompressedSize(r,n));const o=jr.exports.malloc(t),l=jr.exports.ZSTD_decompress(o,t,r,n),c=fp.slice(o,o+l);return jr.exports.free(r),jr.exports.free(o),c}}const GE="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LI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3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIA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QEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4Li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mpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiA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MAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMg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AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",dp=new WeakMap;let Ap=0,pp;class yr extends _s{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new l5,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},e.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}init(){if(!this.transcoderPending){const e=new wa(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new wa(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const r=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,r]).then(([o,l])=>{const c=yr.BasisWorker.toString(),f=["/* constants */","let _EngineFormat = "+JSON.stringify(yr.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(yr.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(yr.BasisFormat),"/* basis_transcoder.js */",o,"/* worker */",c.substring(c.indexOf("{")+1,c.lastIndexOf("}"))].join(`
3620
+ }`;function MR(i,e,t){let n=new DA;const r=new Ke,o=new Ke,l=new Gt,c=new F_({depthPacking:WM}),f=new xR,u={},d=t.maxTextureSize,p={[ji]:Bn,[Bn]:ji,[Yi]:Yi},A=new Si({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ke},radius:{value:4}},vertexShader:SR,fragmentShader:wR}),g=A.clone();g.defines.HORIZONTAL_PASS=1;const E=new xi;E.setAttribute("position",new bn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const C=new Wn(E,A),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=jv;let v=this.type;this.render=function(w,b,B){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||w.length===0)return;const L=i.getRenderTarget(),R=i.getActiveCubeFace(),T=i.getActiveMipmapLevel(),N=i.state;N.setBlending(Nr),N.buffers.color.setClear(1,1,1,1),N.buffers.depth.setTest(!0),N.setScissorTest(!1);const k=v!==Dr&&this.type===Dr,O=v===Dr&&this.type!==Dr;for(let F=0,V=w.length;F<V;F++){const X=w[F],te=X.shadow;if(te===void 0){console.warn("THREE.WebGLShadowMap:",X,"has no shadow.");continue}if(te.autoUpdate===!1&&te.needsUpdate===!1)continue;r.copy(te.mapSize);const Y=te.getFrameExtents();if(r.multiply(Y),o.copy(te.mapSize),(r.x>d||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/Y.x),r.x=o.x*Y.x,te.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/Y.y),r.y=o.y*Y.y,te.mapSize.y=o.y)),te.map===null||k===!0||O===!0){const U=this.type!==Dr?{minFilter:qt,magFilter:qt}:{};te.map!==null&&te.map.dispose(),te.map=new Xi(r.x,r.y,U),te.map.texture.name=X.name+".shadowMap",te.camera.updateProjectionMatrix()}i.setRenderTarget(te.map),i.clear();const $=te.getViewportCount();for(let U=0;U<$;U++){const D=te.getViewport(U);l.set(o.x*D.x,o.y*D.y,o.x*D.z,o.y*D.w),N.viewport(l),te.updateMatrices(X,U),n=te.getFrustum(),x(b,B,te.camera,X,this.type)}te.isPointLightShadow!==!0&&this.type===Dr&&S(te,B),te.needsUpdate=!1}v=this.type,_.needsUpdate=!1,i.setRenderTarget(L,R,T)};function S(w,b){const B=e.update(C);A.defines.VSM_SAMPLES!==w.blurSamples&&(A.defines.VSM_SAMPLES=w.blurSamples,g.defines.VSM_SAMPLES=w.blurSamples,A.needsUpdate=!0,g.needsUpdate=!0),w.mapPass===null&&(w.mapPass=new Xi(r.x,r.y)),A.uniforms.shadow_pass.value=w.map.texture,A.uniforms.resolution.value=w.mapSize,A.uniforms.radius.value=w.radius,i.setRenderTarget(w.mapPass),i.clear(),i.renderBufferDirect(b,null,B,A,C,null),g.uniforms.shadow_pass.value=w.mapPass.texture,g.uniforms.resolution.value=w.mapSize,g.uniforms.radius.value=w.radius,i.setRenderTarget(w.map),i.clear(),i.renderBufferDirect(b,null,B,g,C,null)}function y(w,b,B,L){let R=null;const T=B.isPointLight===!0?w.customDistanceMaterial:w.customDepthMaterial;if(T!==void 0)R=T;else if(R=B.isPointLight===!0?f:c,i.localClippingEnabled&&b.clipShadows===!0&&Array.isArray(b.clippingPlanes)&&b.clippingPlanes.length!==0||b.displacementMap&&b.displacementScale!==0||b.alphaMap&&b.alphaTest>0||b.map&&b.alphaTest>0){const N=R.uuid,k=b.uuid;let O=u[N];O===void 0&&(O={},u[N]=O);let F=O[k];F===void 0&&(F=R.clone(),O[k]=F),R=F}if(R.visible=b.visible,R.wireframe=b.wireframe,L===Dr?R.side=b.shadowSide!==null?b.shadowSide:b.side:R.side=b.shadowSide!==null?b.shadowSide:p[b.side],R.alphaMap=b.alphaMap,R.alphaTest=b.alphaTest,R.map=b.map,R.clipShadows=b.clipShadows,R.clippingPlanes=b.clippingPlanes,R.clipIntersection=b.clipIntersection,R.displacementMap=b.displacementMap,R.displacementScale=b.displacementScale,R.displacementBias=b.displacementBias,R.wireframeLinewidth=b.wireframeLinewidth,R.linewidth=b.linewidth,B.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const N=i.properties.get(R);N.light=B}return R}function x(w,b,B,L,R){if(w.visible===!1)return;if(w.layers.test(b.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&R===Dr)&&(!w.frustumCulled||n.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,w.matrixWorld);const k=e.update(w),O=w.material;if(Array.isArray(O)){const F=k.groups;for(let V=0,X=F.length;V<X;V++){const te=F[V],Y=O[te.materialIndex];if(Y&&Y.visible){const $=y(w,Y,L,R);i.renderBufferDirect(B,null,k,$,w,te)}}}else if(O.visible){const F=y(w,O,L,R);i.renderBufferDirect(B,null,k,F,w,null)}}const N=w.children;for(let k=0,O=N.length;k<O;k++)x(N[k],b,B,L,R)}}function TR(i,e,t){const n=t.isWebGL2;function r(){let ee=!1;const Te=new Gt;let ye=null;const he=new Gt(0,0,0,0);return{setMask:function(we){ye!==we&&!ee&&(i.colorMask(we,we,we,we),ye=we)},setLocked:function(we){ee=we},setClear:function(we,qe,pt,Wt,Dn){Dn===!0&&(we*=Wt,qe*=Wt,pt*=Wt),Te.set(we,qe,pt,Wt),he.equals(Te)===!1&&(i.clearColor(we,qe,pt,Wt),he.copy(Te))},reset:function(){ee=!1,ye=null,he.set(-1,0,0,0)}}}function o(){let ee=!1,Te=null,ye=null,he=null;return{setTest:function(we){we?Oe(i.DEPTH_TEST):It(i.DEPTH_TEST)},setMask:function(we){Te!==we&&!ee&&(i.depthMask(we),Te=we)},setFunc:function(we){if(ye!==we){switch(we){case MM:i.depthFunc(i.NEVER);break;case TM:i.depthFunc(i.ALWAYS);break;case BM:i.depthFunc(i.LESS);break;case ou:i.depthFunc(i.LEQUAL);break;case RM:i.depthFunc(i.EQUAL);break;case bM:i.depthFunc(i.GEQUAL);break;case LM:i.depthFunc(i.GREATER);break;case DM:i.depthFunc(i.NOTEQUAL);break;default:i.depthFunc(i.LEQUAL)}ye=we}},setLocked:function(we){ee=we},setClear:function(we){he!==we&&(i.clearDepth(we),he=we)},reset:function(){ee=!1,Te=null,ye=null,he=null}}}function l(){let ee=!1,Te=null,ye=null,he=null,we=null,qe=null,pt=null,Wt=null,Dn=null;return{setTest:function(Tt){ee||(Tt?Oe(i.STENCIL_TEST):It(i.STENCIL_TEST))},setMask:function(Tt){Te!==Tt&&!ee&&(i.stencilMask(Tt),Te=Tt)},setFunc:function(Tt,an,Pt){(ye!==Tt||he!==an||we!==Pt)&&(i.stencilFunc(Tt,an,Pt),ye=Tt,he=an,we=Pt)},setOp:function(Tt,an,Pt){(qe!==Tt||pt!==an||Wt!==Pt)&&(i.stencilOp(Tt,an,Pt),qe=Tt,pt=an,Wt=Pt)},setLocked:function(Tt){ee=Tt},setClear:function(Tt){Dn!==Tt&&(i.clearStencil(Tt),Dn=Tt)},reset:function(){ee=!1,Te=null,ye=null,he=null,we=null,qe=null,pt=null,Wt=null,Dn=null}}}const c=new r,f=new o,u=new l,d=new WeakMap,p=new WeakMap;let A={},g={},E=new WeakMap,C=[],_=null,v=!1,S=null,y=null,x=null,w=null,b=null,B=null,L=null,R=new tt(0,0,0),T=0,N=!1,k=null,O=null,F=null,V=null,X=null;const te=i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let Y=!1,$=0;const U=i.getParameter(i.VERSION);U.indexOf("WebGL")!==-1?($=parseFloat(/^WebGL (\d)/.exec(U)[1]),Y=$>=1):U.indexOf("OpenGL ES")!==-1&&($=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),Y=$>=2);let D=null,G={};const K=i.getParameter(i.SCISSOR_BOX),J=i.getParameter(i.VIEWPORT),Ae=new Gt().fromArray(K),ge=new Gt().fromArray(J);function be(ee,Te,ye,he){const we=new Uint8Array(4),qe=i.createTexture();i.bindTexture(ee,qe),i.texParameteri(ee,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(ee,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let pt=0;pt<ye;pt++)n&&(ee===i.TEXTURE_3D||ee===i.TEXTURE_2D_ARRAY)?i.texImage3D(Te,0,i.RGBA,1,1,he,0,i.RGBA,i.UNSIGNED_BYTE,we):i.texImage2D(Te+pt,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,we);return qe}const de={};de[i.TEXTURE_2D]=be(i.TEXTURE_2D,i.TEXTURE_2D,1),de[i.TEXTURE_CUBE_MAP]=be(i.TEXTURE_CUBE_MAP,i.TEXTURE_CUBE_MAP_POSITIVE_X,6),n&&(de[i.TEXTURE_2D_ARRAY]=be(i.TEXTURE_2D_ARRAY,i.TEXTURE_2D_ARRAY,1,1),de[i.TEXTURE_3D]=be(i.TEXTURE_3D,i.TEXTURE_3D,1,1)),c.setClear(0,0,0,1),f.setClear(1),u.setClear(0),Oe(i.DEPTH_TEST),f.setFunc(ou),Ue(!1),He(Wv),Oe(i.CULL_FACE),_e(Nr);function Oe(ee){A[ee]!==!0&&(i.enable(ee),A[ee]=!0)}function It(ee){A[ee]!==!1&&(i.disable(ee),A[ee]=!1)}function ot(ee,Te){return g[ee]!==Te?(i.bindFramebuffer(ee,Te),g[ee]=Te,n&&(ee===i.DRAW_FRAMEBUFFER&&(g[i.FRAMEBUFFER]=Te),ee===i.FRAMEBUFFER&&(g[i.DRAW_FRAMEBUFFER]=Te)),!0):!1}function oe(ee,Te){let ye=C,he=!1;if(ee)if(ye=E.get(Te),ye===void 0&&(ye=[],E.set(Te,ye)),ee.isWebGLMultipleRenderTargets){const we=ee.texture;if(ye.length!==we.length||ye[0]!==i.COLOR_ATTACHMENT0){for(let qe=0,pt=we.length;qe<pt;qe++)ye[qe]=i.COLOR_ATTACHMENT0+qe;ye.length=we.length,he=!0}}else ye[0]!==i.COLOR_ATTACHMENT0&&(ye[0]=i.COLOR_ATTACHMENT0,he=!0);else ye[0]!==i.BACK&&(ye[0]=i.BACK,he=!0);he&&(t.isWebGL2?i.drawBuffers(ye):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(ye))}function Mt(ee){return _!==ee?(i.useProgram(ee),_=ee,!0):!1}const Ne={[ro]:i.FUNC_ADD,[hM]:i.FUNC_SUBTRACT,[dM]:i.FUNC_REVERSE_SUBTRACT};if(n)Ne[Kv]=i.MIN,Ne[Jv]=i.MAX;else{const ee=e.get("EXT_blend_minmax");ee!==null&&(Ne[Kv]=ee.MIN_EXT,Ne[Jv]=ee.MAX_EXT)}const Ze={[AM]:i.ZERO,[pM]:i.ONE,[gM]:i.SRC_COLOR,[qd]:i.SRC_ALPHA,[CM]:i.SRC_ALPHA_SATURATE,[EM]:i.DST_COLOR,[vM]:i.DST_ALPHA,[mM]:i.ONE_MINUS_SRC_COLOR,[Xd]:i.ONE_MINUS_SRC_ALPHA,[yM]:i.ONE_MINUS_DST_COLOR,[_M]:i.ONE_MINUS_DST_ALPHA,[IM]:i.CONSTANT_COLOR,[xM]:i.ONE_MINUS_CONSTANT_COLOR,[SM]:i.CONSTANT_ALPHA,[wM]:i.ONE_MINUS_CONSTANT_ALPHA};function _e(ee,Te,ye,he,we,qe,pt,Wt,Dn,Tt){if(ee===Nr){v===!0&&(It(i.BLEND),v=!1);return}if(v===!1&&(Oe(i.BLEND),v=!0),ee!==fM){if(ee!==S||Tt!==N){if((y!==ro||b!==ro)&&(i.blendEquation(i.FUNC_ADD),y=ro,b=ro),Tt)switch(ee){case Yo:i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case Yv:i.blendFunc(i.ONE,i.ONE);break;case qv:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Xv:i.blendFuncSeparate(i.ZERO,i.SRC_COLOR,i.ZERO,i.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",ee);break}else switch(ee){case Yo:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case Yv:i.blendFunc(i.SRC_ALPHA,i.ONE);break;case qv:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case Xv:i.blendFunc(i.ZERO,i.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",ee);break}x=null,w=null,B=null,L=null,R.set(0,0,0),T=0,S=ee,N=Tt}return}we=we||Te,qe=qe||ye,pt=pt||he,(Te!==y||we!==b)&&(i.blendEquationSeparate(Ne[Te],Ne[we]),y=Te,b=we),(ye!==x||he!==w||qe!==B||pt!==L)&&(i.blendFuncSeparate(Ze[ye],Ze[he],Ze[qe],Ze[pt]),x=ye,w=he,B=qe,L=pt),(Wt.equals(R)===!1||Dn!==T)&&(i.blendColor(Wt.r,Wt.g,Wt.b,Dn),R.copy(Wt),T=Dn),S=ee,N=!1}function it(ee,Te){ee.side===Yi?It(i.CULL_FACE):Oe(i.CULL_FACE);let ye=ee.side===Bn;Te&&(ye=!ye),Ue(ye),ee.blending===Yo&&ee.transparent===!1?_e(Nr):_e(ee.blending,ee.blendEquation,ee.blendSrc,ee.blendDst,ee.blendEquationAlpha,ee.blendSrcAlpha,ee.blendDstAlpha,ee.blendColor,ee.blendAlpha,ee.premultipliedAlpha),f.setFunc(ee.depthFunc),f.setTest(ee.depthTest),f.setMask(ee.depthWrite),c.setMask(ee.colorWrite);const he=ee.stencilWrite;u.setTest(he),he&&(u.setMask(ee.stencilWriteMask),u.setFunc(ee.stencilFunc,ee.stencilRef,ee.stencilFuncMask),u.setOp(ee.stencilFail,ee.stencilZFail,ee.stencilZPass)),at(ee.polygonOffset,ee.polygonOffsetFactor,ee.polygonOffsetUnits),ee.alphaToCoverage===!0?Oe(i.SAMPLE_ALPHA_TO_COVERAGE):It(i.SAMPLE_ALPHA_TO_COVERAGE)}function Ue(ee){k!==ee&&(ee?i.frontFace(i.CW):i.frontFace(i.CCW),k=ee)}function He(ee){ee!==lM?(Oe(i.CULL_FACE),ee!==O&&(ee===Wv?i.cullFace(i.BACK):ee===cM?i.cullFace(i.FRONT):i.cullFace(i.FRONT_AND_BACK))):It(i.CULL_FACE),O=ee}function $e(ee){ee!==F&&(Y&&i.lineWidth(ee),F=ee)}function at(ee,Te,ye){ee?(Oe(i.POLYGON_OFFSET_FILL),(V!==Te||X!==ye)&&(i.polygonOffset(Te,ye),V=Te,X=ye)):It(i.POLYGON_OFFSET_FILL)}function At(ee){ee?Oe(i.SCISSOR_TEST):It(i.SCISSOR_TEST)}function H(ee){ee===void 0&&(ee=i.TEXTURE0+te-1),D!==ee&&(i.activeTexture(ee),D=ee)}function Q(ee,Te,ye){ye===void 0&&(D===null?ye=i.TEXTURE0+te-1:ye=D);let he=G[ye];he===void 0&&(he={type:void 0,texture:void 0},G[ye]=he),(he.type!==ee||he.texture!==Te)&&(D!==ye&&(i.activeTexture(ye),D=ye),i.bindTexture(ee,Te||de[ee]),he.type=ee,he.texture=Te)}function se(){const ee=G[D];ee!==void 0&&ee.type!==void 0&&(i.bindTexture(ee.type,null),ee.type=void 0,ee.texture=void 0)}function Ce(){try{i.compressedTexImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function me(){try{i.compressedTexImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function xe(){try{i.texSubImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function We(){try{i.texSubImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Se(){try{i.compressedTexSubImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Re(){try{i.compressedTexSubImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function q(){try{i.texStorage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function Me(){try{i.texStorage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function pe(){try{i.texImage2D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function nt(){try{i.texImage3D.apply(i,arguments)}catch(ee){console.error("THREE.WebGLState:",ee)}}function je(ee){Ae.equals(ee)===!1&&(i.scissor(ee.x,ee.y,ee.z,ee.w),Ae.copy(ee))}function Je(ee){ge.equals(ee)===!1&&(i.viewport(ee.x,ee.y,ee.z,ee.w),ge.copy(ee))}function Ge(ee,Te){let ye=p.get(Te);ye===void 0&&(ye=new WeakMap,p.set(Te,ye));let he=ye.get(ee);he===void 0&&(he=i.getUniformBlockIndex(Te,ee.name),ye.set(ee,he))}function Pe(ee,Te){const he=p.get(Te).get(ee);d.get(Te)!==he&&(i.uniformBlockBinding(Te,he,ee.__bindingPointIndex),d.set(Te,he))}function dt(){i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.DEPTH_TEST),i.disable(i.POLYGON_OFFSET_FILL),i.disable(i.SCISSOR_TEST),i.disable(i.STENCIL_TEST),i.disable(i.SAMPLE_ALPHA_TO_COVERAGE),i.blendEquation(i.FUNC_ADD),i.blendFunc(i.ONE,i.ZERO),i.blendFuncSeparate(i.ONE,i.ZERO,i.ONE,i.ZERO),i.blendColor(0,0,0,0),i.colorMask(!0,!0,!0,!0),i.clearColor(0,0,0,0),i.depthMask(!0),i.depthFunc(i.LESS),i.clearDepth(1),i.stencilMask(4294967295),i.stencilFunc(i.ALWAYS,0,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),i.clearStencil(0),i.cullFace(i.BACK),i.frontFace(i.CCW),i.polygonOffset(0,0),i.activeTexture(i.TEXTURE0),i.bindFramebuffer(i.FRAMEBUFFER,null),n===!0&&(i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),i.bindFramebuffer(i.READ_FRAMEBUFFER,null)),i.useProgram(null),i.lineWidth(1),i.scissor(0,0,i.canvas.width,i.canvas.height),i.viewport(0,0,i.canvas.width,i.canvas.height),A={},D=null,G={},g={},E=new WeakMap,C=[],_=null,v=!1,S=null,y=null,x=null,w=null,b=null,B=null,L=null,R=new tt(0,0,0),T=0,N=!1,k=null,O=null,F=null,V=null,X=null,Ae.set(0,0,i.canvas.width,i.canvas.height),ge.set(0,0,i.canvas.width,i.canvas.height),c.reset(),f.reset(),u.reset()}return{buffers:{color:c,depth:f,stencil:u},enable:Oe,disable:It,bindFramebuffer:ot,drawBuffers:oe,useProgram:Mt,setBlending:_e,setMaterial:it,setFlipSided:Ue,setCullFace:He,setLineWidth:$e,setPolygonOffset:at,setScissorTest:At,activeTexture:H,bindTexture:Q,unbindTexture:se,compressedTexImage2D:Ce,compressedTexImage3D:me,texImage2D:pe,texImage3D:nt,updateUBOMapping:Ge,uniformBlockBinding:Pe,texStorage2D:q,texStorage3D:Me,texSubImage2D:xe,texSubImage3D:We,compressedTexSubImage2D:Se,compressedTexSubImage3D:Re,scissor:je,viewport:Je,reset:dt}}function BR(i,e,t,n,r,o,l){const c=r.isWebGL2,f=r.maxTextures,u=r.maxCubemapSize,d=r.maxTextureSize,p=r.maxSamples,A=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,g=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),E=new WeakMap;let C;const _=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(H,Q){return v?new OffscreenCanvas(H,Q):Ql("canvas")}function y(H,Q,se,Ce){let me=1;if((H.width>Ce||H.height>Ce)&&(me=Ce/Math.max(H.width,H.height)),me<1||Q===!0)if(typeof HTMLImageElement<"u"&&H instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&H instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&H instanceof ImageBitmap){const xe=Q?yu:Math.floor,We=xe(me*H.width),Se=xe(me*H.height);C===void 0&&(C=S(We,Se));const Re=se?S(We,Se):C;return Re.width=We,Re.height=Se,Re.getContext("2d").drawImage(H,0,0,We,Se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+H.width+"x"+H.height+") to ("+We+"x"+Se+")."),Re}else return"data"in H&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+H.width+"x"+H.height+")."),H;return H}function x(H){return dA(H.width)&&dA(H.height)}function w(H){return c?!1:H.wrapS!==Fn||H.wrapT!==Fn||H.minFilter!==qt&&H.minFilter!==un}function b(H,Q){return H.generateMipmaps&&Q&&H.minFilter!==qt&&H.minFilter!==un}function B(H){i.generateMipmap(H)}function L(H,Q,se,Ce,me=!1){if(c===!1)return Q;if(H!==null){if(i[H]!==void 0)return i[H];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+H+"'")}let xe=Q;if(Q===i.RED&&(se===i.FLOAT&&(xe=i.R32F),se===i.HALF_FLOAT&&(xe=i.R16F),se===i.UNSIGNED_BYTE&&(xe=i.R8)),Q===i.RED_INTEGER&&(se===i.UNSIGNED_BYTE&&(xe=i.R8UI),se===i.UNSIGNED_SHORT&&(xe=i.R16UI),se===i.UNSIGNED_INT&&(xe=i.R32UI),se===i.BYTE&&(xe=i.R8I),se===i.SHORT&&(xe=i.R16I),se===i.INT&&(xe=i.R32I)),Q===i.RG&&(se===i.FLOAT&&(xe=i.RG32F),se===i.HALF_FLOAT&&(xe=i.RG16F),se===i.UNSIGNED_BYTE&&(xe=i.RG8)),Q===i.RGBA){const We=me?mu:Nt.getTransfer(Ce);se===i.FLOAT&&(xe=i.RGBA32F),se===i.HALF_FLOAT&&(xe=i.RGBA16F),se===i.UNSIGNED_BYTE&&(xe=We===Vt?i.SRGB8_ALPHA8:i.RGBA8),se===i.UNSIGNED_SHORT_4_4_4_4&&(xe=i.RGBA4),se===i.UNSIGNED_SHORT_5_5_5_1&&(xe=i.RGB5_A1)}return(xe===i.R16F||xe===i.R32F||xe===i.RG16F||xe===i.RG32F||xe===i.RGBA16F||xe===i.RGBA32F)&&e.get("EXT_color_buffer_float"),xe}function R(H,Q,se){return b(H,se)===!0||H.isFramebufferTexture&&H.minFilter!==qt&&H.minFilter!==un?Math.log2(Math.max(Q.width,Q.height))+1:H.mipmaps!==void 0&&H.mipmaps.length>0?H.mipmaps.length:H.isCompressedTexture&&Array.isArray(H.image)?Q.mipmaps.length:1}function T(H){return H===qt||H===Zd||H===cu?i.NEAREST:i.LINEAR}function N(H){const Q=H.target;Q.removeEventListener("dispose",N),O(Q),Q.isVideoTexture&&E.delete(Q)}function k(H){const Q=H.target;Q.removeEventListener("dispose",k),V(Q)}function O(H){const Q=n.get(H);if(Q.__webglInit===void 0)return;const se=H.source,Ce=_.get(se);if(Ce){const me=Ce[Q.__cacheKey];me.usedTimes--,me.usedTimes===0&&F(H),Object.keys(Ce).length===0&&_.delete(se)}n.remove(H)}function F(H){const Q=n.get(H);i.deleteTexture(Q.__webglTexture);const se=H.source,Ce=_.get(se);delete Ce[Q.__cacheKey],l.memory.textures--}function V(H){const Q=H.texture,se=n.get(H),Ce=n.get(Q);if(Ce.__webglTexture!==void 0&&(i.deleteTexture(Ce.__webglTexture),l.memory.textures--),H.depthTexture&&H.depthTexture.dispose(),H.isWebGLCubeRenderTarget)for(let me=0;me<6;me++){if(Array.isArray(se.__webglFramebuffer[me]))for(let xe=0;xe<se.__webglFramebuffer[me].length;xe++)i.deleteFramebuffer(se.__webglFramebuffer[me][xe]);else i.deleteFramebuffer(se.__webglFramebuffer[me]);se.__webglDepthbuffer&&i.deleteRenderbuffer(se.__webglDepthbuffer[me])}else{if(Array.isArray(se.__webglFramebuffer))for(let me=0;me<se.__webglFramebuffer.length;me++)i.deleteFramebuffer(se.__webglFramebuffer[me]);else i.deleteFramebuffer(se.__webglFramebuffer);if(se.__webglDepthbuffer&&i.deleteRenderbuffer(se.__webglDepthbuffer),se.__webglMultisampledFramebuffer&&i.deleteFramebuffer(se.__webglMultisampledFramebuffer),se.__webglColorRenderbuffer)for(let me=0;me<se.__webglColorRenderbuffer.length;me++)se.__webglColorRenderbuffer[me]&&i.deleteRenderbuffer(se.__webglColorRenderbuffer[me]);se.__webglDepthRenderbuffer&&i.deleteRenderbuffer(se.__webglDepthRenderbuffer)}if(H.isWebGLMultipleRenderTargets)for(let me=0,xe=Q.length;me<xe;me++){const We=n.get(Q[me]);We.__webglTexture&&(i.deleteTexture(We.__webglTexture),l.memory.textures--),n.remove(Q[me])}n.remove(Q),n.remove(H)}let X=0;function te(){X=0}function Y(){const H=X;return H>=f&&console.warn("THREE.WebGLTextures: Trying to use "+H+" texture units while this GPU supports only "+f),X+=1,H}function $(H){const Q=[];return Q.push(H.wrapS),Q.push(H.wrapT),Q.push(H.wrapR||0),Q.push(H.magFilter),Q.push(H.minFilter),Q.push(H.anisotropy),Q.push(H.internalFormat),Q.push(H.format),Q.push(H.type),Q.push(H.generateMipmaps),Q.push(H.premultiplyAlpha),Q.push(H.flipY),Q.push(H.unpackAlignment),Q.push(H.colorSpace),Q.join()}function U(H,Q){const se=n.get(H);if(H.isVideoTexture&&at(H),H.isRenderTargetTexture===!1&&H.version>0&&se.__version!==H.version){const Ce=H.image;if(Ce===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ce.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Oe(se,H,Q);return}}t.bindTexture(i.TEXTURE_2D,se.__webglTexture,i.TEXTURE0+Q)}function D(H,Q){const se=n.get(H);if(H.version>0&&se.__version!==H.version){Oe(se,H,Q);return}t.bindTexture(i.TEXTURE_2D_ARRAY,se.__webglTexture,i.TEXTURE0+Q)}function G(H,Q){const se=n.get(H);if(H.version>0&&se.__version!==H.version){Oe(se,H,Q);return}t.bindTexture(i.TEXTURE_3D,se.__webglTexture,i.TEXTURE0+Q)}function K(H,Q){const se=n.get(H);if(H.version>0&&se.__version!==H.version){It(se,H,Q);return}t.bindTexture(i.TEXTURE_CUBE_MAP,se.__webglTexture,i.TEXTURE0+Q)}const J={[Xo]:i.REPEAT,[Fn]:i.CLAMP_TO_EDGE,[lu]:i.MIRRORED_REPEAT},Ae={[qt]:i.NEAREST,[Zd]:i.NEAREST_MIPMAP_NEAREST,[cu]:i.NEAREST_MIPMAP_LINEAR,[un]:i.LINEAR,[r1]:i.LINEAR_MIPMAP_NEAREST,[Pr]:i.LINEAR_MIPMAP_LINEAR},ge={[YM]:i.NEVER,[e3]:i.ALWAYS,[qM]:i.LESS,[KM]:i.LEQUAL,[XM]:i.EQUAL,[$M]:i.GEQUAL,[JM]:i.GREATER,[ZM]:i.NOTEQUAL};function be(H,Q,se){if(se?(i.texParameteri(H,i.TEXTURE_WRAP_S,J[Q.wrapS]),i.texParameteri(H,i.TEXTURE_WRAP_T,J[Q.wrapT]),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,J[Q.wrapR]),i.texParameteri(H,i.TEXTURE_MAG_FILTER,Ae[Q.magFilter]),i.texParameteri(H,i.TEXTURE_MIN_FILTER,Ae[Q.minFilter])):(i.texParameteri(H,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(H,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(H===i.TEXTURE_3D||H===i.TEXTURE_2D_ARRAY)&&i.texParameteri(H,i.TEXTURE_WRAP_R,i.CLAMP_TO_EDGE),(Q.wrapS!==Fn||Q.wrapT!==Fn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(H,i.TEXTURE_MAG_FILTER,T(Q.magFilter)),i.texParameteri(H,i.TEXTURE_MIN_FILTER,T(Q.minFilter)),Q.minFilter!==qt&&Q.minFilter!==un&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),Q.compareFunction&&(i.texParameteri(H,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(H,i.TEXTURE_COMPARE_FUNC,ge[Q.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const Ce=e.get("EXT_texture_filter_anisotropic");if(Q.magFilter===qt||Q.minFilter!==cu&&Q.minFilter!==Pr||Q.type===hn&&e.has("OES_texture_float_linear")===!1||c===!1&&Q.type===Jn&&e.has("OES_texture_half_float_linear")===!1)return;(Q.anisotropy>1||n.get(Q).__currentAnisotropy)&&(i.texParameterf(H,Ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Q.anisotropy,r.getMaxAnisotropy())),n.get(Q).__currentAnisotropy=Q.anisotropy)}}function de(H,Q){let se=!1;H.__webglInit===void 0&&(H.__webglInit=!0,Q.addEventListener("dispose",N));const Ce=Q.source;let me=_.get(Ce);me===void 0&&(me={},_.set(Ce,me));const xe=$(Q);if(xe!==H.__cacheKey){me[xe]===void 0&&(me[xe]={texture:i.createTexture(),usedTimes:0},l.memory.textures++,se=!0),me[xe].usedTimes++;const We=me[H.__cacheKey];We!==void 0&&(me[H.__cacheKey].usedTimes--,We.usedTimes===0&&F(Q)),H.__cacheKey=xe,H.__webglTexture=me[xe].texture}return se}function Oe(H,Q,se){let Ce=i.TEXTURE_2D;(Q.isDataArrayTexture||Q.isCompressedArrayTexture)&&(Ce=i.TEXTURE_2D_ARRAY),Q.isData3DTexture&&(Ce=i.TEXTURE_3D);const me=de(H,Q),xe=Q.source;t.bindTexture(Ce,H.__webglTexture,i.TEXTURE0+se);const We=n.get(xe);if(xe.version!==We.__version||me===!0){t.activeTexture(i.TEXTURE0+se);const Se=Nt.getPrimaries(Nt.workingColorSpace),Re=Q.colorSpace===ci?null:Nt.getPrimaries(Q.colorSpace),q=Q.colorSpace===ci||Se===Re?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,Q.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,Q.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,q);const Me=w(Q)&&x(Q.image)===!1;let pe=y(Q.image,Me,!1,d);pe=At(Q,pe);const nt=x(pe)||c,je=o.convert(Q.format,Q.colorSpace);let Je=o.convert(Q.type),Ge=L(Q.internalFormat,je,Je,Q.colorSpace,Q.isVideoTexture);be(Ce,Q,nt);let Pe;const dt=Q.mipmaps,ee=c&&Q.isVideoTexture!==!0,Te=We.__version===void 0||me===!0,ye=R(Q,pe,nt);if(Q.isDepthTexture)Ge=i.DEPTH_COMPONENT,c?Q.type===hn?Ge=i.DEPTH_COMPONENT32F:Q.type===yi?Ge=i.DEPTH_COMPONENT24:Q.type===oo?Ge=i.DEPTH24_STENCIL8:Ge=i.DEPTH_COMPONENT16:Q.type===hn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Q.format===ao&&Ge===i.DEPTH_COMPONENT&&Q.type!==uu&&Q.type!==yi&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Q.type=yi,Je=o.convert(Q.type)),Q.format===Ko&&Ge===i.DEPTH_COMPONENT&&(Ge=i.DEPTH_STENCIL,Q.type!==oo&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Q.type=oo,Je=o.convert(Q.type))),Te&&(ee?t.texStorage2D(i.TEXTURE_2D,1,Ge,pe.width,pe.height):t.texImage2D(i.TEXTURE_2D,0,Ge,pe.width,pe.height,0,je,Je,null));else if(Q.isDataTexture)if(dt.length>0&&nt){ee&&Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,dt[0].width,dt[0].height);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],ee?t.texSubImage2D(i.TEXTURE_2D,he,0,0,Pe.width,Pe.height,je,Je,Pe.data):t.texImage2D(i.TEXTURE_2D,he,Ge,Pe.width,Pe.height,0,je,Je,Pe.data);Q.generateMipmaps=!1}else ee?(Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,pe.width,pe.height),t.texSubImage2D(i.TEXTURE_2D,0,0,0,pe.width,pe.height,je,Je,pe.data)):t.texImage2D(i.TEXTURE_2D,0,Ge,pe.width,pe.height,0,je,Je,pe.data);else if(Q.isCompressedTexture)if(Q.isCompressedArrayTexture){ee&&Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,ye,Ge,dt[0].width,dt[0].height,pe.depth);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],Q.format!==on?je!==null?ee?t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,he,0,0,0,Pe.width,Pe.height,pe.depth,je,Pe.data,0,0):t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,he,Ge,Pe.width,Pe.height,pe.depth,0,Pe.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ee?t.texSubImage3D(i.TEXTURE_2D_ARRAY,he,0,0,0,Pe.width,Pe.height,pe.depth,je,Je,Pe.data):t.texImage3D(i.TEXTURE_2D_ARRAY,he,Ge,Pe.width,Pe.height,pe.depth,0,je,Je,Pe.data)}else{ee&&Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,dt[0].width,dt[0].height);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],Q.format!==on?je!==null?ee?t.compressedTexSubImage2D(i.TEXTURE_2D,he,0,0,Pe.width,Pe.height,je,Pe.data):t.compressedTexImage2D(i.TEXTURE_2D,he,Ge,Pe.width,Pe.height,0,Pe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):ee?t.texSubImage2D(i.TEXTURE_2D,he,0,0,Pe.width,Pe.height,je,Je,Pe.data):t.texImage2D(i.TEXTURE_2D,he,Ge,Pe.width,Pe.height,0,je,Je,Pe.data)}else if(Q.isDataArrayTexture)ee?(Te&&t.texStorage3D(i.TEXTURE_2D_ARRAY,ye,Ge,pe.width,pe.height,pe.depth),t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,pe.width,pe.height,pe.depth,je,Je,pe.data)):t.texImage3D(i.TEXTURE_2D_ARRAY,0,Ge,pe.width,pe.height,pe.depth,0,je,Je,pe.data);else if(Q.isData3DTexture)ee?(Te&&t.texStorage3D(i.TEXTURE_3D,ye,Ge,pe.width,pe.height,pe.depth),t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,pe.width,pe.height,pe.depth,je,Je,pe.data)):t.texImage3D(i.TEXTURE_3D,0,Ge,pe.width,pe.height,pe.depth,0,je,Je,pe.data);else if(Q.isFramebufferTexture){if(Te)if(ee)t.texStorage2D(i.TEXTURE_2D,ye,Ge,pe.width,pe.height);else{let he=pe.width,we=pe.height;for(let qe=0;qe<ye;qe++)t.texImage2D(i.TEXTURE_2D,qe,Ge,he,we,0,je,Je,null),he>>=1,we>>=1}}else if(dt.length>0&&nt){ee&&Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,dt[0].width,dt[0].height);for(let he=0,we=dt.length;he<we;he++)Pe=dt[he],ee?t.texSubImage2D(i.TEXTURE_2D,he,0,0,je,Je,Pe):t.texImage2D(i.TEXTURE_2D,he,Ge,je,Je,Pe);Q.generateMipmaps=!1}else ee?(Te&&t.texStorage2D(i.TEXTURE_2D,ye,Ge,pe.width,pe.height),t.texSubImage2D(i.TEXTURE_2D,0,0,0,je,Je,pe)):t.texImage2D(i.TEXTURE_2D,0,Ge,je,Je,pe);b(Q,nt)&&B(Ce),We.__version=xe.version,Q.onUpdate&&Q.onUpdate(Q)}H.__version=Q.version}function It(H,Q,se){if(Q.image.length!==6)return;const Ce=de(H,Q),me=Q.source;t.bindTexture(i.TEXTURE_CUBE_MAP,H.__webglTexture,i.TEXTURE0+se);const xe=n.get(me);if(me.version!==xe.__version||Ce===!0){t.activeTexture(i.TEXTURE0+se);const We=Nt.getPrimaries(Nt.workingColorSpace),Se=Q.colorSpace===ci?null:Nt.getPrimaries(Q.colorSpace),Re=Q.colorSpace===ci||We===Se?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,Q.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Q.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,Q.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,Re);const q=Q.isCompressedTexture||Q.image[0].isCompressedTexture,Me=Q.image[0]&&Q.image[0].isDataTexture,pe=[];for(let he=0;he<6;he++)!q&&!Me?pe[he]=y(Q.image[he],!1,!0,u):pe[he]=Me?Q.image[he].image:Q.image[he],pe[he]=At(Q,pe[he]);const nt=pe[0],je=x(nt)||c,Je=o.convert(Q.format,Q.colorSpace),Ge=o.convert(Q.type),Pe=L(Q.internalFormat,Je,Ge,Q.colorSpace),dt=c&&Q.isVideoTexture!==!0,ee=xe.__version===void 0||Ce===!0;let Te=R(Q,nt,je);be(i.TEXTURE_CUBE_MAP,Q,je);let ye;if(q){dt&&ee&&t.texStorage2D(i.TEXTURE_CUBE_MAP,Te,Pe,nt.width,nt.height);for(let he=0;he<6;he++){ye=pe[he].mipmaps;for(let we=0;we<ye.length;we++){const qe=ye[we];Q.format!==on?Je!==null?dt?t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,0,0,qe.width,qe.height,Je,qe.data):t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,Pe,qe.width,qe.height,0,qe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,0,0,qe.width,qe.height,Je,Ge,qe.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we,Pe,qe.width,qe.height,0,Je,Ge,qe.data)}}}else{ye=Q.mipmaps,dt&&ee&&(ye.length>0&&Te++,t.texStorage2D(i.TEXTURE_CUBE_MAP,Te,Pe,pe[0].width,pe[0].height));for(let he=0;he<6;he++)if(Me){dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,pe[he].width,pe[he].height,Je,Ge,pe[he].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,Pe,pe[he].width,pe[he].height,0,Je,Ge,pe[he].data);for(let we=0;we<ye.length;we++){const pt=ye[we].image[he].image;dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,0,0,pt.width,pt.height,Je,Ge,pt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,Pe,pt.width,pt.height,0,Je,Ge,pt.data)}}else{dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,Je,Ge,pe[he]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,Pe,Je,Ge,pe[he]);for(let we=0;we<ye.length;we++){const qe=ye[we];dt?t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,0,0,Je,Ge,qe.image[he]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+he,we+1,Pe,Je,Ge,qe.image[he])}}}b(Q,je)&&B(i.TEXTURE_CUBE_MAP),xe.__version=me.version,Q.onUpdate&&Q.onUpdate(Q)}H.__version=Q.version}function ot(H,Q,se,Ce,me,xe){const We=o.convert(se.format,se.colorSpace),Se=o.convert(se.type),Re=L(se.internalFormat,We,Se,se.colorSpace);if(!n.get(Q).__hasExternalTextures){const Me=Math.max(1,Q.width>>xe),pe=Math.max(1,Q.height>>xe);me===i.TEXTURE_3D||me===i.TEXTURE_2D_ARRAY?t.texImage3D(me,xe,Re,Me,pe,Q.depth,0,We,Se,null):t.texImage2D(me,xe,Re,Me,pe,0,We,Se,null)}t.bindFramebuffer(i.FRAMEBUFFER,H),$e(Q)?A.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ce,me,n.get(se).__webglTexture,0,He(Q)):(me===i.TEXTURE_2D||me>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&me<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Ce,me,n.get(se).__webglTexture,xe),t.bindFramebuffer(i.FRAMEBUFFER,null)}function oe(H,Q,se){if(i.bindRenderbuffer(i.RENDERBUFFER,H),Q.depthBuffer&&!Q.stencilBuffer){let Ce=c===!0?i.DEPTH_COMPONENT24:i.DEPTH_COMPONENT16;if(se||$e(Q)){const me=Q.depthTexture;me&&me.isDepthTexture&&(me.type===hn?Ce=i.DEPTH_COMPONENT32F:me.type===yi&&(Ce=i.DEPTH_COMPONENT24));const xe=He(Q);$e(Q)?A.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,xe,Ce,Q.width,Q.height):i.renderbufferStorageMultisample(i.RENDERBUFFER,xe,Ce,Q.width,Q.height)}else i.renderbufferStorage(i.RENDERBUFFER,Ce,Q.width,Q.height);i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,H)}else if(Q.depthBuffer&&Q.stencilBuffer){const Ce=He(Q);se&&$e(Q)===!1?i.renderbufferStorageMultisample(i.RENDERBUFFER,Ce,i.DEPTH24_STENCIL8,Q.width,Q.height):$e(Q)?A.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,Ce,i.DEPTH24_STENCIL8,Q.width,Q.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,Q.width,Q.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,H)}else{const Ce=Q.isWebGLMultipleRenderTargets===!0?Q.texture:[Q.texture];for(let me=0;me<Ce.length;me++){const xe=Ce[me],We=o.convert(xe.format,xe.colorSpace),Se=o.convert(xe.type),Re=L(xe.internalFormat,We,Se,xe.colorSpace),q=He(Q);se&&$e(Q)===!1?i.renderbufferStorageMultisample(i.RENDERBUFFER,q,Re,Q.width,Q.height):$e(Q)?A.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,q,Re,Q.width,Q.height):i.renderbufferStorage(i.RENDERBUFFER,Re,Q.width,Q.height)}}i.bindRenderbuffer(i.RENDERBUFFER,null)}function Mt(H,Q){if(Q&&Q.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(i.FRAMEBUFFER,H),!(Q.depthTexture&&Q.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(Q.depthTexture).__webglTexture||Q.depthTexture.image.width!==Q.width||Q.depthTexture.image.height!==Q.height)&&(Q.depthTexture.image.width=Q.width,Q.depthTexture.image.height=Q.height,Q.depthTexture.needsUpdate=!0),U(Q.depthTexture,0);const Ce=n.get(Q.depthTexture).__webglTexture,me=He(Q);if(Q.depthTexture.format===ao)$e(Q)?A.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,Ce,0,me):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,Ce,0);else if(Q.depthTexture.format===Ko)$e(Q)?A.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,Ce,0,me):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,Ce,0);else throw new Error("Unknown depthTexture format")}function Ne(H){const Q=n.get(H),se=H.isWebGLCubeRenderTarget===!0;if(H.depthTexture&&!Q.__autoAllocateDepthBuffer){if(se)throw new Error("target.depthTexture not supported in Cube render targets");Mt(Q.__webglFramebuffer,H)}else if(se){Q.__webglDepthbuffer=[];for(let Ce=0;Ce<6;Ce++)t.bindFramebuffer(i.FRAMEBUFFER,Q.__webglFramebuffer[Ce]),Q.__webglDepthbuffer[Ce]=i.createRenderbuffer(),oe(Q.__webglDepthbuffer[Ce],H,!1)}else t.bindFramebuffer(i.FRAMEBUFFER,Q.__webglFramebuffer),Q.__webglDepthbuffer=i.createRenderbuffer(),oe(Q.__webglDepthbuffer,H,!1);t.bindFramebuffer(i.FRAMEBUFFER,null)}function Ze(H,Q,se){const Ce=n.get(H);Q!==void 0&&ot(Ce.__webglFramebuffer,H,H.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),se!==void 0&&Ne(H)}function _e(H){const Q=H.texture,se=n.get(H),Ce=n.get(Q);H.addEventListener("dispose",k),H.isWebGLMultipleRenderTargets!==!0&&(Ce.__webglTexture===void 0&&(Ce.__webglTexture=i.createTexture()),Ce.__version=Q.version,l.memory.textures++);const me=H.isWebGLCubeRenderTarget===!0,xe=H.isWebGLMultipleRenderTargets===!0,We=x(H)||c;if(me){se.__webglFramebuffer=[];for(let Se=0;Se<6;Se++)if(c&&Q.mipmaps&&Q.mipmaps.length>0){se.__webglFramebuffer[Se]=[];for(let Re=0;Re<Q.mipmaps.length;Re++)se.__webglFramebuffer[Se][Re]=i.createFramebuffer()}else se.__webglFramebuffer[Se]=i.createFramebuffer()}else{if(c&&Q.mipmaps&&Q.mipmaps.length>0){se.__webglFramebuffer=[];for(let Se=0;Se<Q.mipmaps.length;Se++)se.__webglFramebuffer[Se]=i.createFramebuffer()}else se.__webglFramebuffer=i.createFramebuffer();if(xe)if(r.drawBuffers){const Se=H.texture;for(let Re=0,q=Se.length;Re<q;Re++){const Me=n.get(Se[Re]);Me.__webglTexture===void 0&&(Me.__webglTexture=i.createTexture(),l.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(c&&H.samples>0&&$e(H)===!1){const Se=xe?Q:[Q];se.__webglMultisampledFramebuffer=i.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Re=0;Re<Se.length;Re++){const q=Se[Re];se.__webglColorRenderbuffer[Re]=i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,se.__webglColorRenderbuffer[Re]);const Me=o.convert(q.format,q.colorSpace),pe=o.convert(q.type),nt=L(q.internalFormat,Me,pe,q.colorSpace,H.isXRRenderTarget===!0),je=He(H);i.renderbufferStorageMultisample(i.RENDERBUFFER,je,nt,H.width,H.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+Re,i.RENDERBUFFER,se.__webglColorRenderbuffer[Re])}i.bindRenderbuffer(i.RENDERBUFFER,null),H.depthBuffer&&(se.__webglDepthRenderbuffer=i.createRenderbuffer(),oe(se.__webglDepthRenderbuffer,H,!0)),t.bindFramebuffer(i.FRAMEBUFFER,null)}}if(me){t.bindTexture(i.TEXTURE_CUBE_MAP,Ce.__webglTexture),be(i.TEXTURE_CUBE_MAP,Q,We);for(let Se=0;Se<6;Se++)if(c&&Q.mipmaps&&Q.mipmaps.length>0)for(let Re=0;Re<Q.mipmaps.length;Re++)ot(se.__webglFramebuffer[Se][Re],H,Q,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Se,Re);else ot(se.__webglFramebuffer[Se],H,Q,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Se,0);b(Q,We)&&B(i.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(xe){const Se=H.texture;for(let Re=0,q=Se.length;Re<q;Re++){const Me=Se[Re],pe=n.get(Me);t.bindTexture(i.TEXTURE_2D,pe.__webglTexture),be(i.TEXTURE_2D,Me,We),ot(se.__webglFramebuffer,H,Me,i.COLOR_ATTACHMENT0+Re,i.TEXTURE_2D,0),b(Me,We)&&B(i.TEXTURE_2D)}t.unbindTexture()}else{let Se=i.TEXTURE_2D;if((H.isWebGL3DRenderTarget||H.isWebGLArrayRenderTarget)&&(c?Se=H.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),t.bindTexture(Se,Ce.__webglTexture),be(Se,Q,We),c&&Q.mipmaps&&Q.mipmaps.length>0)for(let Re=0;Re<Q.mipmaps.length;Re++)ot(se.__webglFramebuffer[Re],H,Q,i.COLOR_ATTACHMENT0,Se,Re);else ot(se.__webglFramebuffer,H,Q,i.COLOR_ATTACHMENT0,Se,0);b(Q,We)&&B(Se),t.unbindTexture()}H.depthBuffer&&Ne(H)}function it(H){const Q=x(H)||c,se=H.isWebGLMultipleRenderTargets===!0?H.texture:[H.texture];for(let Ce=0,me=se.length;Ce<me;Ce++){const xe=se[Ce];if(b(xe,Q)){const We=H.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:i.TEXTURE_2D,Se=n.get(xe).__webglTexture;t.bindTexture(We,Se),B(We),t.unbindTexture()}}}function Ue(H){if(c&&H.samples>0&&$e(H)===!1){const Q=H.isWebGLMultipleRenderTargets?H.texture:[H.texture],se=H.width,Ce=H.height;let me=i.COLOR_BUFFER_BIT;const xe=[],We=H.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,Se=n.get(H),Re=H.isWebGLMultipleRenderTargets===!0;if(Re)for(let q=0;q<Q.length;q++)t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.RENDERBUFFER,null),t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.TEXTURE_2D,null,0);t.bindFramebuffer(i.READ_FRAMEBUFFER,Se.__webglMultisampledFramebuffer),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Se.__webglFramebuffer);for(let q=0;q<Q.length;q++){xe.push(i.COLOR_ATTACHMENT0+q),H.depthBuffer&&xe.push(We);const Me=Se.__ignoreDepthValues!==void 0?Se.__ignoreDepthValues:!1;if(Me===!1&&(H.depthBuffer&&(me|=i.DEPTH_BUFFER_BIT),H.stencilBuffer&&(me|=i.STENCIL_BUFFER_BIT)),Re&&i.framebufferRenderbuffer(i.READ_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,Se.__webglColorRenderbuffer[q]),Me===!0&&(i.invalidateFramebuffer(i.READ_FRAMEBUFFER,[We]),i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,[We])),Re){const pe=n.get(Q[q]).__webglTexture;i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,pe,0)}i.blitFramebuffer(0,0,se,Ce,0,0,se,Ce,me,i.NEAREST),g&&i.invalidateFramebuffer(i.READ_FRAMEBUFFER,xe)}if(t.bindFramebuffer(i.READ_FRAMEBUFFER,null),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),Re)for(let q=0;q<Q.length;q++){t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.RENDERBUFFER,Se.__webglColorRenderbuffer[q]);const Me=n.get(Q[q]).__webglTexture;t.bindFramebuffer(i.FRAMEBUFFER,Se.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+q,i.TEXTURE_2D,Me,0)}t.bindFramebuffer(i.DRAW_FRAMEBUFFER,Se.__webglMultisampledFramebuffer)}}function He(H){return Math.min(p,H.samples)}function $e(H){const Q=n.get(H);return c&&H.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&Q.__useRenderToTexture!==!1}function at(H){const Q=l.render.frame;E.get(H)!==Q&&(E.set(H,Q),H.update())}function At(H,Q){const se=H.colorSpace,Ce=H.format,me=H.type;return H.isCompressedTexture===!0||H.isVideoTexture===!0||H.format===fA||se!==En&&se!==ci&&(Nt.getTransfer(se)===Vt?c===!1?e.has("EXT_sRGB")===!0&&Ce===on?(H.format=fA,H.minFilter=un,H.generateMipmaps=!1):Q=G1.sRGBToLinear(Q):(Ce!==on||me!==fn)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),Q}this.allocateTextureUnit=Y,this.resetTextureUnits=te,this.setTexture2D=U,this.setTexture2DArray=D,this.setTexture3D=G,this.setTextureCube=K,this.rebindTextures=Ze,this.setupRenderTarget=_e,this.updateRenderTargetMipmap=it,this.updateMultisampleRenderTarget=Ue,this.setupDepthRenderbuffer=Ne,this.setupFrameBufferTexture=ot,this.useMultisampledRTT=$e}function RR(i,e,t){const n=t.isWebGL2;function r(o,l=ci){let c;const f=Nt.getTransfer(l);if(o===fn)return i.UNSIGNED_BYTE;if(o===o1)return i.UNSIGNED_SHORT_4_4_4_4;if(o===a1)return i.UNSIGNED_SHORT_5_5_5_1;if(o===$d)return i.BYTE;if(o===s1)return i.SHORT;if(o===uu)return i.UNSIGNED_SHORT;if(o===Dl)return i.INT;if(o===yi)return i.UNSIGNED_INT;if(o===hn)return i.FLOAT;if(o===Jn)return n?i.HALF_FLOAT:(c=e.get("OES_texture_half_float"),c!==null?c.HALF_FLOAT_OES:null);if(o===FM)return i.ALPHA;if(o===on)return i.RGBA;if(o===QM)return i.LUMINANCE;if(o===OM)return i.LUMINANCE_ALPHA;if(o===ao)return i.DEPTH_COMPONENT;if(o===Ko)return i.DEPTH_STENCIL;if(o===fA)return c=e.get("EXT_sRGB"),c!==null?c.SRGB_ALPHA_EXT:null;if(o===lo)return i.RED;if(o===eA)return i.RED_INTEGER;if(o===co)return i.RG;if(o===fu)return i.RG_INTEGER;if(o===Nl)return i.RGBA_INTEGER;if(o===hu||o===tA||o===nA||o===du)if(f===Vt)if(c=e.get("WEBGL_compressed_texture_s3tc_srgb"),c!==null){if(o===hu)return c.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===tA)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===nA)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===du)return c.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(c=e.get("WEBGL_compressed_texture_s3tc"),c!==null){if(o===hu)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===tA)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===nA)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===du)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===iA||o===l1||o===rA||o===c1)if(c=e.get("WEBGL_compressed_texture_pvrtc"),c!==null){if(o===iA)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===l1)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===rA)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===c1)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===u1)return c=e.get("WEBGL_compressed_texture_etc1"),c!==null?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===sA||o===oA)if(c=e.get("WEBGL_compressed_texture_etc"),c!==null){if(o===sA)return f===Vt?c.COMPRESSED_SRGB8_ETC2:c.COMPRESSED_RGB8_ETC2;if(o===oA)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:c.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===aA||o===f1||o===h1||o===d1||o===Au||o===A1||o===p1||o===g1||o===m1||o===v1||o===_1||o===E1||o===y1||o===C1)if(c=e.get("WEBGL_compressed_texture_astc"),c!==null){if(o===aA)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:c.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===f1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:c.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===h1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:c.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===d1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:c.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===Au)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:c.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===A1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:c.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===p1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:c.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===g1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:c.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===m1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:c.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===v1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:c.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===_1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:c.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===E1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:c.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===y1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:c.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===C1)return f===Vt?c.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:c.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===pu||o===I1||o===x1)if(c=e.get("EXT_texture_compression_bptc"),c!==null){if(o===pu)return f===Vt?c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:c.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===I1)return c.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===x1)return c.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===zM||o===S1||o===w1||o===M1)if(c=e.get("EXT_texture_compression_rgtc"),c!==null){if(o===pu)return c.COMPRESSED_RED_RGTC1_EXT;if(o===S1)return c.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===w1)return c.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===M1)return c.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===oo?n?i.UNSIGNED_INT_24_8:(c=e.get("WEBGL_depth_texture"),c!==null?c.UNSIGNED_INT_24_8_WEBGL:null):i[o]!==void 0?i[o]:null}return{convert:r}}class bR extends $n{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class vs extends tn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const LR={type:"move"};class zA{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new vs,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new vs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new j,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new j),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new vs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new j,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new j),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,o=null,l=null;const c=this._targetRay,f=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){l=!0;for(const C of e.hand.values()){const _=t.getJointPose(C,n),v=this._getHandJoint(u,C);_!==null&&(v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=_.radius),v.visible=_!==null}const d=u.joints["index-finger-tip"],p=u.joints["thumb-tip"],A=d.position.distanceTo(p.position),g=.02,E=.005;u.inputState.pinching&&A>g+E?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&A<=g-E&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else f!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(f.matrix.fromArray(o.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,o.linearVelocity?(f.hasLinearVelocity=!0,f.linearVelocity.copy(o.linearVelocity)):f.hasLinearVelocity=!1,o.angularVelocity?(f.hasAngularVelocity=!0,f.angularVelocity.copy(o.angularVelocity)):f.hasAngularVelocity=!1));c!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&o!==null&&(r=o),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1,this.dispatchEvent(LR)))}return c!==null&&(c.visible=r!==null),f!==null&&(f.visible=o!==null),u!==null&&(u.visible=l!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new vs;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class DR extends Rn{constructor(e,t,n,r,o,l,c,f,u,d){if(d=d!==void 0?d:ao,d!==ao&&d!==Ko)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===ao&&(n=yi),n===void 0&&d===Ko&&(n=oo),super(null,r,o,l,c,f,d,n,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=c!==void 0?c:qt,this.minFilter=f!==void 0?f:qt,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class NR extends fo{constructor(e,t){super();const n=this;let r=null,o=1,l=null,c="local-floor",f=1,u=null,d=null,p=null,A=null,g=null,E=null;const C=t.getContextAttributes();let _=null,v=null;const S=[],y=[],x=new $n;x.layers.enable(1),x.viewport=new Gt;const w=new $n;w.layers.enable(2),w.viewport=new Gt;const b=[x,w],B=new bR;B.layers.enable(1),B.layers.enable(2);let L=null,R=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(D){let G=S[D];return G===void 0&&(G=new zA,S[D]=G),G.getTargetRaySpace()},this.getControllerGrip=function(D){let G=S[D];return G===void 0&&(G=new zA,S[D]=G),G.getGripSpace()},this.getHand=function(D){let G=S[D];return G===void 0&&(G=new zA,S[D]=G),G.getHandSpace()};function T(D){const G=y.indexOf(D.inputSource);if(G===-1)return;const K=S[G];K!==void 0&&(K.update(D.inputSource,D.frame,u||l),K.dispatchEvent({type:D.type,data:D.inputSource}))}function N(){r.removeEventListener("select",T),r.removeEventListener("selectstart",T),r.removeEventListener("selectend",T),r.removeEventListener("squeeze",T),r.removeEventListener("squeezestart",T),r.removeEventListener("squeezeend",T),r.removeEventListener("end",N),r.removeEventListener("inputsourceschange",k);for(let D=0;D<S.length;D++){const G=y[D];G!==null&&(y[D]=null,S[D].disconnect(G))}L=null,R=null,e.setRenderTarget(_),g=null,A=null,p=null,r=null,v=null,U.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(D){o=D,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(D){c=D,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||l},this.setReferenceSpace=function(D){u=D},this.getBaseLayer=function(){return A!==null?A:g},this.getBinding=function(){return p},this.getFrame=function(){return E},this.getSession=function(){return r},this.setSession=async function(D){if(r=D,r!==null){if(_=e.getRenderTarget(),r.addEventListener("select",T),r.addEventListener("selectstart",T),r.addEventListener("selectend",T),r.addEventListener("squeeze",T),r.addEventListener("squeezestart",T),r.addEventListener("squeezeend",T),r.addEventListener("end",N),r.addEventListener("inputsourceschange",k),C.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const G={antialias:r.renderState.layers===void 0?C.antialias:!0,alpha:!0,depth:C.depth,stencil:C.stencil,framebufferScaleFactor:o};g=new XRWebGLLayer(r,t,G),r.updateRenderState({baseLayer:g}),v=new Xi(g.framebufferWidth,g.framebufferHeight,{format:on,type:fn,colorSpace:e.outputColorSpace,stencilBuffer:C.stencil})}else{let G=null,K=null,J=null;C.depth&&(J=C.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,G=C.stencil?Ko:ao,K=C.stencil?oo:yi);const Ae={colorFormat:t.RGBA8,depthFormat:J,scaleFactor:o};p=new XRWebGLBinding(r,t),A=p.createProjectionLayer(Ae),r.updateRenderState({layers:[A]}),v=new Xi(A.textureWidth,A.textureHeight,{format:on,type:fn,depthTexture:new DR(A.textureWidth,A.textureHeight,K,void 0,void 0,void 0,void 0,void 0,void 0,G),stencilBuffer:C.stencil,colorSpace:e.outputColorSpace,samples:C.antialias?4:0});const ge=e.properties.get(v);ge.__ignoreDepthValues=A.ignoreDepthValues}v.isXRRenderTarget=!0,this.setFoveation(f),u=null,l=await r.requestReferenceSpace(c),U.setContext(r),U.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function k(D){for(let G=0;G<D.removed.length;G++){const K=D.removed[G],J=y.indexOf(K);J>=0&&(y[J]=null,S[J].disconnect(K))}for(let G=0;G<D.added.length;G++){const K=D.added[G];let J=y.indexOf(K);if(J===-1){for(let ge=0;ge<S.length;ge++)if(ge>=y.length){y.push(K),J=ge;break}else if(y[ge]===null){y[ge]=K,J=ge;break}if(J===-1)break}const Ae=S[J];Ae&&Ae.connect(K)}}const O=new j,F=new j;function V(D,G,K){O.setFromMatrixPosition(G.matrixWorld),F.setFromMatrixPosition(K.matrixWorld);const J=O.distanceTo(F),Ae=G.projectionMatrix.elements,ge=K.projectionMatrix.elements,be=Ae[14]/(Ae[10]-1),de=Ae[14]/(Ae[10]+1),Oe=(Ae[9]+1)/Ae[5],It=(Ae[9]-1)/Ae[5],ot=(Ae[8]-1)/Ae[0],oe=(ge[8]+1)/ge[0],Mt=be*ot,Ne=be*oe,Ze=J/(-ot+oe),_e=Ze*-ot;G.matrixWorld.decompose(D.position,D.quaternion,D.scale),D.translateX(_e),D.translateZ(Ze),D.matrixWorld.compose(D.position,D.quaternion,D.scale),D.matrixWorldInverse.copy(D.matrixWorld).invert();const it=be+Ze,Ue=de+Ze,He=Mt-_e,$e=Ne+(J-_e),at=Oe*de/Ue*it,At=It*de/Ue*it;D.projectionMatrix.makePerspective(He,$e,at,At,it,Ue),D.projectionMatrixInverse.copy(D.projectionMatrix).invert()}function X(D,G){G===null?D.matrixWorld.copy(D.matrix):D.matrixWorld.multiplyMatrices(G.matrixWorld,D.matrix),D.matrixWorldInverse.copy(D.matrixWorld).invert()}this.updateCamera=function(D){if(r===null)return;B.near=w.near=x.near=D.near,B.far=w.far=x.far=D.far,(L!==B.near||R!==B.far)&&(r.updateRenderState({depthNear:B.near,depthFar:B.far}),L=B.near,R=B.far);const G=D.parent,K=B.cameras;X(B,G);for(let J=0;J<K.length;J++)X(K[J],G);K.length===2?V(B,x,w):B.projectionMatrix.copy(x.projectionMatrix),te(D,B,G)};function te(D,G,K){K===null?D.matrix.copy(G.matrixWorld):(D.matrix.copy(K.matrixWorld),D.matrix.invert(),D.matrix.multiply(G.matrixWorld)),D.matrix.decompose(D.position,D.quaternion,D.scale),D.updateMatrixWorld(!0),D.projectionMatrix.copy(G.projectionMatrix),D.projectionMatrixInverse.copy(G.projectionMatrixInverse),D.isPerspectiveCamera&&(D.fov=$o*2*Math.atan(1/D.projectionMatrix.elements[5]),D.zoom=1)}this.getCamera=function(){return B},this.getFoveation=function(){if(!(A===null&&g===null))return f},this.setFoveation=function(D){f=D,A!==null&&(A.fixedFoveation=D),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=D)};let Y=null;function $(D,G){if(d=G.getViewerPose(u||l),E=G,d!==null){const K=d.views;g!==null&&(e.setRenderTargetFramebuffer(v,g.framebuffer),e.setRenderTarget(v));let J=!1;K.length!==B.cameras.length&&(B.cameras.length=0,J=!0);for(let Ae=0;Ae<K.length;Ae++){const ge=K[Ae];let be=null;if(g!==null)be=g.getViewport(ge);else{const Oe=p.getViewSubImage(A,ge);be=Oe.viewport,Ae===0&&(e.setRenderTargetTextures(v,Oe.colorTexture,A.ignoreDepthValues?void 0:Oe.depthStencilTexture),e.setRenderTarget(v))}let de=b[Ae];de===void 0&&(de=new $n,de.layers.enable(Ae),de.viewport=new Gt,b[Ae]=de),de.matrix.fromArray(ge.transform.matrix),de.matrix.decompose(de.position,de.quaternion,de.scale),de.projectionMatrix.fromArray(ge.projectionMatrix),de.projectionMatrixInverse.copy(de.projectionMatrix).invert(),de.viewport.set(be.x,be.y,be.width,be.height),Ae===0&&(B.matrix.copy(de.matrix),B.matrix.decompose(B.position,B.quaternion,B.scale)),J===!0&&B.cameras.push(de)}}for(let K=0;K<S.length;K++){const J=y[K],Ae=S[K];J!==null&&Ae!==void 0&&Ae.update(J,G,u||l)}Y&&Y(D,G),G.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:G}),E=null}const U=new f_;U.setAnimationLoop($),this.setAnimationLoop=function(D){Y=D},this.dispose=function(){}}}function PR(i,e){function t(_,v){_.matrixAutoUpdate===!0&&_.updateMatrix(),v.value.copy(_.matrix)}function n(_,v){v.color.getRGB(_.fogColor.value,l_(i)),v.isFog?(_.fogNear.value=v.near,_.fogFar.value=v.far):v.isFogExp2&&(_.fogDensity.value=v.density)}function r(_,v,S,y,x){v.isMeshBasicMaterial||v.isMeshLambertMaterial?o(_,v):v.isMeshToonMaterial?(o(_,v),p(_,v)):v.isMeshPhongMaterial?(o(_,v),d(_,v)):v.isMeshStandardMaterial?(o(_,v),A(_,v),v.isMeshPhysicalMaterial&&g(_,v,x)):v.isMeshMatcapMaterial?(o(_,v),E(_,v)):v.isMeshDepthMaterial?o(_,v):v.isMeshDistanceMaterial?(o(_,v),C(_,v)):v.isMeshNormalMaterial?o(_,v):v.isLineBasicMaterial?(l(_,v),v.isLineDashedMaterial&&c(_,v)):v.isPointsMaterial?f(_,v,S,y):v.isSpriteMaterial?u(_,v):v.isShadowMaterial?(_.color.value.copy(v.color),_.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function o(_,v){_.opacity.value=v.opacity,v.color&&_.diffuse.value.copy(v.color),v.emissive&&_.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(_.map.value=v.map,t(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,t(v.alphaMap,_.alphaMapTransform)),v.bumpMap&&(_.bumpMap.value=v.bumpMap,t(v.bumpMap,_.bumpMapTransform),_.bumpScale.value=v.bumpScale,v.side===Bn&&(_.bumpScale.value*=-1)),v.normalMap&&(_.normalMap.value=v.normalMap,t(v.normalMap,_.normalMapTransform),_.normalScale.value.copy(v.normalScale),v.side===Bn&&_.normalScale.value.negate()),v.displacementMap&&(_.displacementMap.value=v.displacementMap,t(v.displacementMap,_.displacementMapTransform),_.displacementScale.value=v.displacementScale,_.displacementBias.value=v.displacementBias),v.emissiveMap&&(_.emissiveMap.value=v.emissiveMap,t(v.emissiveMap,_.emissiveMapTransform)),v.specularMap&&(_.specularMap.value=v.specularMap,t(v.specularMap,_.specularMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest);const S=e.get(v).envMap;if(S&&(_.envMap.value=S,_.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=v.reflectivity,_.ior.value=v.ior,_.refractionRatio.value=v.refractionRatio),v.lightMap){_.lightMap.value=v.lightMap;const y=i._useLegacyLights===!0?Math.PI:1;_.lightMapIntensity.value=v.lightMapIntensity*y,t(v.lightMap,_.lightMapTransform)}v.aoMap&&(_.aoMap.value=v.aoMap,_.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,_.aoMapTransform))}function l(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,v.map&&(_.map.value=v.map,t(v.map,_.mapTransform))}function c(_,v){_.dashSize.value=v.dashSize,_.totalSize.value=v.dashSize+v.gapSize,_.scale.value=v.scale}function f(_,v,S,y){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.size.value=v.size*S,_.scale.value=y*.5,v.map&&(_.map.value=v.map,t(v.map,_.uvTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,t(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function u(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.rotation.value=v.rotation,v.map&&(_.map.value=v.map,t(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,t(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function d(_,v){_.specular.value.copy(v.specular),_.shininess.value=Math.max(v.shininess,1e-4)}function p(_,v){v.gradientMap&&(_.gradientMap.value=v.gradientMap)}function A(_,v){_.metalness.value=v.metalness,v.metalnessMap&&(_.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,_.metalnessMapTransform)),_.roughness.value=v.roughness,v.roughnessMap&&(_.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,_.roughnessMapTransform)),e.get(v).envMap&&(_.envMapIntensity.value=v.envMapIntensity)}function g(_,v,S){_.ior.value=v.ior,v.sheen>0&&(_.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),_.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(_.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,_.sheenColorMapTransform)),v.sheenRoughnessMap&&(_.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,_.sheenRoughnessMapTransform))),v.clearcoat>0&&(_.clearcoat.value=v.clearcoat,_.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(_.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,_.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(_.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Bn&&_.clearcoatNormalScale.value.negate())),v.iridescence>0&&(_.iridescence.value=v.iridescence,_.iridescenceIOR.value=v.iridescenceIOR,_.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(_.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,_.iridescenceMapTransform)),v.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),v.transmission>0&&(_.transmission.value=v.transmission,_.transmissionSamplerMap.value=S.texture,_.transmissionSamplerSize.value.set(S.width,S.height),v.transmissionMap&&(_.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,_.transmissionMapTransform)),_.thickness.value=v.thickness,v.thicknessMap&&(_.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=v.attenuationDistance,_.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(_.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(_.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,_.anisotropyMapTransform))),_.specularIntensity.value=v.specularIntensity,_.specularColor.value.copy(v.specularColor),v.specularColorMap&&(_.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,_.specularColorMapTransform)),v.specularIntensityMap&&(_.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,_.specularIntensityMapTransform))}function E(_,v){v.matcap&&(_.matcap.value=v.matcap)}function C(_,v){const S=e.get(v).light;_.referencePosition.value.setFromMatrixPosition(S.matrixWorld),_.nearDistance.value=S.shadow.camera.near,_.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:r}}function UR(i,e,t,n){let r={},o={},l=[];const c=t.isWebGL2?i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS):0;function f(S,y){const x=y.program;n.uniformBlockBinding(S,x)}function u(S,y){let x=r[S.id];x===void 0&&(E(S),x=d(S),r[S.id]=x,S.addEventListener("dispose",_));const w=y.program;n.updateUBOMapping(S,w);const b=e.render.frame;o[S.id]!==b&&(A(S),o[S.id]=b)}function d(S){const y=p();S.__bindingPointIndex=y;const x=i.createBuffer(),w=S.__size,b=S.usage;return i.bindBuffer(i.UNIFORM_BUFFER,x),i.bufferData(i.UNIFORM_BUFFER,w,b),i.bindBuffer(i.UNIFORM_BUFFER,null),i.bindBufferBase(i.UNIFORM_BUFFER,y,x),x}function p(){for(let S=0;S<c;S++)if(l.indexOf(S)===-1)return l.push(S),S;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function A(S){const y=r[S.id],x=S.uniforms,w=S.__cache;i.bindBuffer(i.UNIFORM_BUFFER,y);for(let b=0,B=x.length;b<B;b++){const L=x[b];if(g(L,b,w)===!0){const R=L.__offset,T=Array.isArray(L.value)?L.value:[L.value];let N=0;for(let k=0;k<T.length;k++){const O=T[k],F=C(O);typeof O=="number"?(L.__data[0]=O,i.bufferSubData(i.UNIFORM_BUFFER,R+N,L.__data)):O.isMatrix3?(L.__data[0]=O.elements[0],L.__data[1]=O.elements[1],L.__data[2]=O.elements[2],L.__data[3]=O.elements[0],L.__data[4]=O.elements[3],L.__data[5]=O.elements[4],L.__data[6]=O.elements[5],L.__data[7]=O.elements[0],L.__data[8]=O.elements[6],L.__data[9]=O.elements[7],L.__data[10]=O.elements[8],L.__data[11]=O.elements[0]):(O.toArray(L.__data,N),N+=F.storage/Float32Array.BYTES_PER_ELEMENT)}i.bufferSubData(i.UNIFORM_BUFFER,R,L.__data)}}i.bindBuffer(i.UNIFORM_BUFFER,null)}function g(S,y,x){const w=S.value;if(x[y]===void 0){if(typeof w=="number")x[y]=w;else{const b=Array.isArray(w)?w:[w],B=[];for(let L=0;L<b.length;L++)B.push(b[L].clone());x[y]=B}return!0}else if(typeof w=="number"){if(x[y]!==w)return x[y]=w,!0}else{const b=Array.isArray(x[y])?x[y]:[x[y]],B=Array.isArray(w)?w:[w];for(let L=0;L<b.length;L++){const R=b[L];if(R.equals(B[L])===!1)return R.copy(B[L]),!0}}return!1}function E(S){const y=S.uniforms;let x=0;const w=16;let b=0;for(let B=0,L=y.length;B<L;B++){const R=y[B],T={boundary:0,storage:0},N=Array.isArray(R.value)?R.value:[R.value];for(let k=0,O=N.length;k<O;k++){const F=N[k],V=C(F);T.boundary+=V.boundary,T.storage+=V.storage}if(R.__data=new Float32Array(T.storage/Float32Array.BYTES_PER_ELEMENT),R.__offset=x,B>0){b=x%w;const k=w-b;b!==0&&k-T.boundary<0&&(x+=w-b,R.__offset=x)}x+=T.storage}return b=x%w,b>0&&(x+=w-b),S.__size=x,S.__cache={},this}function C(S){const y={boundary:0,storage:0};return typeof S=="number"?(y.boundary=4,y.storage=4):S.isVector2?(y.boundary=8,y.storage=8):S.isVector3||S.isColor?(y.boundary=16,y.storage=12):S.isVector4?(y.boundary=16,y.storage=16):S.isMatrix3?(y.boundary=48,y.storage=48):S.isMatrix4?(y.boundary=64,y.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),y}function _(S){const y=S.target;y.removeEventListener("dispose",_);const x=l.indexOf(y.__bindingPointIndex);l.splice(x,1),i.deleteBuffer(r[y.id]),delete r[y.id],delete o[y.id]}function v(){for(const S in r)i.deleteBuffer(r[S]);l=[],r={},o={}}return{bind:f,update:u,dispose:v}}class Q_{constructor(e={}){const{canvas:t=A3(),context:n=null,depth:r=!0,stencil:o=!0,alpha:l=!1,antialias:c=!1,premultipliedAlpha:f=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:p=!1}=e;this.isWebGLRenderer=!0;let A;n!==null?A=n.getContextAttributes().alpha:A=l;const g=new Uint32Array(4),E=new Int32Array(4);let C=null,_=null;const v=[],S=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Xt,this._useLegacyLights=!1,this.toneMapping=hs,this.toneMappingExposure=1;const y=this;let x=!1,w=0,b=0,B=null,L=-1,R=null;const T=new Gt,N=new Gt;let k=null;const O=new tt(0);let F=0,V=t.width,X=t.height,te=1,Y=null,$=null;const U=new Gt(0,0,V,X),D=new Gt(0,0,V,X);let G=!1;const K=new DA;let J=!1,Ae=!1,ge=null;const be=new ct,de=new Ke,Oe=new j,It={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ot(){return B===null?te:1}let oe=n;function Mt(z,re){for(let ce=0;ce<z.length;ce++){const ue=z[ce],fe=t.getContext(ue,re);if(fe!==null)return fe}return null}try{const z={alpha:!0,depth:r,stencil:o,antialias:c,premultipliedAlpha:f,preserveDrawingBuffer:u,powerPreference:d,failIfMajorPerformanceCaveat:p};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${su}`),t.addEventListener("webglcontextlost",dt,!1),t.addEventListener("webglcontextrestored",ee,!1),t.addEventListener("webglcontextcreationerror",Te,!1),oe===null){const re=["webgl2","webgl","experimental-webgl"];if(y.isWebGL1Renderer===!0&&re.shift(),oe=Mt(re,z),oe===null)throw Mt(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext<"u"&&oe instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),oe.getShaderPrecisionFormat===void 0&&(oe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(z){throw console.error("THREE.WebGLRenderer: "+z.message),z}let Ne,Ze,_e,it,Ue,He,$e,at,At,H,Q,se,Ce,me,xe,We,Se,Re,q,Me,pe,nt,je,Je;function Ge(){Ne=new Y4(oe),Ze=new z4(oe,Ne,e),Ne.init(Ze),nt=new RR(oe,Ne,Ze),_e=new TR(oe,Ne,Ze),it=new K4(oe),Ue=new pR,He=new BR(oe,Ne,_e,Ue,Ze,nt,it),$e=new H4(y),at=new j4(y),At=new O3(oe,Ze),je=new Q4(oe,Ne,At,Ze),H=new q4(oe,At,it,je),Q=new eB(oe,H,At,it),q=new $4(oe,Ze,He),We=new G4(Ue),se=new AR(y,$e,at,Ne,Ze,je,We),Ce=new PR(y,Ue),me=new mR,xe=new IR(Ne,Ze),Re=new F4(y,$e,at,_e,Q,A,f),Se=new MR(y,Q,Ze),Je=new UR(oe,it,Ze,_e),Me=new O4(oe,Ne,it,Ze),pe=new X4(oe,Ne,it,Ze),it.programs=se.programs,y.capabilities=Ze,y.extensions=Ne,y.properties=Ue,y.renderLists=me,y.shadowMap=Se,y.state=_e,y.info=it}Ge();const Pe=new NR(y,oe);this.xr=Pe,this.getContext=function(){return oe},this.getContextAttributes=function(){return oe.getContextAttributes()},this.forceContextLoss=function(){const z=Ne.get("WEBGL_lose_context");z&&z.loseContext()},this.forceContextRestore=function(){const z=Ne.get("WEBGL_lose_context");z&&z.restoreContext()},this.getPixelRatio=function(){return te},this.setPixelRatio=function(z){z!==void 0&&(te=z,this.setSize(V,X,!1))},this.getSize=function(z){return z.set(V,X)},this.setSize=function(z,re,ce=!0){if(Pe.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}V=z,X=re,t.width=Math.floor(z*te),t.height=Math.floor(re*te),ce===!0&&(t.style.width=z+"px",t.style.height=re+"px"),this.setViewport(0,0,z,re)},this.getDrawingBufferSize=function(z){return z.set(V*te,X*te).floor()},this.setDrawingBufferSize=function(z,re,ce){V=z,X=re,te=ce,t.width=Math.floor(z*ce),t.height=Math.floor(re*ce),this.setViewport(0,0,z,re)},this.getCurrentViewport=function(z){return z.copy(T)},this.getViewport=function(z){return z.copy(U)},this.setViewport=function(z,re,ce,ue){z.isVector4?U.set(z.x,z.y,z.z,z.w):U.set(z,re,ce,ue),_e.viewport(T.copy(U).multiplyScalar(te).floor())},this.getScissor=function(z){return z.copy(D)},this.setScissor=function(z,re,ce,ue){z.isVector4?D.set(z.x,z.y,z.z,z.w):D.set(z,re,ce,ue),_e.scissor(N.copy(D).multiplyScalar(te).floor())},this.getScissorTest=function(){return G},this.setScissorTest=function(z){_e.setScissorTest(G=z)},this.setOpaqueSort=function(z){Y=z},this.setTransparentSort=function(z){$=z},this.getClearColor=function(z){return z.copy(Re.getClearColor())},this.setClearColor=function(){Re.setClearColor.apply(Re,arguments)},this.getClearAlpha=function(){return Re.getClearAlpha()},this.setClearAlpha=function(){Re.setClearAlpha.apply(Re,arguments)},this.clear=function(z=!0,re=!0,ce=!0){let ue=0;if(z){let fe=!1;if(B!==null){const ke=B.texture.format;fe=ke===Nl||ke===fu||ke===eA}if(fe){const ke=B.texture.type,et=ke===fn||ke===yi||ke===uu||ke===oo||ke===o1||ke===a1,lt=Re.getClearColor(),Qe=Re.getClearAlpha(),gt=lt.r,ft=lt.g,ht=lt.b;et?(g[0]=gt,g[1]=ft,g[2]=ht,g[3]=Qe,oe.clearBufferuiv(oe.COLOR,0,g)):(E[0]=gt,E[1]=ft,E[2]=ht,E[3]=Qe,oe.clearBufferiv(oe.COLOR,0,E))}else ue|=oe.COLOR_BUFFER_BIT}re&&(ue|=oe.DEPTH_BUFFER_BIT),ce&&(ue|=oe.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),oe.clear(ue)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",dt,!1),t.removeEventListener("webglcontextrestored",ee,!1),t.removeEventListener("webglcontextcreationerror",Te,!1),me.dispose(),xe.dispose(),Ue.dispose(),$e.dispose(),at.dispose(),Q.dispose(),je.dispose(),Je.dispose(),se.dispose(),Pe.dispose(),Pe.removeEventListener("sessionstart",Dn),Pe.removeEventListener("sessionend",Tt),ge&&(ge.dispose(),ge=null),an.stop()};function dt(z){z.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function ee(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;const z=it.autoReset,re=Se.enabled,ce=Se.autoUpdate,ue=Se.needsUpdate,fe=Se.type;Ge(),it.autoReset=z,Se.enabled=re,Se.autoUpdate=ce,Se.needsUpdate=ue,Se.type=fe}function Te(z){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",z.statusMessage)}function ye(z){const re=z.target;re.removeEventListener("dispose",ye),he(re)}function he(z){we(z),Ue.remove(z)}function we(z){const re=Ue.get(z).programs;re!==void 0&&(re.forEach(function(ce){se.releaseProgram(ce)}),z.isShaderMaterial&&se.releaseShaderCache(z))}this.renderBufferDirect=function(z,re,ce,ue,fe,ke){re===null&&(re=It);const et=fe.isMesh&&fe.matrixWorld.determinant()<0,lt=Wp(z,re,ce,ue,fe);_e.setMaterial(ue,et);let Qe=ce.index,gt=1;if(ue.wireframe===!0){if(Qe=H.getWireframeAttribute(ce),Qe===void 0)return;gt=2}const ft=ce.drawRange,ht=ce.attributes.position;let jt=ft.start*gt,ii=(ft.start+ft.count)*gt;ke!==null&&(jt=Math.max(jt,ke.start*gt),ii=Math.min(ii,(ke.start+ke.count)*gt)),Qe!==null?(jt=Math.max(jt,0),ii=Math.min(ii,Qe.count)):ht!=null&&(jt=Math.max(jt,0),ii=Math.min(ii,ht.count));const dn=ii-jt;if(dn<0||dn===1/0)return;je.setup(fe,ue,lt,ce,Qe);let di,Bt=Me;if(Qe!==null&&(di=At.get(Qe),Bt=pe,Bt.setIndex(di)),fe.isMesh)ue.wireframe===!0?(_e.setLineWidth(ue.wireframeLinewidth*ot()),Bt.setMode(oe.LINES)):Bt.setMode(oe.TRIANGLES);else if(fe.isLine){let Et=ue.linewidth;Et===void 0&&(Et=1),_e.setLineWidth(Et*ot()),fe.isLineSegments?Bt.setMode(oe.LINES):fe.isLineLoop?Bt.setMode(oe.LINE_LOOP):Bt.setMode(oe.LINE_STRIP)}else fe.isPoints?Bt.setMode(oe.POINTS):fe.isSprite&&Bt.setMode(oe.TRIANGLES);if(fe.isInstancedMesh)Bt.renderInstances(jt,dn,fe.count);else if(ce.isInstancedBufferGeometry){const Et=ce._maxInstanceCount!==void 0?ce._maxInstanceCount:1/0,ri=Math.min(ce.instanceCount,Et);Bt.renderInstances(jt,dn,ri)}else Bt.render(jt,dn)};function qe(z,re,ce){z.transparent===!0&&z.side===Yi&&z.forceSinglePass===!1?(z.side=Bn,z.needsUpdate=!0,ws(z,re,ce),z.side=ji,z.needsUpdate=!0,ws(z,re,ce),z.side=Yi):ws(z,re,ce)}this.compile=function(z,re,ce=null){ce===null&&(ce=z),_=xe.get(ce),_.init(),S.push(_),ce.traverseVisible(function(fe){fe.isLight&&fe.layers.test(re.layers)&&(_.pushLight(fe),fe.castShadow&&_.pushShadow(fe))}),z!==ce&&z.traverseVisible(function(fe){fe.isLight&&fe.layers.test(re.layers)&&(_.pushLight(fe),fe.castShadow&&_.pushShadow(fe))}),_.setupLights(y._useLegacyLights);const ue=new Set;return z.traverse(function(fe){const ke=fe.material;if(ke)if(Array.isArray(ke))for(let et=0;et<ke.length;et++){const lt=ke[et];qe(lt,ce,fe),ue.add(lt)}else qe(ke,ce,fe),ue.add(ke)}),S.pop(),_=null,ue},this.compileAsync=function(z,re,ce=null){const ue=this.compile(z,re,ce);return new Promise(fe=>{function ke(){if(ue.forEach(function(et){Ue.get(et).currentProgram.isReady()&&ue.delete(et)}),ue.size===0){fe(z);return}setTimeout(ke,10)}Ne.get("KHR_parallel_shader_compile")!==null?ke():setTimeout(ke,10)})};let pt=null;function Wt(z){pt&&pt(z)}function Dn(){an.stop()}function Tt(){an.start()}const an=new f_;an.setAnimationLoop(Wt),typeof self<"u"&&an.setContext(self),this.setAnimationLoop=function(z){pt=z,Pe.setAnimationLoop(z),z===null?an.stop():an.start()},Pe.addEventListener("sessionstart",Dn),Pe.addEventListener("sessionend",Tt),this.render=function(z,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;z.matrixWorldAutoUpdate===!0&&z.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),Pe.enabled===!0&&Pe.isPresenting===!0&&(Pe.cameraAutoUpdate===!0&&Pe.updateCamera(re),re=Pe.getCamera()),z.isScene===!0&&z.onBeforeRender(y,z,re,B),_=xe.get(z,S.length),_.init(),S.push(_),be.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),K.setFromProjectionMatrix(be),Ae=this.localClippingEnabled,J=We.init(this.clippingPlanes,Ae),C=me.get(z,v.length),C.init(),v.push(C),Pt(z,re,0,y.sortObjects),C.finish(),y.sortObjects===!0&&C.sort(Y,$),this.info.render.frame++,J===!0&&We.beginShadows();const ce=_.state.shadowsArray;if(Se.render(ce,z,re),J===!0&&We.endShadows(),this.info.autoReset===!0&&this.info.reset(),Re.render(C,z),_.setupLights(y._useLegacyLights),re.isArrayCamera){const ue=re.cameras;for(let fe=0,ke=ue.length;fe<ke;fe++){const et=ue[fe];Ti(C,z,et,et.viewport)}}else Ti(C,z,re);B!==null&&(He.updateMultisampleRenderTarget(B),He.updateRenderTargetMipmap(B)),z.isScene===!0&&z.onAfterRender(y,z,re),je.resetDefaultState(),L=-1,R=null,S.pop(),S.length>0?_=S[S.length-1]:_=null,v.pop(),v.length>0?C=v[v.length-1]:C=null};function Pt(z,re,ce,ue){if(z.visible===!1)return;if(z.layers.test(re.layers)){if(z.isGroup)ce=z.renderOrder;else if(z.isLOD)z.autoUpdate===!0&&z.update(re);else if(z.isLight)_.pushLight(z),z.castShadow&&_.pushShadow(z);else if(z.isSprite){if(!z.frustumCulled||K.intersectsSprite(z)){ue&&Oe.setFromMatrixPosition(z.matrixWorld).applyMatrix4(be);const et=Q.update(z),lt=z.material;lt.visible&&C.push(z,et,lt,ce,Oe.z,null)}}else if((z.isMesh||z.isLine||z.isPoints)&&(!z.frustumCulled||K.intersectsObject(z))){const et=Q.update(z),lt=z.material;if(ue&&(z.boundingSphere!==void 0?(z.boundingSphere===null&&z.computeBoundingSphere(),Oe.copy(z.boundingSphere.center)):(et.boundingSphere===null&&et.computeBoundingSphere(),Oe.copy(et.boundingSphere.center)),Oe.applyMatrix4(z.matrixWorld).applyMatrix4(be)),Array.isArray(lt)){const Qe=et.groups;for(let gt=0,ft=Qe.length;gt<ft;gt++){const ht=Qe[gt],jt=lt[ht.materialIndex];jt&&jt.visible&&C.push(z,et,jt,ce,Oe.z,ht)}}else lt.visible&&C.push(z,et,lt,ce,Oe.z,null)}}const ke=z.children;for(let et=0,lt=ke.length;et<lt;et++)Pt(ke[et],re,ce,ue)}function Ti(z,re,ce,ue){const fe=z.opaque,ke=z.transmissive,et=z.transparent;_.setupLightsView(ce),J===!0&&We.setGlobalState(y.clippingPlanes,ce),ke.length>0&&Cr(fe,ke,re,ce),ue&&_e.viewport(T.copy(ue)),fe.length>0&&ir(fe,re,ce),ke.length>0&&ir(ke,re,ce),et.length>0&&ir(et,re,ce),_e.buffers.depth.setTest(!0),_e.buffers.depth.setMask(!0),_e.buffers.color.setMask(!0),_e.setPolygonOffset(!1)}function Cr(z,re,ce,ue){if((ce.isScene===!0?ce.overrideMaterial:null)!==null)return;const ke=Ze.isWebGL2;ge===null&&(ge=new Xi(1,1,{generateMipmaps:!0,type:Ne.has("EXT_color_buffer_half_float")?Jn:fn,minFilter:Pr,samples:ke?4:0})),y.getDrawingBufferSize(de),ke?ge.setSize(de.x,de.y):ge.setSize(yu(de.x),yu(de.y));const et=y.getRenderTarget();y.setRenderTarget(ge),y.getClearColor(O),F=y.getClearAlpha(),F<1&&y.setClearColor(16777215,.5),y.clear();const lt=y.toneMapping;y.toneMapping=hs,ir(z,ce,ue),He.updateMultisampleRenderTarget(ge),He.updateRenderTargetMipmap(ge);let Qe=!1;for(let gt=0,ft=re.length;gt<ft;gt++){const ht=re[gt],jt=ht.object,ii=ht.geometry,dn=ht.material,di=ht.group;if(dn.side===Yi&&jt.layers.test(ue.layers)){const Bt=dn.side;dn.side=Bn,dn.needsUpdate=!0,Co(jt,ce,ue,ii,dn,di),dn.side=Bt,dn.needsUpdate=!0,Qe=!0}}Qe===!0&&(He.updateMultisampleRenderTarget(ge),He.updateRenderTargetMipmap(ge)),y.setRenderTarget(et),y.setClearColor(O,F),y.toneMapping=lt}function ir(z,re,ce){const ue=re.isScene===!0?re.overrideMaterial:null;for(let fe=0,ke=z.length;fe<ke;fe++){const et=z[fe],lt=et.object,Qe=et.geometry,gt=ue===null?et.material:ue,ft=et.group;lt.layers.test(ce.layers)&&Co(lt,re,ce,Qe,gt,ft)}}function Co(z,re,ce,ue,fe,ke){z.onBeforeRender(y,re,ce,ue,fe,ke),z.modelViewMatrix.multiplyMatrices(ce.matrixWorldInverse,z.matrixWorld),z.normalMatrix.getNormalMatrix(z.modelViewMatrix),fe.onBeforeRender(y,re,ce,ue,z,ke),fe.transparent===!0&&fe.side===Yi&&fe.forceSinglePass===!1?(fe.side=Bn,fe.needsUpdate=!0,y.renderBufferDirect(ce,re,ue,fe,z,ke),fe.side=ji,fe.needsUpdate=!0,y.renderBufferDirect(ce,re,ue,fe,z,ke),fe.side=Yi):y.renderBufferDirect(ce,re,ue,fe,z,ke),z.onAfterRender(y,re,ce,ue,fe,ke)}function ws(z,re,ce){re.isScene!==!0&&(re=It);const ue=Ue.get(z),fe=_.state.lights,ke=_.state.shadowsArray,et=fe.state.version,lt=se.getParameters(z,fe.state,ke,re,ce),Qe=se.getProgramCacheKey(lt);let gt=ue.programs;ue.environment=z.isMeshStandardMaterial?re.environment:null,ue.fog=re.fog,ue.envMap=(z.isMeshStandardMaterial?at:$e).get(z.envMap||ue.environment),gt===void 0&&(z.addEventListener("dispose",ye),gt=new Map,ue.programs=gt);let ft=gt.get(Qe);if(ft!==void 0){if(ue.currentProgram===ft&&ue.lightsStateVersion===et)return Mf(z,lt),ft}else lt.uniforms=se.getUniforms(z),z.onBuild(ce,lt,y),z.onBeforeCompile(lt,y),ft=se.acquireProgram(lt,Qe),gt.set(Qe,ft),ue.uniforms=lt.uniforms;const ht=ue.uniforms;return(!z.isShaderMaterial&&!z.isRawShaderMaterial||z.clipping===!0)&&(ht.clippingPlanes=We.uniform),Mf(z,lt),ue.needsLights=Tf(z),ue.lightsStateVersion=et,ue.needsLights&&(ht.ambientLightColor.value=fe.state.ambient,ht.lightProbe.value=fe.state.probe,ht.directionalLights.value=fe.state.directional,ht.directionalLightShadows.value=fe.state.directionalShadow,ht.spotLights.value=fe.state.spot,ht.spotLightShadows.value=fe.state.spotShadow,ht.rectAreaLights.value=fe.state.rectArea,ht.ltc_1.value=fe.state.rectAreaLTC1,ht.ltc_2.value=fe.state.rectAreaLTC2,ht.pointLights.value=fe.state.point,ht.pointLightShadows.value=fe.state.pointShadow,ht.hemisphereLights.value=fe.state.hemi,ht.directionalShadowMap.value=fe.state.directionalShadowMap,ht.directionalShadowMatrix.value=fe.state.directionalShadowMatrix,ht.spotShadowMap.value=fe.state.spotShadowMap,ht.spotLightMatrix.value=fe.state.spotLightMatrix,ht.spotLightMap.value=fe.state.spotLightMap,ht.pointShadowMap.value=fe.state.pointShadowMap,ht.pointShadowMatrix.value=fe.state.pointShadowMatrix),ue.currentProgram=ft,ue.uniformsList=null,ft}function wf(z){if(z.uniformsList===null){const re=z.currentProgram.getUniforms();z.uniformsList=Xu.seqWithValue(re.seq,z.uniforms)}return z.uniformsList}function Mf(z,re){const ce=Ue.get(z);ce.outputColorSpace=re.outputColorSpace,ce.instancing=re.instancing,ce.instancingColor=re.instancingColor,ce.skinning=re.skinning,ce.morphTargets=re.morphTargets,ce.morphNormals=re.morphNormals,ce.morphColors=re.morphColors,ce.morphTargetsCount=re.morphTargetsCount,ce.numClippingPlanes=re.numClippingPlanes,ce.numIntersection=re.numClipIntersection,ce.vertexAlphas=re.vertexAlphas,ce.vertexTangents=re.vertexTangents,ce.toneMapping=re.toneMapping}function Wp(z,re,ce,ue,fe){re.isScene!==!0&&(re=It),He.resetTextureUnits();const ke=re.fog,et=ue.isMeshStandardMaterial?re.environment:null,lt=B===null?y.outputColorSpace:B.isXRRenderTarget===!0?B.texture.colorSpace:En,Qe=(ue.isMeshStandardMaterial?at:$e).get(ue.envMap||et),gt=ue.vertexColors===!0&&!!ce.attributes.color&&ce.attributes.color.itemSize===4,ft=!!ce.attributes.tangent&&(!!ue.normalMap||ue.anisotropy>0),ht=!!ce.morphAttributes.position,jt=!!ce.morphAttributes.normal,ii=!!ce.morphAttributes.color;let dn=hs;ue.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(dn=y.toneMapping);const di=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,Bt=di!==void 0?di.length:0,Et=Ue.get(ue),ri=_.state.lights;if(J===!0&&(Ae===!0||z!==R)){const si=z===R&&ue.id===L;We.setState(ue,z,si)}let ln=!1;ue.version===Et.__version?(Et.needsLights&&Et.lightsStateVersion!==ri.state.version||Et.outputColorSpace!==lt||fe.isInstancedMesh&&Et.instancing===!1||!fe.isInstancedMesh&&Et.instancing===!0||fe.isSkinnedMesh&&Et.skinning===!1||!fe.isSkinnedMesh&&Et.skinning===!0||fe.isInstancedMesh&&Et.instancingColor===!0&&fe.instanceColor===null||fe.isInstancedMesh&&Et.instancingColor===!1&&fe.instanceColor!==null||Et.envMap!==Qe||ue.fog===!0&&Et.fog!==ke||Et.numClippingPlanes!==void 0&&(Et.numClippingPlanes!==We.numPlanes||Et.numIntersection!==We.numIntersection)||Et.vertexAlphas!==gt||Et.vertexTangents!==ft||Et.morphTargets!==ht||Et.morphNormals!==jt||Et.morphColors!==ii||Et.toneMapping!==dn||Ze.isWebGL2===!0&&Et.morphTargetsCount!==Bt)&&(ln=!0):(ln=!0,Et.__version=ue.version);let Jr=Et.currentProgram;ln===!0&&(Jr=ws(ue,re,fe));let Bf=!1,Ir=!1,Ms=!1;const An=Jr.getUniforms(),Qi=Et.uniforms;if(_e.useProgram(Jr.program)&&(Bf=!0,Ir=!0,Ms=!0),ue.id!==L&&(L=ue.id,Ir=!0),Bf||R!==z){An.setValue(oe,"projectionMatrix",z.projectionMatrix),An.setValue(oe,"viewMatrix",z.matrixWorldInverse);const si=An.map.cameraPosition;si!==void 0&&si.setValue(oe,Oe.setFromMatrixPosition(z.matrixWorld)),Ze.logarithmicDepthBuffer&&An.setValue(oe,"logDepthBufFC",2/(Math.log(z.far+1)/Math.LN2)),(ue.isMeshPhongMaterial||ue.isMeshToonMaterial||ue.isMeshLambertMaterial||ue.isMeshBasicMaterial||ue.isMeshStandardMaterial||ue.isShaderMaterial)&&An.setValue(oe,"isOrthographic",z.isOrthographicCamera===!0),R!==z&&(R=z,Ir=!0,Ms=!0)}if(fe.isSkinnedMesh){An.setOptional(oe,fe,"bindMatrix"),An.setOptional(oe,fe,"bindMatrixInverse");const si=fe.skeleton;si&&(Ze.floatVertexTextures?(si.boneTexture===null&&si.computeBoneTexture(),An.setValue(oe,"boneTexture",si.boneTexture,He),An.setValue(oe,"boneTextureSize",si.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const uc=ce.morphAttributes;if((uc.position!==void 0||uc.normal!==void 0||uc.color!==void 0&&Ze.isWebGL2===!0)&&q.update(fe,ce,Jr),(Ir||Et.receiveShadow!==fe.receiveShadow)&&(Et.receiveShadow=fe.receiveShadow,An.setValue(oe,"receiveShadow",fe.receiveShadow)),ue.isMeshGouraudMaterial&&ue.envMap!==null&&(Qi.envMap.value=Qe,Qi.flipEnvMap.value=Qe.isCubeTexture&&Qe.isRenderTargetTexture===!1?-1:1),Ir&&(An.setValue(oe,"toneMappingExposure",y.toneMappingExposure),Et.needsLights&&Kr(Qi,Ms),ke&&ue.fog===!0&&Ce.refreshFogUniforms(Qi,ke),Ce.refreshMaterialUniforms(Qi,ue,te,X,ge),Xu.upload(oe,wf(Et),Qi,He)),ue.isShaderMaterial&&ue.uniformsNeedUpdate===!0&&(Xu.upload(oe,wf(Et),Qi,He),ue.uniformsNeedUpdate=!1),ue.isSpriteMaterial&&An.setValue(oe,"center",fe.center),An.setValue(oe,"modelViewMatrix",fe.modelViewMatrix),An.setValue(oe,"normalMatrix",fe.normalMatrix),An.setValue(oe,"modelMatrix",fe.matrixWorld),ue.isShaderMaterial||ue.isRawShaderMaterial){const si=ue.uniformsGroups;for(let Io=0,Rf=si.length;Io<Rf;Io++)if(Ze.isWebGL2){const Ga=si[Io];Je.update(Ga,Jr),Je.bind(Ga,Jr)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return Jr}function Kr(z,re){z.ambientLightColor.needsUpdate=re,z.lightProbe.needsUpdate=re,z.directionalLights.needsUpdate=re,z.directionalLightShadows.needsUpdate=re,z.pointLights.needsUpdate=re,z.pointLightShadows.needsUpdate=re,z.spotLights.needsUpdate=re,z.spotLightShadows.needsUpdate=re,z.rectAreaLights.needsUpdate=re,z.hemisphereLights.needsUpdate=re}function Tf(z){return z.isMeshLambertMaterial||z.isMeshToonMaterial||z.isMeshPhongMaterial||z.isMeshStandardMaterial||z.isShadowMaterial||z.isShaderMaterial&&z.lights===!0}this.getActiveCubeFace=function(){return w},this.getActiveMipmapLevel=function(){return b},this.getRenderTarget=function(){return B},this.setRenderTargetTextures=function(z,re,ce){Ue.get(z.texture).__webglTexture=re,Ue.get(z.depthTexture).__webglTexture=ce;const ue=Ue.get(z);ue.__hasExternalTextures=!0,ue.__hasExternalTextures&&(ue.__autoAllocateDepthBuffer=ce===void 0,ue.__autoAllocateDepthBuffer||Ne.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ue.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(z,re){const ce=Ue.get(z);ce.__webglFramebuffer=re,ce.__useDefaultFramebuffer=re===void 0},this.setRenderTarget=function(z,re=0,ce=0){B=z,w=re,b=ce;let ue=!0,fe=null,ke=!1,et=!1;if(z){const Qe=Ue.get(z);Qe.__useDefaultFramebuffer!==void 0?(_e.bindFramebuffer(oe.FRAMEBUFFER,null),ue=!1):Qe.__webglFramebuffer===void 0?He.setupRenderTarget(z):Qe.__hasExternalTextures&&He.rebindTextures(z,Ue.get(z.texture).__webglTexture,Ue.get(z.depthTexture).__webglTexture);const gt=z.texture;(gt.isData3DTexture||gt.isDataArrayTexture||gt.isCompressedArrayTexture)&&(et=!0);const ft=Ue.get(z).__webglFramebuffer;z.isWebGLCubeRenderTarget?(Array.isArray(ft[re])?fe=ft[re][ce]:fe=ft[re],ke=!0):Ze.isWebGL2&&z.samples>0&&He.useMultisampledRTT(z)===!1?fe=Ue.get(z).__webglMultisampledFramebuffer:Array.isArray(ft)?fe=ft[ce]:fe=ft,T.copy(z.viewport),N.copy(z.scissor),k=z.scissorTest}else T.copy(U).multiplyScalar(te).floor(),N.copy(D).multiplyScalar(te).floor(),k=G;if(_e.bindFramebuffer(oe.FRAMEBUFFER,fe)&&Ze.drawBuffers&&ue&&_e.drawBuffers(z,fe),_e.viewport(T),_e.scissor(N),_e.setScissorTest(k),ke){const Qe=Ue.get(z.texture);oe.framebufferTexture2D(oe.FRAMEBUFFER,oe.COLOR_ATTACHMENT0,oe.TEXTURE_CUBE_MAP_POSITIVE_X+re,Qe.__webglTexture,ce)}else if(et){const Qe=Ue.get(z.texture),gt=re||0;oe.framebufferTextureLayer(oe.FRAMEBUFFER,oe.COLOR_ATTACHMENT0,Qe.__webglTexture,ce||0,gt)}L=-1},this.readRenderTargetPixels=function(z,re,ce,ue,fe,ke,et){if(!(z&&z.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let lt=Ue.get(z).__webglFramebuffer;if(z.isWebGLCubeRenderTarget&&et!==void 0&&(lt=lt[et]),lt){_e.bindFramebuffer(oe.FRAMEBUFFER,lt);try{const Qe=z.texture,gt=Qe.format,ft=Qe.type;if(gt!==on&&nt.convert(gt)!==oe.getParameter(oe.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ht=ft===Jn&&(Ne.has("EXT_color_buffer_half_float")||Ze.isWebGL2&&Ne.has("EXT_color_buffer_float"));if(ft!==fn&&nt.convert(ft)!==oe.getParameter(oe.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ft===hn&&(Ze.isWebGL2||Ne.has("OES_texture_float")||Ne.has("WEBGL_color_buffer_float")))&&!ht){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=z.width-ue&&ce>=0&&ce<=z.height-fe&&oe.readPixels(re,ce,ue,fe,nt.convert(gt),nt.convert(ft),ke)}finally{const Qe=B!==null?Ue.get(B).__webglFramebuffer:null;_e.bindFramebuffer(oe.FRAMEBUFFER,Qe)}}},this.copyFramebufferToTexture=function(z,re,ce=0){const ue=Math.pow(2,-ce),fe=Math.floor(re.image.width*ue),ke=Math.floor(re.image.height*ue);He.setTexture2D(re,0),oe.copyTexSubImage2D(oe.TEXTURE_2D,ce,0,0,z.x,z.y,fe,ke),_e.unbindTexture()},this.copyTextureToTexture=function(z,re,ce,ue=0){const fe=re.image.width,ke=re.image.height,et=nt.convert(ce.format),lt=nt.convert(ce.type);He.setTexture2D(ce,0),oe.pixelStorei(oe.UNPACK_FLIP_Y_WEBGL,ce.flipY),oe.pixelStorei(oe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),oe.pixelStorei(oe.UNPACK_ALIGNMENT,ce.unpackAlignment),re.isDataTexture?oe.texSubImage2D(oe.TEXTURE_2D,ue,z.x,z.y,fe,ke,et,lt,re.image.data):re.isCompressedTexture?oe.compressedTexSubImage2D(oe.TEXTURE_2D,ue,z.x,z.y,re.mipmaps[0].width,re.mipmaps[0].height,et,re.mipmaps[0].data):oe.texSubImage2D(oe.TEXTURE_2D,ue,z.x,z.y,et,lt,re.image),ue===0&&ce.generateMipmaps&&oe.generateMipmap(oe.TEXTURE_2D),_e.unbindTexture()},this.copyTextureToTexture3D=function(z,re,ce,ue,fe=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const ke=z.max.x-z.min.x+1,et=z.max.y-z.min.y+1,lt=z.max.z-z.min.z+1,Qe=nt.convert(ue.format),gt=nt.convert(ue.type);let ft;if(ue.isData3DTexture)He.setTexture3D(ue,0),ft=oe.TEXTURE_3D;else if(ue.isDataArrayTexture)He.setTexture2DArray(ue,0),ft=oe.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}oe.pixelStorei(oe.UNPACK_FLIP_Y_WEBGL,ue.flipY),oe.pixelStorei(oe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ue.premultiplyAlpha),oe.pixelStorei(oe.UNPACK_ALIGNMENT,ue.unpackAlignment);const ht=oe.getParameter(oe.UNPACK_ROW_LENGTH),jt=oe.getParameter(oe.UNPACK_IMAGE_HEIGHT),ii=oe.getParameter(oe.UNPACK_SKIP_PIXELS),dn=oe.getParameter(oe.UNPACK_SKIP_ROWS),di=oe.getParameter(oe.UNPACK_SKIP_IMAGES),Bt=ce.isCompressedTexture?ce.mipmaps[0]:ce.image;oe.pixelStorei(oe.UNPACK_ROW_LENGTH,Bt.width),oe.pixelStorei(oe.UNPACK_IMAGE_HEIGHT,Bt.height),oe.pixelStorei(oe.UNPACK_SKIP_PIXELS,z.min.x),oe.pixelStorei(oe.UNPACK_SKIP_ROWS,z.min.y),oe.pixelStorei(oe.UNPACK_SKIP_IMAGES,z.min.z),ce.isDataTexture||ce.isData3DTexture?oe.texSubImage3D(ft,fe,re.x,re.y,re.z,ke,et,lt,Qe,gt,Bt.data):ce.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),oe.compressedTexSubImage3D(ft,fe,re.x,re.y,re.z,ke,et,lt,Qe,Bt.data)):oe.texSubImage3D(ft,fe,re.x,re.y,re.z,ke,et,lt,Qe,gt,Bt),oe.pixelStorei(oe.UNPACK_ROW_LENGTH,ht),oe.pixelStorei(oe.UNPACK_IMAGE_HEIGHT,jt),oe.pixelStorei(oe.UNPACK_SKIP_PIXELS,ii),oe.pixelStorei(oe.UNPACK_SKIP_ROWS,dn),oe.pixelStorei(oe.UNPACK_SKIP_IMAGES,di),fe===0&&ue.generateMipmaps&&oe.generateMipmap(ft),_e.unbindTexture()},this.initTexture=function(z){z.isCubeTexture?He.setTextureCube(z,0):z.isData3DTexture?He.setTexture3D(z,0):z.isDataArrayTexture||z.isCompressedArrayTexture?He.setTexture2DArray(z,0):He.setTexture2D(z,0),_e.unbindTexture()},this.resetState=function(){w=0,b=0,B=null,_e.reset(),je.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ur}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===gu?"display-p3":"srgb",t.unpackColorSpace=Nt.workingColorSpace===Ul?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Xt?uo:L1}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===uo?Xt:En}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class kR extends Q_{}kR.prototype.isWebGL1Renderer=!0;class FR extends tn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class QR{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=uA,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=qi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,o=this.stride;r<o;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=qi()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=qi()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ei=new j;class GA{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix4(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyNormalMatrix(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.transformDirection(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}setX(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Ot(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Ar(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Ar(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Ar(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Ar(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),n=Ot(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),n=Ot(n,this.array),r=Ot(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e=e*this.data.stride+this.offset,this.normalized&&(t=Ot(t,this.array),n=Ot(n,this.array),r=Ot(r,this.array),o=Ot(o,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=o,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[r+o])}return new bn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new GA(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[r+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const O_=new j,z_=new Gt,G_=new Gt,OR=new j,H_=new ct,Ku=new j,HA=new Ji,V_=new ct,VA=new Hl;class zR extends Wn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=n1,this.bindMatrix=new ct,this.bindMatrixInverse=new ct,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new gn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ku),this.boundingBox.expandByPoint(Ku)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ji),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Ku),this.boundingSphere.expandByPoint(Ku)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),HA.copy(this.boundingSphere),HA.applyMatrix4(r),e.ray.intersectsSphere(HA)!==!1&&(V_.copy(r).invert(),VA.copy(e.ray).applyMatrix4(V_),!(this.boundingBox!==null&&VA.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,VA)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Gt,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===n1?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===kM?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;z_.fromBufferAttribute(r.attributes.skinIndex,e),G_.fromBufferAttribute(r.attributes.skinWeight,e),O_.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let o=0;o<4;o++){const l=G_.getComponent(o);if(l!==0){const c=z_.getComponent(o);H_.multiplyMatrices(n.bones[c].matrixWorld,n.boneInverses[c]),t.addScaledVector(OR.copy(O_).applyMatrix4(H_),l)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class W_ extends tn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class _a extends Rn{constructor(e=null,t=1,n=1,r,o,l,c,f,u=qt,d=qt,p,A){super(null,l,c,f,u,d,r,o,p,A),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const j_=new ct,GR=new ct;class WA{constructor(e=[],t=[]){this.uuid=qi(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new ct)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new ct;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let o=0,l=e.length;o<l;o++){const c=e[o]?e[o].matrixWorld:GR;j_.multiplyMatrices(c,t[o]),j_.toArray(n,o*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new WA(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=k1(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new _a(t,e,e,on,hn);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const o=e.bones[n];let l=t[o];l===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),l=new W_),this.bones.push(l),this.boneInverses.push(new ct().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,o=t.length;r<o;r++){const l=t[r];e.bones.push(l.uuid);const c=n[r];e.boneInverses.push(c.toArray())}return e}}class jA extends bn{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Ea=new ct,Y_=new ct,Ju=[],q_=new gn,HR=new ct,Xl=new Wn,Kl=new Ji;class VR extends Wn{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new jA(new Float32Array(n*16),16),this.instanceColor=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,HR)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new gn),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Ea),q_.copy(e.boundingBox).applyMatrix4(Ea),this.boundingBox.union(q_)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ji),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Ea),Kl.copy(e.boundingSphere).applyMatrix4(Ea),this.boundingSphere.union(Kl)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Xl.geometry=this.geometry,Xl.material=this.material,Xl.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Kl.copy(this.boundingSphere),Kl.applyMatrix4(n),e.ray.intersectsSphere(Kl)!==!1))for(let o=0;o<r;o++){this.getMatrixAt(o,Ea),Y_.multiplyMatrices(n,Ea),Xl.matrixWorld=Y_,Xl.raycast(e,Ju);for(let l=0,c=Ju.length;l<c;l++){const f=Ju[l];f.instanceId=o,f.object=this,t.push(f)}Ju.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new jA(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class X_ extends gr{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new tt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const K_=new j,J_=new j,Z_=new ct,YA=new Hl,Zu=new Ji;class qA extends tn{constructor(e=new xi,t=new X_){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let r=1,o=t.count;r<o;r++)K_.fromBufferAttribute(t,r-1),J_.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=K_.distanceTo(J_);e.setAttribute("lineDistance",new er(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,o=e.params.Line.threshold,l=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Zu.copy(n.boundingSphere),Zu.applyMatrix4(r),Zu.radius+=o,e.ray.intersectsSphere(Zu)===!1)return;Z_.copy(r).invert(),YA.copy(e.ray).applyMatrix4(Z_);const c=o/((this.scale.x+this.scale.y+this.scale.z)/3),f=c*c,u=new j,d=new j,p=new j,A=new j,g=this.isLineSegments?2:1,E=n.index,_=n.attributes.position;if(E!==null){const v=Math.max(0,l.start),S=Math.min(E.count,l.start+l.count);for(let y=v,x=S-1;y<x;y+=g){const w=E.getX(y),b=E.getX(y+1);if(u.fromBufferAttribute(_,w),d.fromBufferAttribute(_,b),YA.distanceSqToSegment(u,d,A,p)>f)continue;A.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(A);L<e.near||L>e.far||t.push({distance:L,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const v=Math.max(0,l.start),S=Math.min(_.count,l.start+l.count);for(let y=v,x=S-1;y<x;y+=g){if(u.fromBufferAttribute(_,y),d.fromBufferAttribute(_,y+1),YA.distanceSqToSegment(u,d,A,p)>f)continue;A.applyMatrix4(this.matrixWorld);const b=e.ray.origin.distanceTo(A);b<e.near||b>e.far||t.push({distance:b,point:p.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=r.length;o<l;o++){const c=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[c]=o}}}}}const $_=new j,eE=new j;class WR extends qA{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let r=0,o=t.count;r<o;r+=2)$_.fromBufferAttribute(t,r),eE.fromBufferAttribute(t,r+1),n[r]=r===0?0:n[r-1],n[r+1]=n[r]+$_.distanceTo(eE);e.setAttribute("lineDistance",new er(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class jR extends qA{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class tE extends gr{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new tt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const nE=new ct,XA=new Hl,$u=new Ji,ef=new j;class YR extends tn{constructor(e=new xi,t=new tE){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,o=e.params.Points.threshold,l=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),$u.copy(n.boundingSphere),$u.applyMatrix4(r),$u.radius+=o,e.ray.intersectsSphere($u)===!1)return;nE.copy(r).invert(),XA.copy(e.ray).applyMatrix4(nE);const c=o/((this.scale.x+this.scale.y+this.scale.z)/3),f=c*c,u=n.index,p=n.attributes.position;if(u!==null){const A=Math.max(0,l.start),g=Math.min(u.count,l.start+l.count);for(let E=A,C=g;E<C;E++){const _=u.getX(E);ef.fromBufferAttribute(p,_),iE(ef,_,f,r,e,t,this)}}else{const A=Math.max(0,l.start),g=Math.min(p.count,l.start+l.count);for(let E=A,C=g;E<C;E++)ef.fromBufferAttribute(p,E),iE(ef,E,f,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=r.length;o<l;o++){const c=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[c]=o}}}}}function iE(i,e,t,n,r,o,l){const c=XA.distanceSqToPoint(i);if(c<t){const f=new j;XA.closestPointToPoint(i,f),f.applyMatrix4(n);const u=r.ray.origin.distanceTo(f);if(u<r.near||u>r.far)return;o.push({distance:u,distanceToRay:Math.sqrt(c),point:f,index:e,face:null,object:l})}}class tf extends Rn{constructor(e,t,n,r,o,l,c,f,u,d,p,A){super(null,l,c,f,u,d,r,o,p,A),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class qR extends tf{constructor(e,t,n,r,o,l){super(e,t,n,o,l),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Fn}}class XR extends tf{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,so),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class KR extends Si{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class KA extends gr{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new tt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=D1,this.normalScale=new Ke(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class _r extends KA{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Ke(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return yn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new tt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new tt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new tt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}function nf(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)}function JR(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function ZR(i){function e(r,o){return i[r]-i[o]}const t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n}function rE(i,e,t){const n=i.length,r=new i.constructor(n);for(let o=0,l=0;l!==n;++o){const c=t[o]*e;for(let f=0;f!==e;++f)r[l++]=i[c+f]}return r}function sE(i,e,t,n){let r=1,o=i[0];for(;o!==void 0&&o[n]===void 0;)o=i[r++];if(o===void 0)return;let l=o[n];if(l!==void 0)if(Array.isArray(l))do l=o[n],l!==void 0&&(e.push(o.time),t.push.apply(t,l)),o=i[r++];while(o!==void 0);else if(l.toArray!==void 0)do l=o[n],l!==void 0&&(e.push(o.time),l.toArray(t,t.length)),o=i[r++];while(o!==void 0);else do l=o[n],l!==void 0&&(e.push(o.time),t.push(l)),o=i[r++];while(o!==void 0)}class Jl{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],o=t[n-1];e:{t:{let l;n:{i:if(!(e<r)){for(let c=n+2;;){if(r===void 0){if(e<o)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===c)break;if(o=r,r=t[++n],e<r)break t}l=t.length;break n}if(!(e>=o)){const c=t[1];e<c&&(n=2,o=c);for(let f=n-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===f)break;if(r=o,o=t[--n-1],e>=o)break t}l=n,n=0;break n}break e}for(;n<l;){const c=n+l>>>1;e<t[c]?l=c:n=c+1}if(r=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,o,r)}return this.interpolate_(n,o,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,o=e*r;for(let l=0;l!==r;++l)t[l]=n[o+l];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class $R extends Jl{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:T1,endingEnd:T1}}intervalChanged_(e,t,n){const r=this.parameterPositions;let o=e-2,l=e+1,c=r[o],f=r[l];if(c===void 0)switch(this.getSettings_().endingStart){case B1:o=e,c=2*t-n;break;case R1:o=r.length-2,c=t+r[o]-r[o+1];break;default:o=e,c=n}if(f===void 0)switch(this.getSettings_().endingEnd){case B1:l=e,f=2*n-t;break;case R1:l=1,f=n+r[1]-r[0];break;default:l=e-1,f=t}const u=(n-t)*.5,d=this.valueSize;this._weightPrev=u/(t-c),this._weightNext=u/(f-n),this._offsetPrev=o*d,this._offsetNext=l*d}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=e*c,u=f-c,d=this._offsetPrev,p=this._offsetNext,A=this._weightPrev,g=this._weightNext,E=(n-t)/(r-t),C=E*E,_=C*E,v=-A*_+2*A*C-A*E,S=(1+A)*_+(-1.5-2*A)*C+(-.5+A)*E+1,y=(-1-g)*_+(1.5+g)*C+.5*E,x=g*_-g*C;for(let w=0;w!==c;++w)o[w]=v*l[d+w]+S*l[u+w]+y*l[f+w]+x*l[p+w];return o}}class eb extends Jl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=e*c,u=f-c,d=(n-t)/(r-t),p=1-d;for(let A=0;A!==c;++A)o[A]=l[u+A]*p+l[f+A]*d;return o}}class tb extends Jl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Er{constructor(e,t,n,r){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=nf(t,this.TimeBufferType),this.values=nf(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:nf(e.times,Array),values:nf(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(n.interpolation=r)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new tb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new eb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new $R(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Pl:t=this.InterpolantFactoryMethodDiscrete;break;case Jo:t=this.InterpolantFactoryMethodLinear;break;case lA:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Pl;case this.InterpolantFactoryMethodLinear:return Jo;case this.InterpolantFactoryMethodSmooth:return lA}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let o=0,l=r-1;for(;o!==r&&n[o]<e;)++o;for(;l!==-1&&n[l]>t;)--l;if(++l,o!==0||l!==r){o>=l&&(l=Math.max(l,1),o=l-1);const c=this.getValueSize();this.times=n.slice(o,l),this.values=this.values.slice(o*c,l*c)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let l=null;for(let c=0;c!==o;c++){const f=n[c];if(typeof f=="number"&&isNaN(f)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,c,f),e=!1;break}if(l!==null&&l>f){console.error("THREE.KeyframeTrack: Out of order keys.",this,c,f,l),e=!1;break}l=f}if(r!==void 0&&JR(r))for(let c=0,f=r.length;c!==f;++c){const u=r[c];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,c,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===lA,o=e.length-1;let l=1;for(let c=1;c<o;++c){let f=!1;const u=e[c],d=e[c+1];if(u!==d&&(c!==1||u!==e[0]))if(r)f=!0;else{const p=c*n,A=p-n,g=p+n;for(let E=0;E!==n;++E){const C=t[p+E];if(C!==t[A+E]||C!==t[g+E]){f=!0;break}}}if(f){if(c!==l){e[l]=e[c];const p=c*n,A=l*n;for(let g=0;g!==n;++g)t[A+g]=t[p+g]}++l}}if(o>0){e[l]=e[o];for(let c=o*n,f=l*n,u=0;u!==n;++u)t[f+u]=t[c+u];++l}return l!==e.length?(this.times=e.slice(0,l),this.values=t.slice(0,l*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Er.prototype.TimeBufferType=Float32Array,Er.prototype.ValueBufferType=Float32Array,Er.prototype.DefaultInterpolation=Jo;class ya extends Er{}ya.prototype.ValueTypeName="bool",ya.prototype.ValueBufferType=Array,ya.prototype.DefaultInterpolation=Pl,ya.prototype.InterpolantFactoryMethodLinear=void 0,ya.prototype.InterpolantFactoryMethodSmooth=void 0;class oE extends Er{}oE.prototype.ValueTypeName="color";class Ca extends Er{}Ca.prototype.ValueTypeName="number";class nb extends Jl{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=(n-t)/(r-t);let u=e*c;for(let d=u+c;u!==d;u+=4)pr.slerpFlat(o,0,l,u-c,l,u,f);return o}}class _o extends Er{InterpolantFactoryMethodLinear(e){return new nb(this.times,this.values,this.getValueSize(),e)}}_o.prototype.ValueTypeName="quaternion",_o.prototype.DefaultInterpolation=Jo,_o.prototype.InterpolantFactoryMethodSmooth=void 0;class Ia extends Er{}Ia.prototype.ValueTypeName="string",Ia.prototype.ValueBufferType=Array,Ia.prototype.DefaultInterpolation=Pl,Ia.prototype.InterpolantFactoryMethodLinear=void 0,Ia.prototype.InterpolantFactoryMethodSmooth=void 0;class xa extends Er{}xa.prototype.ValueTypeName="vector";class ib{constructor(e,t=-1,n,r=GM){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=qi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let l=0,c=n.length;l!==c;++l)t.push(sb(n[l]).scale(r));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,l=n.length;o!==l;++o)t.push(Er.toJSON(n[o]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const o=t.length,l=[];for(let c=0;c<o;c++){let f=[],u=[];f.push((c+o-1)%o,c,(c+1)%o),u.push(0,1,0);const d=ZR(f);f=rE(f,1,d),u=rE(u,1,d),!r&&f[0]===0&&(f.push(o),u.push(u[0])),l.push(new Ca(".morphTargetInfluences["+t[c].name+"]",f,u).scale(1/n))}return new this(e,-1,l)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const r=e;n=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},o=/^([\w-]*?)([\d]+)$/;for(let c=0,f=e.length;c<f;c++){const u=e[c],d=u.name.match(o);if(d&&d.length>1){const p=d[1];let A=r[p];A||(r[p]=A=[]),A.push(u)}}const l=[];for(const c in r)l.push(this.CreateFromMorphTargetSequence(c,r[c],t,n));return l}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(p,A,g,E,C){if(g.length!==0){const _=[],v=[];sE(g,_,v,E),_.length!==0&&C.push(new p(A,_,v))}},r=[],o=e.name||"default",l=e.fps||30,c=e.blendMode;let f=e.length||-1;const u=e.hierarchy||[];for(let p=0;p<u.length;p++){const A=u[p].keys;if(!(!A||A.length===0))if(A[0].morphTargets){const g={};let E;for(E=0;E<A.length;E++)if(A[E].morphTargets)for(let C=0;C<A[E].morphTargets.length;C++)g[A[E].morphTargets[C]]=-1;for(const C in g){const _=[],v=[];for(let S=0;S!==A[E].morphTargets.length;++S){const y=A[E];_.push(y.time),v.push(y.morphTarget===C?1:0)}r.push(new Ca(".morphTargetInfluence["+C+"]",_,v))}f=g.length*l}else{const g=".bones["+t[p].name+"]";n(xa,g+".position",A,"pos",r),n(_o,g+".quaternion",A,"rot",r),n(xa,g+".scale",A,"scl",r)}}return r.length===0?null:new this(o,f,r,c)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,r=e.length;n!==r;++n){const o=this.tracks[n];t=Math.max(t,o.times[o.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function rb(i){switch(i.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ca;case"vector":case"vector2":case"vector3":case"vector4":return xa;case"color":return oE;case"quaternion":return _o;case"bool":case"boolean":return ya;case"string":return Ia}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+i)}function sb(i){if(i.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=rb(i.type);if(i.times===void 0){const t=[],n=[];sE(i.keys,t,n,"value"),i.times=t,i.values=n}return e.parse!==void 0?e.parse(i):new e(i.name,i.times,i.values,i.interpolation)}const Sa={enabled:!1,files:{},add:function(i,e){this.enabled!==!1&&(this.files[i]=e)},get:function(i){if(this.enabled!==!1)return this.files[i]},remove:function(i){delete this.files[i]},clear:function(){this.files={}}};class aE{constructor(e,t,n){const r=this;let o=!1,l=0,c=0,f;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){c++,o===!1&&r.onStart!==void 0&&r.onStart(d,l,c),o=!0},this.itemEnd=function(d){l++,r.onProgress!==void 0&&r.onProgress(d,l,c),l===c&&(o=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(d){r.onError!==void 0&&r.onError(d)},this.resolveURL=function(d){return f?f(d):d},this.setURLModifier=function(d){return f=d,this},this.addHandler=function(d,p){return u.push(d,p),this},this.removeHandler=function(d){const p=u.indexOf(d);return p!==-1&&u.splice(p,2),this},this.getHandler=function(d){for(let p=0,A=u.length;p<A;p+=2){const g=u[p],E=u[p+1];if(g.global&&(g.lastIndex=0),g.test(d))return E}return null}}}const ob=new aE;class _s{constructor(e){this.manager=e!==void 0?e:ob,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,o){n.load(e,r,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}_s.DEFAULT_MATERIAL_NAME="__DEFAULT";const Vr={};class ab extends Error{constructor(e,t){super(e),this.response=t}}class wa extends _s{constructor(e){super(e)}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=Sa.get(e);if(o!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(o),this.manager.itemEnd(e)},0),o;if(Vr[e]!==void 0){Vr[e].push({onLoad:t,onProgress:n,onError:r});return}Vr[e]=[],Vr[e].push({onLoad:t,onProgress:n,onError:r});const l=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=Vr[e],p=u.body.getReader(),A=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),g=A?parseInt(A):0,E=g!==0;let C=0;const _=new ReadableStream({start(v){S();function S(){p.read().then(({done:y,value:x})=>{if(y)v.close();else{C+=x.byteLength;const w=new ProgressEvent("progress",{lengthComputable:E,loaded:C,total:g});for(let b=0,B=d.length;b<B;b++){const L=d[b];L.onProgress&&L.onProgress(w)}v.enqueue(x),S()}})}}});return new Response(_)}else throw new ab(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(f){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,c));case"json":return u.json();default:if(c===void 0)return u.text();{const p=/charset="?([^;"\s]*)"?/i.exec(c),A=p&&p[1]?p[1].toLowerCase():void 0,g=new TextDecoder(A);return u.arrayBuffer().then(E=>g.decode(E))}}}).then(u=>{Sa.add(e,u);const d=Vr[e];delete Vr[e];for(let p=0,A=d.length;p<A;p++){const g=d[p];g.onLoad&&g.onLoad(u)}}).catch(u=>{const d=Vr[e];if(d===void 0)throw this.manager.itemError(e),u;delete Vr[e];for(let p=0,A=d.length;p<A;p++){const g=d[p];g.onError&&g.onError(u)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class lb extends _s{constructor(e){super(e)}load(e,t,n,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,l=Sa.get(e);if(l!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(l),o.manager.itemEnd(e)},0),l;const c=Ql("img");function f(){d(),Sa.add(e,this),t&&t(this),o.manager.itemEnd(e)}function u(p){d(),r&&r(p),o.manager.itemError(e),o.manager.itemEnd(e)}function d(){c.removeEventListener("load",f,!1),c.removeEventListener("error",u,!1)}return c.addEventListener("load",f,!1),c.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(c.crossOrigin=this.crossOrigin),o.manager.itemStart(e),c.src=e,c}}class cb extends _s{constructor(e){super(e)}load(e,t,n,r){const o=this,l=new _a,c=new wa(this.manager);return c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setPath(this.path),c.setWithCredentials(o.withCredentials),c.load(e,function(f){let u;try{u=o.parse(f)}catch(d){if(r!==void 0)r(d);else{console.error(d);return}}u.image!==void 0?l.image=u.image:u.data!==void 0&&(l.image.width=u.width,l.image.height=u.height,l.image.data=u.data),l.wrapS=u.wrapS!==void 0?u.wrapS:Fn,l.wrapT=u.wrapT!==void 0?u.wrapT:Fn,l.magFilter=u.magFilter!==void 0?u.magFilter:un,l.minFilter=u.minFilter!==void 0?u.minFilter:un,l.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.colorSpace!==void 0?l.colorSpace=u.colorSpace:u.encoding!==void 0&&(l.encoding=u.encoding),u.flipY!==void 0&&(l.flipY=u.flipY),u.format!==void 0&&(l.format=u.format),u.type!==void 0&&(l.type=u.type),u.mipmaps!==void 0&&(l.mipmaps=u.mipmaps,l.minFilter=Pr),u.mipmapCount===1&&(l.minFilter=un),u.generateMipmaps!==void 0&&(l.generateMipmaps=u.generateMipmaps),l.needsUpdate=!0,t&&t(l,u)},n,r),l}}class lE extends _s{constructor(e){super(e)}load(e,t,n,r){const o=new Rn,l=new lb(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(e,function(c){o.image=c,o.needsUpdate=!0,t!==void 0&&t(o)},n,r),o}}class JA extends tn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new tt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const ZA=new ct,cE=new j,uE=new j;class $A{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Ke(512,512),this.map=null,this.mapPass=null,this.matrix=new ct,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new DA,this._frameExtents=new Ke(1,1),this._viewportCount=1,this._viewports=[new Gt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;cE.setFromMatrixPosition(e.matrixWorld),t.position.copy(cE),uE.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(uE),t.updateMatrixWorld(),ZA.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ZA),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(ZA)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class ub extends $A{constructor(){super(new $n(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=$o*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,o=e.distance||t.far;(n!==t.fov||r!==t.aspect||o!==t.far)&&(t.fov=n,t.aspect=r,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class fb extends JA{constructor(e,t,n=0,r=Math.PI/3,o=0,l=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(tn.DEFAULT_UP),this.updateMatrix(),this.target=new tn,this.distance=n,this.angle=r,this.penumbra=o,this.decay=l,this.map=null,this.shadow=new ub}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const fE=new ct,Zl=new j,ep=new j;class hb extends $A{constructor(){super(new $n(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Ke(4,2),this._viewportCount=6,this._viewports=[new Gt(2,1,1,1),new Gt(0,1,1,1),new Gt(3,1,1,1),new Gt(1,1,1,1),new Gt(3,0,1,1),new Gt(1,0,1,1)],this._cubeDirections=[new j(1,0,0),new j(-1,0,0),new j(0,0,1),new j(0,0,-1),new j(0,1,0),new j(0,-1,0)],this._cubeUps=[new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,0,1),new j(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,o=e.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),Zl.setFromMatrixPosition(e.matrixWorld),n.position.copy(Zl),ep.copy(n.position),ep.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ep),n.updateMatrixWorld(),r.makeTranslation(-Zl.x,-Zl.y,-Zl.z),fE.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fE)}}class db extends JA{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new hb}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Ab extends $A{constructor(){super(new Yl(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class pb extends JA{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(tn.DEFAULT_UP),this.updateMatrix(),this.target=new tn,this.shadow=new Ab}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class tp{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch{return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class gb extends _s{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,l=Sa.get(e);if(l!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(l),o.manager.itemEnd(e)},0),l;const c={};c.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",c.headers=this.requestHeader,fetch(e,c).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(f){Sa.add(e,f),t&&t(f),o.manager.itemEnd(e)}).catch(function(f){r&&r(f),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}class mb{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=hE(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=hE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function hE(){return(typeof performance>"u"?Date:performance).now()}const np="\\[\\]\\.:\\/",vb=new RegExp("["+np+"]","g"),ip="[^"+np+"]",_b="[^"+np.replace("\\.","")+"]",Eb=/((?:WC+[\/:])*)/.source.replace("WC",ip),yb=/(WCOD+)?/.source.replace("WCOD",_b),Cb=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ip),Ib=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ip),xb=new RegExp("^"+Eb+yb+Cb+Ib+"$"),Sb=["material","materials","bones","map"];class wb{constructor(e,t,n){const r=n||Ut.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=n.length;r!==o;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class Ut{constructor(e,t,n){this.path=t,this.parsedPath=n||Ut.parseTrackName(t),this.node=Ut.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Ut.Composite(e,t,n):new Ut(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(vb,"")}static parseTrackName(e){const t=xb.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const o=n.nodeName.substring(r+1);Sb.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(o){for(let l=0;l<o.length;l++){const c=o[l];if(c.name===t||c.uuid===t)return c;const f=n(c.children);if(f)return f}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,o=n.length;r!==o;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let o=t.propertyIndex;if(e||(e=Ut.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let d=0;d<e.length;d++)if(e[d].name===u){u=d;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const l=e[r];if(l===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" but it wasn't found.",e);return}let c=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?c=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(c=this.Versioning.MatrixWorldNeedsUpdate);let f=this.BindingType.Direct;if(o!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}f=this.BindingType.ArrayElement,this.resolvedProperty=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(f=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(f=this.BindingType.EntireArray,this.resolvedProperty=l):this.propertyName=r;this.getValue=this.GetterByBindingType[f],this.setValue=this.SetterByBindingTypeAndVersioning[f][c]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ut.Composite=wb,Ut.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ut.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ut.prototype.GetterByBindingType=[Ut.prototype._getValue_direct,Ut.prototype._getValue_array,Ut.prototype._getValue_arrayElement,Ut.prototype._getValue_toArray],Ut.prototype.SetterByBindingTypeAndVersioning=[[Ut.prototype._setValue_direct,Ut.prototype._setValue_direct_setNeedsUpdate,Ut.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_array,Ut.prototype._setValue_array_setNeedsUpdate,Ut.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_arrayElement,Ut.prototype._setValue_arrayElement_setNeedsUpdate,Ut.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_fromArray,Ut.prototype._setValue_fromArray_setNeedsUpdate,Ut.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class dE{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(yn(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const AE=new j,rf=new j;class Wr{constructor(e=new j,t=new j){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){AE.subVectors(e,this.start),rf.subVectors(this.end,this.start);const n=rf.dot(rf);let o=rf.dot(AE)/n;return t&&(o=yn(o,0,1)),o}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:su}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=su);const pE={type:"change"},rp={type:"start"},gE={type:"end"},sf=new Hl,mE=new mr,Mb=Math.cos(70*AA.DEG2RAD);class Tb extends fo{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new j,this.cursor=new j,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Wo.ROTATE,MIDDLE:Wo.DOLLY,RIGHT:Wo.PAN},this.touches={ONE:jo.ROTATE,TWO:jo.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return c.phi},this.getAzimuthalAngle=function(){return c.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(q){q.addEventListener("keydown",Q),this._domElementKeyEvents=q},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Q),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(pE),n.update(),o=r.NONE},this.update=function(){const q=new j,Me=new pr().setFromUnitVectors(e.up,new j(0,1,0)),pe=Me.clone().invert(),nt=new j,je=new pr,Je=new j,Ge=2*Math.PI;return function(dt=null){const ee=n.object.position;q.copy(ee).sub(n.target),q.applyQuaternion(Me),c.setFromVector3(q),n.autoRotate&&o===r.NONE&&N(R(dt)),n.enableDamping?(c.theta+=f.theta*n.dampingFactor,c.phi+=f.phi*n.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let Te=n.minAzimuthAngle,ye=n.maxAzimuthAngle;isFinite(Te)&&isFinite(ye)&&(Te<-Math.PI?Te+=Ge:Te>Math.PI&&(Te-=Ge),ye<-Math.PI?ye+=Ge:ye>Math.PI&&(ye-=Ge),Te<=ye?c.theta=Math.max(Te,Math.min(ye,c.theta)):c.theta=c.theta>(Te+ye)/2?Math.max(Te,c.theta):Math.min(ye,c.theta)),c.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,c.phi)),c.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(d,n.dampingFactor):n.target.add(d),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor),n.zoomToCursor&&b||n.object.isOrthographicCamera?c.radius=$(c.radius):c.radius=$(c.radius*u),q.setFromSpherical(c),q.applyQuaternion(pe),ee.copy(n.target).add(q),n.object.lookAt(n.target),n.enableDamping===!0?(f.theta*=1-n.dampingFactor,f.phi*=1-n.dampingFactor,d.multiplyScalar(1-n.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let he=!1;if(n.zoomToCursor&&b){let we=null;if(n.object.isPerspectiveCamera){const qe=q.length();we=$(qe*u);const pt=qe-we;n.object.position.addScaledVector(x,pt),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const qe=new j(w.x,w.y,0);qe.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),he=!0;const pt=new j(w.x,w.y,0);pt.unproject(n.object),n.object.position.sub(pt).add(qe),n.object.updateMatrixWorld(),we=q.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;we!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(we).add(n.object.position):(sf.origin.copy(n.object.position),sf.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(sf.direction))<Mb?e.lookAt(n.target):(mE.setFromNormalAndCoplanarPoint(n.object.up,n.target),sf.intersectPlane(mE,n.target))))}else n.object.isOrthographicCamera&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),he=!0);return u=1,b=!1,he||nt.distanceToSquared(n.object.position)>l||8*(1-je.dot(n.object.quaternion))>l||Je.distanceToSquared(n.target)>0?(n.dispatchEvent(pE),nt.copy(n.object.position),je.copy(n.object.quaternion),Je.copy(n.target),he=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",me),n.domElement.removeEventListener("pointerdown",Ue),n.domElement.removeEventListener("pointercancel",$e),n.domElement.removeEventListener("wheel",H),n.domElement.removeEventListener("pointermove",He),n.domElement.removeEventListener("pointerup",$e),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",Q),n._domElementKeyEvents=null)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=r.NONE;const l=1e-6,c=new dE,f=new dE;let u=1;const d=new j,p=new Ke,A=new Ke,g=new Ke,E=new Ke,C=new Ke,_=new Ke,v=new Ke,S=new Ke,y=new Ke,x=new j,w=new Ke;let b=!1;const B=[],L={};function R(q){return q!==null?2*Math.PI/60*n.autoRotateSpeed*q:2*Math.PI/60/60*n.autoRotateSpeed}function T(){return Math.pow(.95,n.zoomSpeed)}function N(q){f.theta-=q}function k(q){f.phi-=q}const O=function(){const q=new j;return function(pe,nt){q.setFromMatrixColumn(nt,0),q.multiplyScalar(-pe),d.add(q)}}(),F=function(){const q=new j;return function(pe,nt){n.screenSpacePanning===!0?q.setFromMatrixColumn(nt,1):(q.setFromMatrixColumn(nt,0),q.crossVectors(n.object.up,q)),q.multiplyScalar(pe),d.add(q)}}(),V=function(){const q=new j;return function(pe,nt){const je=n.domElement;if(n.object.isPerspectiveCamera){const Je=n.object.position;q.copy(Je).sub(n.target);let Ge=q.length();Ge*=Math.tan(n.object.fov/2*Math.PI/180),O(2*pe*Ge/je.clientHeight,n.object.matrix),F(2*nt*Ge/je.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(O(pe*(n.object.right-n.object.left)/n.object.zoom/je.clientWidth,n.object.matrix),F(nt*(n.object.top-n.object.bottom)/n.object.zoom/je.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function X(q){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u/=q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function te(q){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u*=q:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function Y(q){if(!n.zoomToCursor)return;b=!0;const Me=n.domElement.getBoundingClientRect(),pe=q.clientX-Me.left,nt=q.clientY-Me.top,je=Me.width,Je=Me.height;w.x=pe/je*2-1,w.y=-(nt/Je)*2+1,x.set(w.x,w.y,1).unproject(n.object).sub(n.object.position).normalize()}function $(q){return Math.max(n.minDistance,Math.min(n.maxDistance,q))}function U(q){p.set(q.clientX,q.clientY)}function D(q){Y(q),v.set(q.clientX,q.clientY)}function G(q){E.set(q.clientX,q.clientY)}function K(q){A.set(q.clientX,q.clientY),g.subVectors(A,p).multiplyScalar(n.rotateSpeed);const Me=n.domElement;N(2*Math.PI*g.x/Me.clientHeight),k(2*Math.PI*g.y/Me.clientHeight),p.copy(A),n.update()}function J(q){S.set(q.clientX,q.clientY),y.subVectors(S,v),y.y>0?X(T()):y.y<0&&te(T()),v.copy(S),n.update()}function Ae(q){C.set(q.clientX,q.clientY),_.subVectors(C,E).multiplyScalar(n.panSpeed),V(_.x,_.y),E.copy(C),n.update()}function ge(q){Y(q),q.deltaY<0?te(T()):q.deltaY>0&&X(T()),n.update()}function be(q){let Me=!1;switch(q.code){case n.keys.UP:q.ctrlKey||q.metaKey||q.shiftKey?k(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(0,n.keyPanSpeed),Me=!0;break;case n.keys.BOTTOM:q.ctrlKey||q.metaKey||q.shiftKey?k(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(0,-n.keyPanSpeed),Me=!0;break;case n.keys.LEFT:q.ctrlKey||q.metaKey||q.shiftKey?N(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(n.keyPanSpeed,0),Me=!0;break;case n.keys.RIGHT:q.ctrlKey||q.metaKey||q.shiftKey?N(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):V(-n.keyPanSpeed,0),Me=!0;break}Me&&(q.preventDefault(),n.update())}function de(){if(B.length===1)p.set(B[0].pageX,B[0].pageY);else{const q=.5*(B[0].pageX+B[1].pageX),Me=.5*(B[0].pageY+B[1].pageY);p.set(q,Me)}}function Oe(){if(B.length===1)E.set(B[0].pageX,B[0].pageY);else{const q=.5*(B[0].pageX+B[1].pageX),Me=.5*(B[0].pageY+B[1].pageY);E.set(q,Me)}}function It(){const q=B[0].pageX-B[1].pageX,Me=B[0].pageY-B[1].pageY,pe=Math.sqrt(q*q+Me*Me);v.set(0,pe)}function ot(){n.enableZoom&&It(),n.enablePan&&Oe()}function oe(){n.enableZoom&&It(),n.enableRotate&&de()}function Mt(q){if(B.length==1)A.set(q.pageX,q.pageY);else{const pe=Re(q),nt=.5*(q.pageX+pe.x),je=.5*(q.pageY+pe.y);A.set(nt,je)}g.subVectors(A,p).multiplyScalar(n.rotateSpeed);const Me=n.domElement;N(2*Math.PI*g.x/Me.clientHeight),k(2*Math.PI*g.y/Me.clientHeight),p.copy(A)}function Ne(q){if(B.length===1)C.set(q.pageX,q.pageY);else{const Me=Re(q),pe=.5*(q.pageX+Me.x),nt=.5*(q.pageY+Me.y);C.set(pe,nt)}_.subVectors(C,E).multiplyScalar(n.panSpeed),V(_.x,_.y),E.copy(C)}function Ze(q){const Me=Re(q),pe=q.pageX-Me.x,nt=q.pageY-Me.y,je=Math.sqrt(pe*pe+nt*nt);S.set(0,je),y.set(0,Math.pow(S.y/v.y,n.zoomSpeed)),X(y.y),v.copy(S)}function _e(q){n.enableZoom&&Ze(q),n.enablePan&&Ne(q)}function it(q){n.enableZoom&&Ze(q),n.enableRotate&&Mt(q)}function Ue(q){n.enabled!==!1&&(B.length===0&&(n.domElement.setPointerCapture(q.pointerId),n.domElement.addEventListener("pointermove",He),n.domElement.addEventListener("pointerup",$e)),xe(q),q.pointerType==="touch"?se(q):at(q))}function He(q){n.enabled!==!1&&(q.pointerType==="touch"?Ce(q):At(q))}function $e(q){We(q),B.length===0&&(n.domElement.releasePointerCapture(q.pointerId),n.domElement.removeEventListener("pointermove",He),n.domElement.removeEventListener("pointerup",$e)),n.dispatchEvent(gE),o=r.NONE}function at(q){let Me;switch(q.button){case 0:Me=n.mouseButtons.LEFT;break;case 1:Me=n.mouseButtons.MIDDLE;break;case 2:Me=n.mouseButtons.RIGHT;break;default:Me=-1}switch(Me){case Wo.DOLLY:if(n.enableZoom===!1)return;D(q),o=r.DOLLY;break;case Wo.ROTATE:if(q.ctrlKey||q.metaKey||q.shiftKey){if(n.enablePan===!1)return;G(q),o=r.PAN}else{if(n.enableRotate===!1)return;U(q),o=r.ROTATE}break;case Wo.PAN:if(q.ctrlKey||q.metaKey||q.shiftKey){if(n.enableRotate===!1)return;U(q),o=r.ROTATE}else{if(n.enablePan===!1)return;G(q),o=r.PAN}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(rp)}function At(q){switch(o){case r.ROTATE:if(n.enableRotate===!1)return;K(q);break;case r.DOLLY:if(n.enableZoom===!1)return;J(q);break;case r.PAN:if(n.enablePan===!1)return;Ae(q);break}}function H(q){n.enabled===!1||n.enableZoom===!1||o!==r.NONE||(q.preventDefault(),n.dispatchEvent(rp),ge(q),n.dispatchEvent(gE))}function Q(q){n.enabled===!1||n.enablePan===!1||be(q)}function se(q){switch(Se(q),B.length){case 1:switch(n.touches.ONE){case jo.ROTATE:if(n.enableRotate===!1)return;de(),o=r.TOUCH_ROTATE;break;case jo.PAN:if(n.enablePan===!1)return;Oe(),o=r.TOUCH_PAN;break;default:o=r.NONE}break;case 2:switch(n.touches.TWO){case jo.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;ot(),o=r.TOUCH_DOLLY_PAN;break;case jo.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;oe(),o=r.TOUCH_DOLLY_ROTATE;break;default:o=r.NONE}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(rp)}function Ce(q){switch(Se(q),o){case r.TOUCH_ROTATE:if(n.enableRotate===!1)return;Mt(q),n.update();break;case r.TOUCH_PAN:if(n.enablePan===!1)return;Ne(q),n.update();break;case r.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;_e(q),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;it(q),n.update();break;default:o=r.NONE}}function me(q){n.enabled!==!1&&q.preventDefault()}function xe(q){B.push(q)}function We(q){delete L[q.pointerId];for(let Me=0;Me<B.length;Me++)if(B[Me].pointerId==q.pointerId){B.splice(Me,1);return}}function Se(q){let Me=L[q.pointerId];Me===void 0&&(Me=new Ke,L[q.pointerId]=Me),Me.set(q.pageX,q.pageY)}function Re(q){const Me=q.pointerId===B[0].pointerId?B[1]:B[0];return L[Me.pointerId]}n.domElement.addEventListener("contextmenu",me),n.domElement.addEventListener("pointerdown",Ue),n.domElement.addEventListener("pointercancel",$e),n.domElement.addEventListener("wheel",H,{passive:!1}),this.update()}}function vE(i,e){if(e===HM)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(e===cA||e===b1){let t=i.getIndex();if(t===null){const l=[],c=i.getAttribute("position");if(c!==void 0){for(let f=0;f<c.count;f++)l.push(f);i.setIndex(l),t=i.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const n=t.count-2,r=[];if(e===cA)for(let l=1;l<=n;l++)r.push(t.getX(0)),r.push(t.getX(l)),r.push(t.getX(l+1));else for(let l=0;l<n;l++)l%2===0?(r.push(t.getX(l)),r.push(t.getX(l+1)),r.push(t.getX(l+2))):(r.push(t.getX(l+2)),r.push(t.getX(l+1)),r.push(t.getX(l)));r.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=i.clone();return o.setIndex(r),o.clearGroups(),o}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),i}class Bb extends _s{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new Nb(t)}),this.register(function(t){return new Gb(t)}),this.register(function(t){return new Hb(t)}),this.register(function(t){return new Vb(t)}),this.register(function(t){return new Ub(t)}),this.register(function(t){return new kb(t)}),this.register(function(t){return new Fb(t)}),this.register(function(t){return new Qb(t)}),this.register(function(t){return new Db(t)}),this.register(function(t){return new Ob(t)}),this.register(function(t){return new Pb(t)}),this.register(function(t){return new zb(t)}),this.register(function(t){return new bb(t)}),this.register(function(t){return new Wb(t)}),this.register(function(t){return new jb(t)})}load(e,t,n,r){const o=this;let l;this.resourcePath!==""?l=this.resourcePath:this.path!==""?l=this.path:l=tp.extractUrlBase(e),this.manager.itemStart(e);const c=function(u){r?r(u):console.error(u),o.manager.itemError(e),o.manager.itemEnd(e)},f=new wa(this.manager);f.setPath(this.path),f.setResponseType("arraybuffer"),f.setRequestHeader(this.requestHeader),f.setWithCredentials(this.withCredentials),f.load(e,function(u){try{o.parse(u,l,function(d){t(d),o.manager.itemEnd(e)},c)}catch(d){c(d)}},n,c)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let o;const l={},c={},f=new TextDecoder;if(typeof e=="string")o=JSON.parse(e);else if(e instanceof ArrayBuffer)if(f.decode(new Uint8Array(e,0,4))===_E){try{l[wt.KHR_BINARY_GLTF]=new Yb(e)}catch(p){r&&r(p);return}o=JSON.parse(l[wt.KHR_BINARY_GLTF].content)}else o=JSON.parse(f.decode(e));else o=e;if(o.asset===void 0||o.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const u=new o5(o,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const p=this.pluginCallbacks[d](u);p.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),c[p.name]=p,l[p.name]=!0}if(o.extensionsUsed)for(let d=0;d<o.extensionsUsed.length;++d){const p=o.extensionsUsed[d],A=o.extensionsRequired||[];switch(p){case wt.KHR_MATERIALS_UNLIT:l[p]=new Lb;break;case wt.KHR_DRACO_MESH_COMPRESSION:l[p]=new qb(o,this.dracoLoader);break;case wt.KHR_TEXTURE_TRANSFORM:l[p]=new Xb;break;case wt.KHR_MESH_QUANTIZATION:l[p]=new Kb;break;default:A.indexOf(p)>=0&&c[p]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+p+'".')}}u.setExtensions(l),u.setPlugins(c),u.parse(n,r)}parseAsync(e,t){const n=this;return new Promise(function(r,o){n.parse(e,t,r,o)})}}function Rb(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class bb{constructor(e){this.parser=e,this.name=wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const o=t[n];o.extensions&&o.extensions[this.name]&&o.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,o.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const o=t.json,f=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e];let u;const d=new tt(16777215);f.color!==void 0&&d.setRGB(f.color[0],f.color[1],f.color[2],En);const p=f.range!==void 0?f.range:0;switch(f.type){case"directional":u=new pb(d),u.target.position.set(0,0,-1),u.add(u.target);break;case"point":u=new db(d),u.distance=p;break;case"spot":u=new fb(d),u.distance=p,f.spot=f.spot||{},f.spot.innerConeAngle=f.spot.innerConeAngle!==void 0?f.spot.innerConeAngle:0,f.spot.outerConeAngle=f.spot.outerConeAngle!==void 0?f.spot.outerConeAngle:Math.PI/4,u.angle=f.spot.outerConeAngle,u.penumbra=1-f.spot.innerConeAngle/f.spot.outerConeAngle,u.target.position.set(0,0,-1),u.add(u.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+f.type)}return u.position.set(0,0,0),u.decay=2,ys(u,f),f.intensity!==void 0&&(u.intensity=f.intensity),u.name=t.createUniqueName(f.name||"light_"+e),r=Promise.resolve(u),t.cache.add(n,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,o=n.json.nodes[e],c=(o.extensions&&o.extensions[this.name]||{}).light;return c===void 0?null:this._loadLight(c).then(function(f){return n._getNodeRef(t.cache,c,f)})}}class Lb{constructor(){this.name=wt.KHR_MATERIALS_UNLIT}getMaterialType(){return Gr}extendParams(e,t,n){const r=[];e.color=new tt(1,1,1),e.opacity=1;const o=t.pbrMetallicRoughness;if(o){if(Array.isArray(o.baseColorFactor)){const l=o.baseColorFactor;e.color.setRGB(l[0],l[1],l[2],En),e.opacity=l[3]}o.baseColorTexture!==void 0&&r.push(n.assignTexture(e,"map",o.baseColorTexture,Xt))}return Promise.all(r)}}class Db{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=r.extensions[this.name].emissiveStrength;return o!==void 0&&(t.emissiveIntensity=o),Promise.resolve()}}class Nb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];if(l.clearcoatFactor!==void 0&&(t.clearcoat=l.clearcoatFactor),l.clearcoatTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatMap",l.clearcoatTexture)),l.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=l.clearcoatRoughnessFactor),l.clearcoatRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatRoughnessMap",l.clearcoatRoughnessTexture)),l.clearcoatNormalTexture!==void 0&&(o.push(n.assignTexture(t,"clearcoatNormalMap",l.clearcoatNormalTexture)),l.clearcoatNormalTexture.scale!==void 0)){const c=l.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Ke(c,c)}return Promise.all(o)}}class Pb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];return l.iridescenceFactor!==void 0&&(t.iridescence=l.iridescenceFactor),l.iridescenceTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceMap",l.iridescenceTexture)),l.iridescenceIor!==void 0&&(t.iridescenceIOR=l.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),l.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=l.iridescenceThicknessMinimum),l.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=l.iridescenceThicknessMaximum),l.iridescenceThicknessTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceThicknessMap",l.iridescenceThicknessTexture)),Promise.all(o)}}class Ub{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[];t.sheenColor=new tt(0,0,0),t.sheenRoughness=0,t.sheen=1;const l=r.extensions[this.name];if(l.sheenColorFactor!==void 0){const c=l.sheenColorFactor;t.sheenColor.setRGB(c[0],c[1],c[2],En)}return l.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=l.sheenRoughnessFactor),l.sheenColorTexture!==void 0&&o.push(n.assignTexture(t,"sheenColorMap",l.sheenColorTexture,Xt)),l.sheenRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"sheenRoughnessMap",l.sheenRoughnessTexture)),Promise.all(o)}}class kb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];return l.transmissionFactor!==void 0&&(t.transmission=l.transmissionFactor),l.transmissionTexture!==void 0&&o.push(n.assignTexture(t,"transmissionMap",l.transmissionTexture)),Promise.all(o)}}class Fb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];t.thickness=l.thicknessFactor!==void 0?l.thicknessFactor:0,l.thicknessTexture!==void 0&&o.push(n.assignTexture(t,"thicknessMap",l.thicknessTexture)),t.attenuationDistance=l.attenuationDistance||1/0;const c=l.attenuationColor||[1,1,1];return t.attenuationColor=new tt().setRGB(c[0],c[1],c[2],En),Promise.all(o)}}class Qb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=r.extensions[this.name];return t.ior=o.ior!==void 0?o.ior:1.5,Promise.resolve()}}class Ob{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];t.specularIntensity=l.specularFactor!==void 0?l.specularFactor:1,l.specularTexture!==void 0&&o.push(n.assignTexture(t,"specularIntensityMap",l.specularTexture));const c=l.specularColorFactor||[1,1,1];return t.specularColor=new tt().setRGB(c[0],c[1],c[2],En),l.specularColorTexture!==void 0&&o.push(n.assignTexture(t,"specularColorMap",l.specularColorTexture,Xt)),Promise.all(o)}}class zb{constructor(e){this.parser=e,this.name=wt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:_r}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const o=[],l=r.extensions[this.name];return l.anisotropyStrength!==void 0&&(t.anisotropy=l.anisotropyStrength),l.anisotropyRotation!==void 0&&(t.anisotropyRotation=l.anisotropyRotation),l.anisotropyTexture!==void 0&&o.push(n.assignTexture(t,"anisotropyMap",l.anisotropyTexture)),Promise.all(o)}}class Gb{constructor(e){this.parser=e,this.name=wt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const o=r.extensions[this.name],l=t.options.ktx2Loader;if(!l){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o.source,l)}}class Hb{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,o=r.textures[e];if(!o.extensions||!o.extensions[t])return null;const l=o.extensions[t],c=r.images[l.source];let f=n.textureLoader;if(c.uri){const u=n.options.manager.getHandler(c.uri);u!==null&&(f=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,l.source,f);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Vb{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,o=r.textures[e];if(!o.extensions||!o.extensions[t])return null;const l=o.extensions[t],c=r.images[l.source];let f=n.textureLoader;if(c.uri){const u=n.options.manager.getHandler(c.uri);u!==null&&(f=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,l.source,f);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Wb{constructor(e){this.name=wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const r=n.extensions[this.name],o=this.parser.getDependency("buffer",r.buffer),l=this.parser.options.meshoptDecoder;if(!l||!l.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(c){const f=r.byteOffset||0,u=r.byteLength||0,d=r.count,p=r.byteStride,A=new Uint8Array(c,f,u);return l.decodeGltfBufferAsync?l.decodeGltfBufferAsync(d,p,A,r.mode,r.filter).then(function(g){return g.buffer}):l.ready.then(function(){const g=new ArrayBuffer(d*p);return l.decodeGltfBuffer(new Uint8Array(g),d,p,A,r.mode,r.filter),g})})}else return null}}class jb{constructor(e){this.name=wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const r=t.meshes[n.mesh];for(const u of r.primitives)if(u.mode!==Ui.TRIANGLES&&u.mode!==Ui.TRIANGLE_STRIP&&u.mode!==Ui.TRIANGLE_FAN&&u.mode!==void 0)return null;const l=n.extensions[this.name].attributes,c=[],f={};for(const u in l)c.push(this.parser.getDependency("accessor",l[u]).then(d=>(f[u]=d,f[u])));return c.length<1?null:(c.push(this.parser.createNodeMesh(e)),Promise.all(c).then(u=>{const d=u.pop(),p=d.isGroup?d.children:[d],A=u[0].count,g=[];for(const E of p){const C=new ct,_=new j,v=new pr,S=new j(1,1,1),y=new VR(E.geometry,E.material,A);for(let x=0;x<A;x++)f.TRANSLATION&&_.fromBufferAttribute(f.TRANSLATION,x),f.ROTATION&&v.fromBufferAttribute(f.ROTATION,x),f.SCALE&&S.fromBufferAttribute(f.SCALE,x),y.setMatrixAt(x,C.compose(_,v,S));for(const x in f)if(x==="_COLOR_0"){const w=f[x];y.instanceColor=new jA(w.array,w.itemSize,w.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&E.geometry.setAttribute(x,f[x]);tn.prototype.copy.call(y,E),this.parser.assignFinalMaterial(y),g.push(y)}return d.isGroup?(d.clear(),d.add(...g),d):g[0]}))}}const _E="glTF",$l=12,EE={JSON:1313821514,BIN:5130562};class Yb{constructor(e){this.name=wt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,$l),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==_E)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-$l,o=new DataView(e,$l);let l=0;for(;l<r;){const c=o.getUint32(l,!0);l+=4;const f=o.getUint32(l,!0);if(l+=4,f===EE.JSON){const u=new Uint8Array(e,$l+l,c);this.content=n.decode(u)}else if(f===EE.BIN){const u=$l+l;this.body=e.slice(u,u+c)}l+=c}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class qb{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=wt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,o=e.extensions[this.name].bufferView,l=e.extensions[this.name].attributes,c={},f={},u={};for(const d in l){const p=op[d]||d.toLowerCase();c[p]=l[d]}for(const d in e.attributes){const p=op[d]||d.toLowerCase();if(l[d]!==void 0){const A=n.accessors[e.attributes[d]],g=Ma[A.componentType];u[p]=g.name,f[p]=A.normalized===!0}}return t.getDependency("bufferView",o).then(function(d){return new Promise(function(p){r.decodeDracoFile(d,function(A){for(const g in A.attributes){const E=A.attributes[g],C=f[g];C!==void 0&&(E.normalized=C)}p(A)},c,u)})})}}class Xb{constructor(){this.name=wt.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Kb{constructor(){this.name=wt.KHR_MESH_QUANTIZATION}}class yE extends Jl{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,o=e*r*3+r;for(let l=0;l!==r;l++)t[l]=n[o+l];return t}interpolate_(e,t,n,r){const o=this.resultBuffer,l=this.sampleValues,c=this.valueSize,f=c*2,u=c*3,d=r-t,p=(n-t)/d,A=p*p,g=A*p,E=e*u,C=E-u,_=-2*g+3*A,v=g-A,S=1-_,y=v-A+p;for(let x=0;x!==c;x++){const w=l[C+x+c],b=l[C+x+f]*d,B=l[E+x+c],L=l[E+x]*d;o[x]=S*w+y*b+_*B+v*L}return o}}const Jb=new pr;class Zb extends yE{interpolate_(e,t,n,r){const o=super.interpolate_(e,t,n,r);return Jb.fromArray(o).normalize().toArray(o),o}}const Ui={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},Ma={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},CE={9728:qt,9729:un,9984:Zd,9985:r1,9986:cu,9987:Pr},IE={33071:Fn,33648:lu,10497:Xo},sp={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},op={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Es={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},$b={CUBICSPLINE:void 0,LINEAR:Jo,STEP:Pl},ap={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function e5(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new KA({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ji})),i.DefaultMaterial}function Eo(i,e,t){for(const n in t.extensions)i[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function ys(i,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(i.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function t5(i,e,t){let n=!1,r=!1,o=!1;for(let u=0,d=e.length;u<d;u++){const p=e[u];if(p.POSITION!==void 0&&(n=!0),p.NORMAL!==void 0&&(r=!0),p.COLOR_0!==void 0&&(o=!0),n&&r&&o)break}if(!n&&!r&&!o)return Promise.resolve(i);const l=[],c=[],f=[];for(let u=0,d=e.length;u<d;u++){const p=e[u];if(n){const A=p.POSITION!==void 0?t.getDependency("accessor",p.POSITION):i.attributes.position;l.push(A)}if(r){const A=p.NORMAL!==void 0?t.getDependency("accessor",p.NORMAL):i.attributes.normal;c.push(A)}if(o){const A=p.COLOR_0!==void 0?t.getDependency("accessor",p.COLOR_0):i.attributes.color;f.push(A)}}return Promise.all([Promise.all(l),Promise.all(c),Promise.all(f)]).then(function(u){const d=u[0],p=u[1],A=u[2];return n&&(i.morphAttributes.position=d),r&&(i.morphAttributes.normal=p),o&&(i.morphAttributes.color=A),i.morphTargetsRelative=!0,i})}function n5(i,e){if(i.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)i.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(i.morphTargetInfluences.length===t.length){i.morphTargetDictionary={};for(let n=0,r=t.length;n<r;n++)i.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function i5(i){let e;const t=i.extensions&&i.extensions[wt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+lp(t.attributes):e=i.indices+":"+lp(i.attributes)+":"+i.mode,i.targets!==void 0)for(let n=0,r=i.targets.length;n<r;n++)e+=":"+lp(i.targets[n]);return e}function lp(i){let e="";const t=Object.keys(i).sort();for(let n=0,r=t.length;n<r;n++)e+=t[n]+":"+i[t[n]]+";";return e}function cp(i){switch(i){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function r5(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const s5=new ct;class o5{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new Rb,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=!1,o=-1;typeof navigator<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,o=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||r&&o<98?this.textureLoader=new lE(this.options.manager):this.textureLoader=new gb(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new wa(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(l){return l._markDefs&&l._markDefs()}),Promise.all(this._invokeAll(function(l){return l.beforeRoot&&l.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(l){const c={scene:l[0][r.scene||0],scenes:l[0],animations:l[1],cameras:l[2],asset:r.asset,parser:n,userData:{}};return Eo(o,c,r),ys(c,r),Promise.all(n._invokeAll(function(f){return f.afterRoot&&f.afterRoot(c)})).then(function(){e(c)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,o=t.length;r<o;r++){const l=t[r].joints;for(let c=0,f=l.length;c<f;c++)e[l[c]].isBone=!0}for(let r=0,o=e.length;r<o;r++){const l=e[r];l.mesh!==void 0&&(this._addNodeRef(this.meshCache,l.mesh),l.skin!==void 0&&(n[l.mesh].isSkinnedMesh=!0)),l.camera!==void 0&&this._addNodeRef(this.cameraCache,l.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),o=(l,c)=>{const f=this.associations.get(l);f!=null&&this.associations.set(c,f);for(const[u,d]of l.children.entries())o(d,c.children[u])};return o(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const o=e(t[r]);o&&n.push(o)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(o){return o.loadNode&&o.loadNode(t)});break;case"mesh":r=this._invokeOne(function(o){return o.loadMesh&&o.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(o){return o.loadBufferView&&o.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(o){return o.loadMaterial&&o.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(o){return o.loadTexture&&o.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(o){return o.loadAnimation&&o.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(o){return o!=this&&o.getDependency&&o.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(o,l){return n.getDependency(e,l)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[wt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(o,l){n.load(tp.resolveURL(t.uri,r.path),o,void 0,function(){l(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const r=t.byteLength||0,o=t.byteOffset||0;return n.slice(o,o+r)})}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const l=sp[r.type],c=Ma[r.componentType],f=r.normalized===!0,u=new c(r.count*l);return Promise.resolve(new bn(u,l,f))}const o=[];return r.bufferView!==void 0?o.push(this.getDependency("bufferView",r.bufferView)):o.push(null),r.sparse!==void 0&&(o.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),o.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(o).then(function(l){const c=l[0],f=sp[r.type],u=Ma[r.componentType],d=u.BYTES_PER_ELEMENT,p=d*f,A=r.byteOffset||0,g=r.bufferView!==void 0?n.bufferViews[r.bufferView].byteStride:void 0,E=r.normalized===!0;let C,_;if(g&&g!==p){const v=Math.floor(A/g),S="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+v+":"+r.count;let y=t.cache.get(S);y||(C=new u(c,v*g,r.count*g/d),y=new QR(C,g/d),t.cache.add(S,y)),_=new GA(y,f,A%g/d,E)}else c===null?C=new u(r.count*f):C=new u(c,A,r.count*f),_=new bn(C,f,E);if(r.sparse!==void 0){const v=sp.SCALAR,S=Ma[r.sparse.indices.componentType],y=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new S(l[1],y,r.sparse.count*v),b=new u(l[2],x,r.sparse.count*f);c!==null&&(_=new bn(_.array.slice(),_.itemSize,_.normalized));for(let B=0,L=w.length;B<L;B++){const R=w[B];if(_.setX(R,b[B*f]),f>=2&&_.setY(R,b[B*f+1]),f>=3&&_.setZ(R,b[B*f+2]),f>=4&&_.setW(R,b[B*f+3]),f>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return _})}loadTexture(e){const t=this.json,n=this.options,o=t.textures[e].source,l=t.images[o];let c=this.textureLoader;if(l.uri){const f=n.manager.getHandler(l.uri);f!==null&&(c=f)}return this.loadTextureImage(e,o,c)}loadTextureImage(e,t,n){const r=this,o=this.json,l=o.textures[e],c=o.images[t],f=(c.uri||c.bufferView)+":"+l.sampler;if(this.textureCache[f])return this.textureCache[f];const u=this.loadImageSource(t,n).then(function(d){d.flipY=!1,d.name=l.name||c.name||"",d.name===""&&typeof c.uri=="string"&&c.uri.startsWith("data:image/")===!1&&(d.name=c.uri);const A=(o.samplers||{})[l.sampler]||{};return d.magFilter=CE[A.magFilter]||un,d.minFilter=CE[A.minFilter]||Pr,d.wrapS=IE[A.wrapS]||Xo,d.wrapT=IE[A.wrapT]||Xo,r.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[f]=u,u}loadImageSource(e,t){const n=this,r=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(p=>p.clone());const l=r.images[e],c=self.URL||self.webkitURL;let f=l.uri||"",u=!1;if(l.bufferView!==void 0)f=n.getDependency("bufferView",l.bufferView).then(function(p){u=!0;const A=new Blob([p],{type:l.mimeType});return f=c.createObjectURL(A),f});else if(l.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(f).then(function(p){return new Promise(function(A,g){let E=A;t.isImageBitmapLoader===!0&&(E=function(C){const _=new Rn(C);_.needsUpdate=!0,A(_)}),t.load(tp.resolveURL(p,o.path),E,void 0,g)})}).then(function(p){return u===!0&&c.revokeObjectURL(f),p.userData.mimeType=l.mimeType||r5(l.uri),p}).catch(function(p){throw console.error("THREE.GLTFLoader: Couldn't load texture",f),p});return this.sourceCache[e]=d,d}assignTexture(e,t,n,r){const o=this;return this.getDependency("texture",n.index).then(function(l){if(!l)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(l=l.clone(),l.channel=n.texCoord),o.extensions[wt.KHR_TEXTURE_TRANSFORM]){const c=n.extensions!==void 0?n.extensions[wt.KHR_TEXTURE_TRANSFORM]:void 0;if(c){const f=o.associations.get(l);l=o.extensions[wt.KHR_TEXTURE_TRANSFORM].extendTexture(l,c),o.associations.set(l,f)}}return r!==void 0&&(l.colorSpace=r),e[t]=l,l})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=t.attributes.tangent===void 0,o=t.attributes.color!==void 0,l=t.attributes.normal===void 0;if(e.isPoints){const c="PointsMaterial:"+n.uuid;let f=this.cache.get(c);f||(f=new tE,gr.prototype.copy.call(f,n),f.color.copy(n.color),f.map=n.map,f.sizeAttenuation=!1,this.cache.add(c,f)),n=f}else if(e.isLine){const c="LineBasicMaterial:"+n.uuid;let f=this.cache.get(c);f||(f=new X_,gr.prototype.copy.call(f,n),f.color.copy(n.color),f.map=n.map,this.cache.add(c,f)),n=f}if(r||o||l){let c="ClonedMaterial:"+n.uuid+":";r&&(c+="derivative-tangents:"),o&&(c+="vertex-colors:"),l&&(c+="flat-shading:");let f=this.cache.get(c);f||(f=n.clone(),o&&(f.vertexColors=!0),l&&(f.flatShading=!0),r&&(f.normalScale&&(f.normalScale.y*=-1),f.clearcoatNormalScale&&(f.clearcoatNormalScale.y*=-1)),this.cache.add(c,f),this.associations.set(f,this.associations.get(n))),n=f}e.material=n}getMaterialType(){return KA}loadMaterial(e){const t=this,n=this.json,r=this.extensions,o=n.materials[e];let l;const c={},f=o.extensions||{},u=[];if(f[wt.KHR_MATERIALS_UNLIT]){const p=r[wt.KHR_MATERIALS_UNLIT];l=p.getMaterialType(),u.push(p.extendParams(c,o,t))}else{const p=o.pbrMetallicRoughness||{};if(c.color=new tt(1,1,1),c.opacity=1,Array.isArray(p.baseColorFactor)){const A=p.baseColorFactor;c.color.setRGB(A[0],A[1],A[2],En),c.opacity=A[3]}p.baseColorTexture!==void 0&&u.push(t.assignTexture(c,"map",p.baseColorTexture,Xt)),c.metalness=p.metallicFactor!==void 0?p.metallicFactor:1,c.roughness=p.roughnessFactor!==void 0?p.roughnessFactor:1,p.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(c,"metalnessMap",p.metallicRoughnessTexture)),u.push(t.assignTexture(c,"roughnessMap",p.metallicRoughnessTexture))),l=this._invokeOne(function(A){return A.getMaterialType&&A.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(A){return A.extendMaterialParams&&A.extendMaterialParams(e,c)})))}o.doubleSided===!0&&(c.side=Yi);const d=o.alphaMode||ap.OPAQUE;if(d===ap.BLEND?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,d===ap.MASK&&(c.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&l!==Gr&&(u.push(t.assignTexture(c,"normalMap",o.normalTexture)),c.normalScale=new Ke(1,1),o.normalTexture.scale!==void 0)){const p=o.normalTexture.scale;c.normalScale.set(p,p)}if(o.occlusionTexture!==void 0&&l!==Gr&&(u.push(t.assignTexture(c,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(c.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&l!==Gr){const p=o.emissiveFactor;c.emissive=new tt().setRGB(p[0],p[1],p[2],En)}return o.emissiveTexture!==void 0&&l!==Gr&&u.push(t.assignTexture(c,"emissiveMap",o.emissiveTexture,Xt)),Promise.all(u).then(function(){const p=new l(c);return o.name&&(p.name=o.name),ys(p,o),t.associations.set(p,{materials:e}),o.extensions&&Eo(r,p,o),p})}createUniqueName(e){const t=Ut.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function o(c){return n[wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c,t).then(function(f){return xE(f,c,t)})}const l=[];for(let c=0,f=e.length;c<f;c++){const u=e[c],d=i5(u),p=r[d];if(p)l.push(p.promise);else{let A;u.extensions&&u.extensions[wt.KHR_DRACO_MESH_COMPRESSION]?A=o(u):A=xE(new xi,u,t),r[d]={primitive:u,promise:A},l.push(A)}}return Promise.all(l)}loadMesh(e){const t=this,n=this.json,r=this.extensions,o=n.meshes[e],l=o.primitives,c=[];for(let f=0,u=l.length;f<u;f++){const d=l[f].material===void 0?e5(this.cache):this.getDependency("material",l[f].material);c.push(d)}return c.push(t.loadGeometries(l)),Promise.all(c).then(function(f){const u=f.slice(0,f.length-1),d=f[f.length-1],p=[];for(let g=0,E=d.length;g<E;g++){const C=d[g],_=l[g];let v;const S=u[g];if(_.mode===Ui.TRIANGLES||_.mode===Ui.TRIANGLE_STRIP||_.mode===Ui.TRIANGLE_FAN||_.mode===void 0)v=o.isSkinnedMesh===!0?new zR(C,S):new Wn(C,S),v.isSkinnedMesh===!0&&v.normalizeSkinWeights(),_.mode===Ui.TRIANGLE_STRIP?v.geometry=vE(v.geometry,b1):_.mode===Ui.TRIANGLE_FAN&&(v.geometry=vE(v.geometry,cA));else if(_.mode===Ui.LINES)v=new WR(C,S);else if(_.mode===Ui.LINE_STRIP)v=new qA(C,S);else if(_.mode===Ui.LINE_LOOP)v=new jR(C,S);else if(_.mode===Ui.POINTS)v=new YR(C,S);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(v.geometry.morphAttributes).length>0&&n5(v,o),v.name=t.createUniqueName(o.name||"mesh_"+e),ys(v,o),_.extensions&&Eo(r,v,_),t.assignFinalMaterial(v),p.push(v)}for(let g=0,E=p.length;g<E;g++)t.associations.set(p[g],{meshes:e,primitives:g});if(p.length===1)return o.extensions&&Eo(r,p[0],o),p[0];const A=new vs;o.extensions&&Eo(r,A,o),t.associations.set(A,{meshes:e});for(let g=0,E=p.length;g<E;g++)A.add(p[g]);return A})}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new $n(AA.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type==="orthographic"&&(t=new Yl(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),ys(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let r=0,o=t.joints.length;r<o;r++)n.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(r){const o=r.pop(),l=r,c=[],f=[];for(let u=0,d=l.length;u<d;u++){const p=l[u];if(p){c.push(p);const A=new ct;o!==null&&A.fromArray(o.array,u*16),f.push(A)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new WA(c,f)})}loadAnimation(e){const t=this.json,n=this,r=t.animations[e],o=r.name?r.name:"animation_"+e,l=[],c=[],f=[],u=[],d=[];for(let p=0,A=r.channels.length;p<A;p++){const g=r.channels[p],E=r.samplers[g.sampler],C=g.target,_=C.node,v=r.parameters!==void 0?r.parameters[E.input]:E.input,S=r.parameters!==void 0?r.parameters[E.output]:E.output;C.node!==void 0&&(l.push(this.getDependency("node",_)),c.push(this.getDependency("accessor",v)),f.push(this.getDependency("accessor",S)),u.push(E),d.push(C))}return Promise.all([Promise.all(l),Promise.all(c),Promise.all(f),Promise.all(u),Promise.all(d)]).then(function(p){const A=p[0],g=p[1],E=p[2],C=p[3],_=p[4],v=[];for(let S=0,y=A.length;S<y;S++){const x=A[S],w=g[S],b=E[S],B=C[S],L=_[S];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const R=n._createAnimationTracks(x,w,b,B,L);if(R)for(let T=0;T<R.length;T++)v.push(R[T])}return new ib(o,void 0,v)})}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return r.mesh===void 0?null:n.getDependency("mesh",r.mesh).then(function(o){const l=n._getNodeRef(n.meshCache,r.mesh,o);return r.weights!==void 0&&l.traverse(function(c){if(c.isMesh)for(let f=0,u=r.weights.length;f<u;f++)c.morphTargetInfluences[f]=r.weights[f]}),l})}loadNode(e){const t=this.json,n=this,r=t.nodes[e],o=n._loadNodeShallow(e),l=[],c=r.children||[];for(let u=0,d=c.length;u<d;u++)l.push(n.getDependency("node",c[u]));const f=r.skin===void 0?Promise.resolve(null):n.getDependency("skin",r.skin);return Promise.all([o,Promise.all(l),f]).then(function(u){const d=u[0],p=u[1],A=u[2];A!==null&&d.traverse(function(g){g.isSkinnedMesh&&g.bind(A,s5)});for(let g=0,E=p.length;g<E;g++)d.add(p[g]);return d})}_loadNodeShallow(e){const t=this.json,n=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const o=t.nodes[e],l=o.name?r.createUniqueName(o.name):"",c=[],f=r._invokeOne(function(u){return u.createNodeMesh&&u.createNodeMesh(e)});return f&&c.push(f),o.camera!==void 0&&c.push(r.getDependency("camera",o.camera).then(function(u){return r._getNodeRef(r.cameraCache,o.camera,u)})),r._invokeAll(function(u){return u.createNodeAttachment&&u.createNodeAttachment(e)}).forEach(function(u){c.push(u)}),this.nodeCache[e]=Promise.all(c).then(function(u){let d;if(o.isBone===!0?d=new W_:u.length>1?d=new vs:u.length===1?d=u[0]:d=new tn,d!==u[0])for(let p=0,A=u.length;p<A;p++)d.add(u[p]);if(o.name&&(d.userData.name=o.name,d.name=l),ys(d,o),o.extensions&&Eo(n,d,o),o.matrix!==void 0){const p=new ct;p.fromArray(o.matrix),d.applyMatrix4(p)}else o.translation!==void 0&&d.position.fromArray(o.translation),o.rotation!==void 0&&d.quaternion.fromArray(o.rotation),o.scale!==void 0&&d.scale.fromArray(o.scale);return r.associations.has(d)||r.associations.set(d,{}),r.associations.get(d).nodes=e,d}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,o=new vs;n.name&&(o.name=r.createUniqueName(n.name)),ys(o,n),n.extensions&&Eo(t,o,n);const l=n.nodes||[],c=[];for(let f=0,u=l.length;f<u;f++)c.push(r.getDependency("node",l[f]));return Promise.all(c).then(function(f){for(let d=0,p=f.length;d<p;d++)o.add(f[d]);const u=d=>{const p=new Map;for(const[A,g]of r.associations)(A instanceof gr||A instanceof Rn)&&p.set(A,g);return d.traverse(A=>{const g=r.associations.get(A);g!=null&&p.set(A,g)}),p};return r.associations=u(o),o})}_createAnimationTracks(e,t,n,r,o){const l=[],c=e.name?e.name:e.uuid,f=[];Es[o.path]===Es.weights?e.traverse(function(A){A.morphTargetInfluences&&f.push(A.name?A.name:A.uuid)}):f.push(c);let u;switch(Es[o.path]){case Es.weights:u=Ca;break;case Es.rotation:u=_o;break;case Es.position:case Es.scale:u=xa;break;default:switch(n.itemSize){case 1:u=Ca;break;case 2:case 3:default:u=xa;break}break}const d=r.interpolation!==void 0?$b[r.interpolation]:Jo,p=this._getArrayFromAccessor(n);for(let A=0,g=f.length;A<g;A++){const E=new u(f[A]+"."+Es[o.path],t.array,p,d);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(E),l.push(E)}return l}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=cp(t.constructor),r=new Float32Array(t.length);for(let o=0,l=t.length;o<l;o++)r[o]=t[o]*n;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const r=this instanceof _o?Zb:yE;return new r(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function a5(i,e,t){const n=e.attributes,r=new gn;if(n.POSITION!==void 0){const c=t.json.accessors[n.POSITION],f=c.min,u=c.max;if(f!==void 0&&u!==void 0){if(r.set(new j(f[0],f[1],f[2]),new j(u[0],u[1],u[2])),c.normalized){const d=cp(Ma[c.componentType]);r.min.multiplyScalar(d),r.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const o=e.targets;if(o!==void 0){const c=new j,f=new j;for(let u=0,d=o.length;u<d;u++){const p=o[u];if(p.POSITION!==void 0){const A=t.json.accessors[p.POSITION],g=A.min,E=A.max;if(g!==void 0&&E!==void 0){if(f.setX(Math.max(Math.abs(g[0]),Math.abs(E[0]))),f.setY(Math.max(Math.abs(g[1]),Math.abs(E[1]))),f.setZ(Math.max(Math.abs(g[2]),Math.abs(E[2]))),A.normalized){const C=cp(Ma[A.componentType]);f.multiplyScalar(C)}c.max(f)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(c)}i.boundingBox=r;const l=new Ji;r.getCenter(l.center),l.radius=r.min.distanceTo(r.max)/2,i.boundingSphere=l}function xE(i,e,t){const n=e.attributes,r=[];function o(l,c){return t.getDependency("accessor",l).then(function(f){i.setAttribute(c,f)})}for(const l in n){const c=op[l]||l.toLowerCase();c in i.attributes||r.push(o(n[l],c))}if(e.indices!==void 0&&!i.index){const l=t.getDependency("accessor",e.indices).then(function(c){i.setIndex(c)});r.push(l)}return Nt.workingColorSpace!==En&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Nt.workingColorSpace}" not supported.`),ys(i,e),a5(i,e,t),Promise.all(r).then(function(){return e.targets!==void 0?t5(i,e.targets,t):i})}class l5{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const n=this.workersResolve[e];if(n&&n(t),this.queue.length){const{resolve:r,msg:o,transfer:l}=this.queue.shift();this.workersResolve[e]=r,this.workers[e].postMessage(o,l)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(n=>{const r=this._getIdleWorker();r!==-1?(this._initWorker(r),this.workerStatus|=1<<r,this.workersResolve[r]=n,this.workers[r].postMessage(e,t)):this.queue.push({resolve:n,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const c5=0,SE=2,u5=1,wE=2,f5=0,h5=1,d5=10,A5=0,ME=9,TE=15,BE=16,RE=22,bE=37,LE=43,DE=76,NE=83,PE=97,UE=100,kE=103,FE=109,QE=165,OE=166;class p5{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class ec{constructor(e,t,n,r){this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=r,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==t&&r<e;)r++,this._offset++;return r<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,r)}}const ti=[171,75,84,88,32,50,48,187,13,10,26,10];function zE(i){return typeof TextDecoder<"u"?new TextDecoder().decode(i):Buffer.from(i).toString("utf8")}function g5(i){const e=new Uint8Array(i.buffer,i.byteOffset,ti.length);if(e[0]!==ti[0]||e[1]!==ti[1]||e[2]!==ti[2]||e[3]!==ti[3]||e[4]!==ti[4]||e[5]!==ti[5]||e[6]!==ti[6]||e[7]!==ti[7]||e[8]!==ti[8]||e[9]!==ti[9]||e[10]!==ti[10]||e[11]!==ti[11])throw new Error("Missing KTX 2.0 identifier.");const t=new p5,n=17*Uint32Array.BYTES_PER_ELEMENT,r=new ec(i,ti.length,n,!0);t.vkFormat=r._nextUint32(),t.typeSize=r._nextUint32(),t.pixelWidth=r._nextUint32(),t.pixelHeight=r._nextUint32(),t.pixelDepth=r._nextUint32(),t.layerCount=r._nextUint32(),t.faceCount=r._nextUint32();const o=r._nextUint32();t.supercompressionScheme=r._nextUint32();const l=r._nextUint32(),c=r._nextUint32(),f=r._nextUint32(),u=r._nextUint32(),d=r._nextUint64(),p=r._nextUint64(),A=new ec(i,ti.length+n,3*o*8,!0);for(let te=0;te<o;te++)t.levels.push({levelData:new Uint8Array(i.buffer,i.byteOffset+A._nextUint64(),A._nextUint64()),uncompressedByteLength:A._nextUint64()});const g=new ec(i,l,c,!0),E={vendorId:g._skip(4)._nextUint16(),descriptorType:g._nextUint16(),versionNumber:g._nextUint16(),descriptorBlockSize:g._nextUint16(),colorModel:g._nextUint8(),colorPrimaries:g._nextUint8(),transferFunction:g._nextUint8(),flags:g._nextUint8(),texelBlockDimension:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],bytesPlane:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],samples:[]},C=(E.descriptorBlockSize/4-6)/4;for(let te=0;te<C;te++){const Y={bitOffset:g._nextUint16(),bitLength:g._nextUint8(),channelType:g._nextUint8(),samplePosition:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&Y.channelType?(Y.sampleLower=g._nextInt32(),Y.sampleUpper=g._nextInt32()):(Y.sampleLower=g._nextUint32(),Y.sampleUpper=g._nextUint32()),E.samples[te]=Y}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(E);const _=new ec(i,f,u,!0);for(;_._offset<u;){const te=_._nextUint32(),Y=_._scan(te),$=zE(Y),U=_._scan(te-Y.byteLength);t.keyValue[$]=$.match(/^ktx/i)?zE(U):U,_._offset%4&&_._skip(4-_._offset%4)}if(p<=0)return t;const v=new ec(i,d,p,!0),S=v._nextUint16(),y=v._nextUint16(),x=v._nextUint32(),w=v._nextUint32(),b=v._nextUint32(),B=v._nextUint32(),L=[];for(let te=0;te<o;te++)L.push({imageFlags:v._nextUint32(),rgbSliceByteOffset:v._nextUint32(),rgbSliceByteLength:v._nextUint32(),alphaSliceByteOffset:v._nextUint32(),alphaSliceByteLength:v._nextUint32()});const R=d+v._offset,T=R+x,N=T+w,k=N+b,O=new Uint8Array(i.buffer,i.byteOffset+R,x),F=new Uint8Array(i.buffer,i.byteOffset+T,w),V=new Uint8Array(i.buffer,i.byteOffset+N,b),X=new Uint8Array(i.buffer,i.byteOffset+k,B);return t.globalData={endpointCount:S,selectorCount:y,imageDescs:L,endpointsData:O,selectorsData:F,tablesData:V,extendedData:X},t}let up,jr,fp;const hp={env:{emscripten_notify_memory_growth:function(i){fp=new Uint8Array(jr.exports.memory.buffer)}}};class m5{init(){return up||(up=typeof fetch<"u"?fetch("data:application/wasm;base64,"+GE).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,hp)).then(this._init):WebAssembly.instantiate(Buffer.from(GE,"base64"),hp).then(this._init),up)}_init(e){jr=e.instance,hp.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!jr)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,r=jr.exports.malloc(n);fp.set(e,r),t=t||Number(jr.exports.ZSTD_findDecompressedSize(r,n));const o=jr.exports.malloc(t),l=jr.exports.ZSTD_decompress(o,t,r,n),c=fp.slice(o,o+l);return jr.exports.free(r),jr.exports.free(o),c}}const GE="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQC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FBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQN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AJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQ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rIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0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wBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQ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AABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",dp=new WeakMap;let Ap=0,pp;class yr extends _s{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new l5,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},e.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}init(){if(!this.transcoderPending){const e=new wa(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new wa(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const r=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,r]).then(([o,l])=>{const c=yr.BasisWorker.toString(),f=["/* constants */","let _EngineFormat = "+JSON.stringify(yr.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(yr.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(yr.BasisFormat),"/* basis_transcoder.js */",o,"/* worker */",c.substring(c.indexOf("{")+1,c.lastIndexOf("}"))].join(`
3621
3621
  `);this.workerSourceURL=URL.createObjectURL(new Blob([f])),this.transcoderBinary=l,this.workerPool.setWorkerCreator(()=>{const u=new Worker(this.workerSourceURL),d=this.transcoderBinary.slice(0);return u.postMessage({type:"init",config:this.workerConfig,transcoderBinary:d},[d]),u})}),Ap>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Ap++}return this.transcoderPending}load(e,t,n,r){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const o=new wa(this.manager);o.setResponseType("arraybuffer"),o.setWithCredentials(this.withCredentials),o.load(e,l=>{if(dp.has(l))return dp.get(l).promise.then(t).catch(r);this._createTexture(l).then(c=>t?t(c):null).catch(r)},n,r)}_createTextureFrom(e,t){const{faces:n,width:r,height:o,format:l,type:c,error:f,dfdFlags:u}=e;if(c==="error")return Promise.reject(f);let d;if(t.faceCount===6)d=new XR(n,l,fn);else{const p=n[0].mipmaps;d=t.layerCount>1?new qR(p,r,o,t.layerCount,l,fn):new tf(p,r,o,l,fn)}return d.minFilter=n[0].mipmaps.length===1?un:Pr,d.magFilter=un,d.generateMipmaps=!1,d.needsUpdate=!0,d.colorSpace=HE(t),d.premultiplyAlpha=!!(u&u5),d}async _createTexture(e,t={}){const n=g5(new Uint8Array(e));if(n.vkFormat!==A5)return _5(n);const r=t,o=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:r},[e])).then(l=>this._createTextureFrom(l.data,n));return dp.set(e,{promise:o}),o}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Ap--,this}}yr.BasisFormat={ETC1S:0,UASTC_4x4:1},yr.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},yr.EngineFormat={RGBAFormat:on,RGBA_ASTC_4x4_Format:aA,RGBA_BPTC_Format:pu,RGBA_ETC2_EAC_Format:oA,RGBA_PVRTC_4BPPV1_Format:rA,RGBA_S3TC_DXT5_Format:du,RGB_ETC1_Format:u1,RGB_ETC2_Format:sA,RGB_PVRTC_4BPPV1_Format:iA,RGB_S3TC_DXT1_Format:hu},yr.BasisWorker=function(){let i,e,t;const n=_EngineFormat,r=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",function(E){const C=E.data;switch(C.type){case"init":i=C.config,l(C.transcoderBinary);break;case"transcode":e.then(()=>{try{const{faces:_,buffers:v,width:S,height:y,hasAlpha:x,format:w,dfdFlags:b}=c(C.buffer);self.postMessage({type:"transcode",id:C.id,faces:_,width:S,height:y,hasAlpha:x,format:w,dfdFlags:b},v)}catch(_){console.error(_),self.postMessage({type:"error",id:C.id,error:_.message})}});break}});function l(E){e=new Promise(C=>{t={wasmBinary:E,onRuntimeInitialized:C},BASIS(t)}).then(()=>{t.initializeBasis(),t.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function c(E){const C=new t.KTX2File(new Uint8Array(E));function _(){C.close(),C.delete()}if(!C.isValid())throw _(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");const v=C.isUASTC()?o.UASTC_4x4:o.ETC1S,S=C.getWidth(),y=C.getHeight(),x=C.getLayers()||1,w=C.getLevels(),b=C.getFaces(),B=C.getHasAlpha(),L=C.getDFDFlags(),{transcoderFormat:R,engineFormat:T}=p(v,S,y,B);if(!S||!y||!w)throw _(),new Error("THREE.KTX2Loader: Invalid texture");if(!C.startTranscoding())throw _(),new Error("THREE.KTX2Loader: .startTranscoding failed");const N=[],k=[];for(let O=0;O<b;O++){const F=[];for(let V=0;V<w;V++){const X=[];let te,Y;for(let U=0;U<x;U++){const D=C.getImageLevelInfo(V,U,O);O===0&&V===0&&U===0&&(D.origWidth%4!==0||D.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),w>1?(te=D.origWidth,Y=D.origHeight):(te=D.width,Y=D.height);const G=new Uint8Array(C.getImageTranscodedSizeInBytes(V,U,0,R));if(!C.transcodeImage(G,V,U,O,R,0,-1,-1))throw _(),new Error("THREE.KTX2Loader: .transcodeImage failed.");X.push(G)}const $=g(X);F.push({data:$,width:te,height:Y}),k.push($.buffer)}N.push({mipmaps:F,width:S,height:y,format:T})}return _(),{faces:N,buffers:k,width:S,height:y,hasAlpha:B,format:T,dfdFlags:L}}const f=[{if:"astcSupported",basisFormat:[o.UASTC_4x4],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[o.ETC1S,o.UASTC_4x4],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[o.ETC1S,o.UASTC_4x4],transcoderFormat:[r.BC1,r.BC3],engineFormat:[n.RGB_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[o.ETC1S,o.UASTC_4x4],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[o.ETC1S,o.UASTC_4x4],transcoderFormat:[r.ETC1],engineFormat:[n.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[o.ETC1S,o.UASTC_4x4],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],u=f.sort(function(E,C){return E.priorityETC1S-C.priorityETC1S}),d=f.sort(function(E,C){return E.priorityUASTC-C.priorityUASTC});function p(E,C,_,v){let S,y;const x=E===o.ETC1S?u:d;for(let w=0;w<x.length;w++){const b=x[w];if(i[b.if]&&b.basisFormat.includes(E)&&!(v&&b.transcoderFormat.length<2)&&!(b.needsPowerOfTwo&&!(A(C)&&A(_))))return S=b.transcoderFormat[v?1:0],y=b.engineFormat[v?1:0],{transcoderFormat:S,engineFormat:y}}return console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32."),S=r.RGBA32,y=n.RGBAFormat,{transcoderFormat:S,engineFormat:y}}function A(E){return E<=2?!0:(E&E-1)===0&&E!==0}function g(E){if(E.length===1)return E[0];let C=0;for(let S=0;S<E.length;S++){const y=E[S];C+=y.byteLength}const _=new Uint8Array(C);let v=0;for(let S=0;S<E.length;S++){const y=E[S];_.set(y,v),v+=y.byteLength}return _}};const v5=new Set([on,co,lo]),gp={[FE]:on,[PE]:on,[bE]:on,[LE]:on,[kE]:co,[NE]:co,[BE]:co,[RE]:co,[UE]:lo,[DE]:lo,[TE]:lo,[ME]:lo,[OE]:Au,[QE]:Au},mp={[FE]:hn,[PE]:Jn,[bE]:fn,[LE]:fn,[kE]:hn,[NE]:Jn,[BE]:fn,[RE]:fn,[UE]:hn,[DE]:Jn,[TE]:fn,[ME]:fn,[OE]:fn,[QE]:fn};async function _5(i){const{vkFormat:e}=i;if(gp[e]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");let t;i.supercompressionScheme===SE&&(pp||(pp=new Promise(async o=>{const l=new m5;await l.init(),o(l)})),t=await pp);const n=[];for(let o=0;o<i.levels.length;o++){const l=Math.max(1,i.pixelWidth>>o),c=Math.max(1,i.pixelHeight>>o),f=i.pixelDepth?Math.max(1,i.pixelDepth>>o):0,u=i.levels[o];let d;if(i.supercompressionScheme===c5)d=u.levelData;else if(i.supercompressionScheme===SE)d=t.decode(u.levelData,u.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let p;mp[e]===hn?p=new Float32Array(d.buffer,d.byteOffset,d.byteLength/Float32Array.BYTES_PER_ELEMENT):mp[e]===Jn?p=new Uint16Array(d.buffer,d.byteOffset,d.byteLength/Uint16Array.BYTES_PER_ELEMENT):p=d,n.push({data:p,width:l,height:c,depth:f})}let r;if(v5.has(gp[e]))r=i.pixelDepth===0?new _a(n[0].data,i.pixelWidth,i.pixelHeight):new W1(n[0].data,i.pixelWidth,i.pixelHeight,i.pixelDepth);else{if(i.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");r=new tf(n,i.pixelWidth,i.pixelHeight)}return r.mipmaps=n,r.type=mp[e],r.format=gp[e],r.colorSpace=HE(i),r.needsUpdate=!0,Promise.resolve(r)}function HE(i){const e=i.dataFormatDescriptor[0];return e.colorPrimaries===h5?e.transferFunction===wE?Xt:En:e.colorPrimaries===d5?e.transferFunction===wE?gu:Ul:(e.colorPrimaries===f5||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),ci)}class E5 extends cb{constructor(e){super(e),this.type=Jn}parse(e){const l=function(L,R){switch(L){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(R||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(R||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(R||""));default:case 4:throw new Error("THREE.RGBELoader: Memory Error: "+(R||""))}},d=`
3622
3622
  `,p=function(L,R,T){R=R||1024;let k=L.pos,O=-1,F=0,V="",X=String.fromCharCode.apply(null,new Uint16Array(L.subarray(k,k+128)));for(;0>(O=X.indexOf(d))&&F<R&&k<L.byteLength;)V+=X,F+=X.length,k+=128,X+=String.fromCharCode.apply(null,new Uint16Array(L.subarray(k,k+128)));return-1<O?(T!==!1&&(L.pos+=F+O+1),V+X.slice(0,O)):!1},A=function(L){const R=/^#\?(\S+)/,T=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,N=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,k=/^\s*FORMAT=(\S+)\s*$/,O=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,F={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let V,X;for((L.pos>=L.byteLength||!(V=p(L)))&&l(1,"no header found"),(X=V.match(R))||l(3,"bad initial token"),F.valid|=1,F.programtype=X[1],F.string+=V+`
3623
3623
  `;V=p(L),V!==!1;){if(F.string+=V+`
@@ -4230,7 +4230,7 @@ bool bvhIntersectFirstHit(
4230
4230
  `)},o.matrixAutoUpdate=!0,Qn.matrixAutoUpdate=!0,Qn.needsUpdate=!0)}o.material&&o.material.name.toLowerCase()=="frame-stems"&&(Ht=zL,Ht.envMap=this.scene.environment,o.material=Ht,o.matrixAutoUpdate=!0,Ht.matrixAutoUpdate=!0,Ht.needsUpdate=!0),o.material&&o.name==="Diamonds"&&(this.initGemstoneDependencies(),Xr.uniforms.bvh.value=new gy,Xr.uniforms.bvh.value.updateFrom(new Fp(o.geometry.clone().toNonIndexed(),{strategy:YE})),o.material=Xr)}});let r=n-t;e.scene.position.y+=r,xn.minY.value+=r,xn.maxY.value+=r}async loadEyewearFromGLTF(e,t,n,r,o){const l=new aE,c=new yr(l).setTranscoderPath("https://unpkg.com/three@0.146.0/examples/js/libs/basis/");e.setKTX2Loader(c.detectSupport(n));const f=o,u=t.includes(".glb");let d;return u?d=await e.loadAsync(t):d=await this.LoadEncryptedGlb(e,t,f).then(p=>{r?this.updateScene(p.result):this.updateMaterials(p.result),this.loadModelInsideScene(p.result.scene)}),d==null?void 0:d.scene}setupLensMaterial(e){if(Qn){if(e.direction=="u")Qn.color=new tt(e.color),Qn.opacity=e.opacity,xn.uAlpha.value=!1;else if(e.direction=="tb"){const t=e.gradientColors;xn.uAlpha.value=!0;let n=0;t.forEach(()=>{xn.colors.value[n]=new tt(t[n].color),xn.positions.value[n]=t[n].position,xn.opacities.value[n]=t[n].alpha,n++})}e.finish=="MIRBLKHMC"?(Qn.clearcoat=1,Qn.clearcoatRoughness=0):e.finish=="HMCCR"?(Qn.clearcoat=0,Qn.clearcoatRoughness=1):e.finish=="MIRSILHMC"&&(Qn.clearcoat=1,Qn.clearcoatRoughness=0),Qn.roughness=e.roughness,Qn.metalness=e.metalness}}async downloadTexture(e){let t;return await this.textureLoader.loadAsync(e).then(n=>{n.colorSpace=Xt,n.flipY=!1,n.magFilter=qt,n.wrapS=Fn,n.wrapT=Fn,t=n}).then(()=>t)}resetOrbitalMaterial(e){e.metalness=0,e.roughness=.05,e.ior=1,e.opacity=1,e.clearcoat=0,e.color=new tt(16777215),e.transparent=!1,e.shadowSide=Bn,e.depthWrite=!0,e.map=null,e.alphaMap=null,e.aoMap=null,e.roughnessMap=null,e.metalnessMap=null,e.normalMap=null,e.transmission=0}async setupOrbitalMaterial(e){Ht&&(this.resetOrbitalMaterial(Ht),e.texture?(e.texture.baseColor&&await this.downloadTexture(e.texture.baseColor).then(t=>{Ht.map=t}),e.texture.opacity&&await this.downloadTexture(e.texture.opacity).then(t=>{Ht.alphaMap=t}),e.texture.thickness&&await this.downloadTexture(e.texture.thickness).then(t=>{Ht.thicknessMap=t}),e.texture.orm?await this.downloadTexture(e.texture.orm).then(t=>{Ht.aoMap=t,Ht.roughnessMap=t,Ht.metalnessMap=t}):(Ht.roughness=e.roughness,Ht.metalness=e.metalness)):(Ht.color=new tt(e.color),Ht.roughness=e.roughness,Ht.metalness=e.metalness),e.ior>1?(Ht.ior=e.ior,Ht.transmission=1,Ht.transparent=!0,Ht.thickness=.05):(Ht.ior=1,Ht.transmission=0,Ht.transparent=!1,Ht.opacity=e.opacity),Ht.clearcoat=0)}setupAndRenderScene(){if(!this.camera||!this.renderer)return;this.scene.add(this.camera);const e=new Tb(this.camera,this.canvas);e.target.set(.003059340956040225,-.13425621157020154,-.2564218846390263),this.renderer.getSize(new Ke),/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)?(this.camera.position.set(4.2,5.2,12),e.minDistance=3,e.maxDistance=14,e.rotateSpeed=.8):(this.camera.position.set(2.2,2.2,4),e.minDistance=2,e.maxDistance=7,e.rotateSpeed=.5),e.enableDamping=!0,e.dampingFactor=.2,e.enablePan=!0,e.minPolarAngle=-Math.PI*5/36,e.maxPolarAngle=Math.PI*3/5,e.update(),this.renderer.toneMapping=Kd,this.renderer.toneMappingExposure=1.2,this.renderer.setClearColor(15724527),this.renderer.outputColorSpace=Xt;const n=2.5,r=2.5,o=.4,l={shadow:{blur:.6,darkness:1,opacity:.6},plane:{color:"#ffffff",opacity:1},showWireframe:!1},c=new vs;c.position.y=-.315,this.scene.add(c);const f=new Xi(256,256);f.texture.generateMipmaps=!1;const u=new Xi(256,256);u.texture.generateMipmaps=!1;const d=new Wu(n,r).rotateX(Math.PI/2),p=new Gr({map:f.texture,opacity:l.shadow.opacity,transparent:!0,depthWrite:!1}),A=new Wn(d,p);A.renderOrder=1,c.add(A),A.scale.y=-1;const g=new Wn(d);g.visible=!1,c.add(g);const E=new Yl(-n/2,n/2,r/2,-r/2,0,o);E.rotation.x=Math.PI/2,c.add(E);const C=new F_;C.userData.darkness={value:l.shadow.darkness},C.onBeforeCompile=T=>{const N=T;N.uniforms.darkness=C.userData.darkness,N.fragmentShader=`
4231
4231
  uniform float darkness;
4232
4232
  ${T.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * darkness );")}
4233
- `},C.depthTest=!1,C.depthWrite=!1;const _=new Si(b5);_.depthTest=!1;const v=new Si(L5);v.depthTest=!1;function S(T,N){g.visible=!0,g.material=_,g.material.uniforms.tDiffuse.value=f.texture,_.uniforms.h.value=T*1/256,N.setRenderTarget(u),N.render(g,E),g.material=v,g.material.uniforms.tDiffuse.value=u.texture,v.uniforms.v.value=T*1/256,N.setRenderTarget(f),N.render(g,E),g.visible=!1}E.far=.125,y();function y(){E.updateProjectionMatrix()}const x=new B5,w=new R5(this.scene,this.camera);w.clearAlpha=0;const b=this.renderer.getDrawingBufferSize(new Ke),B=new Xi(b.width,b.height,{samples:4,type:Jn}),L=new M5(this.renderer,B);L.addPass(w),L.addPass(x);const R=()=>{var T;e.update(),this.resizeRenderer()&&(this.camera.aspect=this.canvas.clientWidth/this.canvas.clientHeight,(T=this.camera)==null||T.updateProjectionMatrix());const N=this.scene.background;if(this.scene.background=null,this.scene.overrideMaterial=C,!this.renderer||!this.camera)return;const k=this.renderer.getClearAlpha();this.renderer.setClearAlpha(0),this.renderer.clear(),this.renderer.setRenderTarget(f),this.renderer.render(this.scene,E),this.scene.overrideMaterial=null,S(l.shadow.blur,this.renderer),S(l.shadow.blur*.4,this.renderer),this.renderer.setRenderTarget(null),this.renderer.setClearAlpha(k),this.scene.background=N,Xr.uniforms.viewMatrixInverse.value=this.camera.matrixWorld,Xr.uniforms.projectionMatrixInverse.value=this.camera.projectionMatrixInverse,requestAnimationFrame(R),L.render()};R()}loadModelInsideScene(e){this.scene.traverse(t=>{t.name=="Scene"&&(this.scene.remove(t),t.traverse(n=>{n instanceof Wn&&(n.geometry.dispose(),n.material.dispose())}))}),this.scene.add(e)}}class VL{constructor(){Ft(this,"customRenderer"),this.customRenderer=new HL}async Init(){this.customRenderer.isInitialised||(await this.customRenderer.intialize(),this.customRenderer.setupAndRenderScene())}loadFirstFrame(e,t,n){return new Promise((r,o)=>{this.customRenderer.loadFirstFrame(e,t).then(()=>{r(1)}).catch(l=>{o(l)})})}changeFrame(e,t,n){return this.customRenderer.changeFrame(e,t,n)}changeLens(e,t,n,r){return this.customRenderer.changeLens(e,t,n,r)}changeOrbital(e){return this.customRenderer.changeOrbital(e)}}class WL{constructor(e){Ft(this,"orgId"),Ft(this,"rendererService"),Ft(this,"isLoading",!1),Ft(this,"userContainerId"),Ft(this,"containerElement",null),Ft(this,"defaultSelectorId","dita-3dconfig-element"),Ft(this,"defaultCanvasStyle",{width:"100%",height:"100%"}),Ft(this,"customisationArr",[]),Ft(this,"assetDetails",null),this.userContainerId=e.userContainerId,this.rendererService=new VL,this.orgId=e.orgId}prepareDOM(){const e=this.userContainerId??this.defaultSelectorId,t=document.getElementById(e);if(!t)throw new Error(`Container not found to embed 3d-configurator ${this.defaultSelectorId}`);this.containerElement=t;const n=document.createElement("canvas");return n.className="sprie-config-webgl",t.innerHTML="",t.appendChild(n),Object.assign(n.style,this.defaultCanvasStyle),!0}async loadFrame(e){return this.assetDetails=e.data.assetDetails,this.customisationArr=e.data.customisation,this.prepareDOM(),await this.rendererService.Init(),await this.rendererService.loadFirstFrame(this.orgId,this.assetDetails,this.customisationArr),this}changeFrame(e,t){return this.rendererService.changeFrame(this.orgId,e,t)}changeLens(e,t,n){return this.rendererService.changeLens(e,this.orgId,t,n)}changeOrbital(e){return this.rendererService.changeOrbital(e)}unmount(){this.containerElement&&(this.containerElement.innerHTML="",this.containerElement.style.height="0px",this.containerElement.style.width="auto")}}class Ey{constructor(){Ft(this,"events"),Ft(this,"authService"),Ft(this,"instanceArr"),this.authService=new xx,this.events=new Nx,this.instanceArr=[]}async Init(e){await this.authService.Init(e),hl.setJWT(this.authService.authPayload.JWT)}async loadBySKU(e){const t=await Lh.FetchAssetBySKUOrBarcode({sku:e.SKU,barcode:null});return await this.renderAsset({data:{assetDetails:t,customisation:t.customisation}})}async renderAsset(e){return new WL({orgId:this.authService.authPayload.ORGID,userContainerId:e.containerId}).loadFrame({containerId:e.containerId,data:{assetDetails:e.data.assetDetails,customisation:e.data.customisation}})}}window.ThreeDConfigurator=Ey;const ZN="",$N="";function jL({frameList:i,selectedFrame:e,modelLoading:t,onChangeFrame:n}){const r=window.innerWidth<=576;return De.jsx("div",{className:"sprie-config-palette",style:{padding:"0 4rem 1.6rem 4rem",marginTop:r?"1rem":"0"},children:i==null?void 0:i.map(o=>De.jsxs("div",{className:"sprie-config-palette-img-box",children:[De.jsx("button",{style:{border:"0",cursor:t?"default":"pointer",opacity:(e==null?void 0:e._id)===o._id?"1":".6",width:r?45:60,height:r?45:60},onClick:()=>n(o),disabled:t,children:De.jsx("img",{src:o.variantImage,alt:o.name+"image",className:`sprie-config-image ${r?"mobile-view":""}`,style:{transform:(e==null?void 0:e._id)===o._id?"scale(1.2,1.2)":"scale(1,1)"}})}),(e==null?void 0:e._id)===o._id&&De.jsx("p",{className:"sprie-config-palette-img-text",children:De.jsx("span",{className:"sprie-config-palette-imgName",children:o.name})})]},o._id))})}function YL({lensList:i,selectedLens:e,modelLoading:t,onChangeLens:n}){const r=window.innerWidth<=576;return De.jsx("div",{className:"sprie-config-palette",style:{padding:"0 1.2rem 1.6rem 1.2rem",marginTop:r?"1rem":"0",gap:r?".3rem":"1rem"},children:i==null?void 0:i.map(o=>De.jsxs("div",{className:"sprie-config-palette-img-box",children:[De.jsx("button",{style:{border:"0",cursor:t?"default":"pointer",opacity:(e==null?void 0:e._id)===o._id?"1":".6",width:r?45:60,height:r?45:60},onClick:()=>n(o),disabled:t,children:De.jsx("img",{src:o.thumbnail,alt:o.name+"image",className:`sprie-config-image ${r?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===o._id?"1px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),(e==null?void 0:e._id)===o._id&&De.jsx("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.2rem"},children:De.jsx("span",{className:"sprie-config-palette-imgName",children:o.name})})]},o._id))})}const e8="";function qL({heading:i,onChecked:e,onTextAdded:t}){const[n,r]=Ct.useState(""),[o,l]=Ct.useState(!1),[c,f]=Ct.useState(!1),u=Ct.useRef(null);return Ct.useEffect(()=>{e(o),o&&u.current?(u.current.style.backgroundColor="#ffffff",u.current.focus()):!o&&u.current&&(u.current.style.backgroundColor="transparent",u.current.blur(),r(""))}),Ct.useEffect(()=>{c&&n!=""&&t(n)},[c]),De.jsxs("div",{className:"sprie-config-engraving-block",style:{marginTop:".5rem"},children:[De.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".8rem"},children:[De.jsx("input",{type:"checkbox",className:"sprie-config-engraving-checkbox",onChange:d=>{l(d.target.checked)},checked:o}),De.jsxs("p",{style:{fontSize:".9rem",color:"#4d4d4d",fontWeight:"500",margin:"0"},children:["Add ","Laser Engraving"," ",De.jsx("span",{style:{fontWeight:"400"},children:"(OPTIONAL)"})]})]}),De.jsxs("div",{className:"sprie-config-engraving-inputField-block",children:[De.jsx("input",{type:"text",ref:u,className:"sprie-config-engraving-inputField",placeholder:"ADD CUSTOM TEXT",value:n,onChange:d=>r(d.target.value),maxLength:15,style:{padding:"0.7rem"},disabled:!o,onBlur:d=>f(!0),onFocus:d=>f(!1)}),De.jsx("span",{className:"sprie-config-engraving-inputInfo",children:`${n.length}/15 characters`}),De.jsx("a",{href:"#",className:"sprie-config-engraving-link",children:"About Custom Laser Engraving"})]})]})}const t8="";function XL({totalSteps:i,currentStep:e}){const t=window.innerWidth<=576;return De.jsx("div",{className:"step-tracker-block",style:{margin:t?"1rem 0":".7rem 0 1rem 0",paddingBottom:"1.5rem"},children:De.jsx("div",{className:"step-tracker",children:Array.from({length:i}).map((n,r)=>De.jsx("div",{className:`step-circle ${r+1===e?"active":""}`},r))})})}function KL({nextSlide:i,previousSlide:e,currentIndex:t,stepsName:n,isLastStep:r}){return De.jsxs("div",{className:"carousel-header",children:[De.jsx("button",{className:"carousel-btn prev",onClick:e,style:{visibility:t!==0?"visible":"hidden"},children:De.jsx("i",{className:"arrow left-arrow",style:{padding:".25rem"}})}),De.jsxs("p",{children:[De.jsx("span",{className:"step-syntax",children:`STEP ${t+1}: `}),De.jsx("span",{className:"select-syntax",children:n[t]})]}),De.jsx("button",{className:"carousel-btn next",onClick:i,style:{visibility:r?"hidden":"visible"},children:De.jsx("i",{className:"arrow right-arrow",style:{padding:".25rem"}})})]})}function JL({setShowAddToCart:i,children:e}){var u;const[t,n]=Ct.useState(0),r=Hc.Children.toArray(e),o=t===r.length-1,l=(u=r.map(d=>d))==null?void 0:u.map(d=>d.props.heading),c=()=>{n(d=>d===0?Hc.Children.count(e)-1:d-1)},f=()=>{n(d=>d===Hc.Children.count(e)-1?0:d+1)};return Ct.useEffect(()=>{i(!!o)},[o,i]),De.jsxs("div",{className:"carousel",children:[De.jsx(KL,{nextSlide:f,previousSlide:c,currentIndex:t,stepsName:l,isLastStep:o}),De.jsx(XL,{totalSteps:l==null?void 0:l.length,currentStep:t+1}),De.jsx("div",{className:"carousel-container",children:r.map((d,p)=>De.jsx("div",{className:"carousel-item",style:{transform:`translateX(-${t*100}%)`},children:d},p))})]})}const n8="";function yy({conditionRequired:i,onButtonClick:e}){const[t,n]=Ct.useState(!1),r=Ct.useRef(null),o=Ct.useRef(null);return Ct.useEffect(()=>{r.current&&(r.current.style.display=i?"flex":"none"),o.current&&(o.current.disabled=i)},[i]),Ct.useEffect(()=>{o.current&&(o.current.disabled=!t)},[t]),De.jsxs("div",{className:"sprie-config-add-to-cart-block",children:[De.jsxs("label",{htmlFor:"Sprie-Config-return-policy-checkbox",id:"Sprie-Config-return-policy-label",ref:r,style:{display:"none"},children:[De.jsx("input",{type:"checkbox",id:"Sprie-Config-return-policy-checkbox",name:"sprie-config-return-policy-checkbox",onChange:l=>n(l.target.checked),checked:t}),De.jsxs("p",{children:["I agree this customized Item cannot be returned or exchanged.",De.jsx("span",{style:{color:"red"},children:"*"})]})]}),De.jsx("button",{className:"sprie-config-add-to-cart-btn",ref:o,onClick:e,children:"ADD TO CART"})]})}function ZL({orbitalList:i,selectedOrbital:e,modelLoading:t,onChangeOrbital:n}){const r=window.innerWidth<=576;return De.jsx("div",{className:"sprie-config-palette",style:{padding:"0 1.2rem 1.6rem 1.2rem",marginTop:r?"1rem":"0",gap:r?".3rem":"1rem"},children:i==null?void 0:i.map(o=>De.jsxs("div",{className:"sprie-config-palette-img-box",children:[De.jsx("button",{style:{border:"0",cursor:t?"default":"pointer",opacity:(e==null?void 0:e._id)===o._id?"1":".6",width:r?45:60,height:r?45:60},onClick:()=>n(o),disabled:t,children:De.jsx("img",{src:o.thumbnail,alt:o.name+"image",className:`sprie-config-image ${r?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===o._id?"1px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),(e==null?void 0:e._id)===o._id&&De.jsx("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.2rem"},children:De.jsx("span",{className:"sprie-config-palette-imgName",children:o.name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xOS40CglTNjQwLjU5LDEzOS4zOCw2NDAuNTksMTI4LjEzeiIvPgo8L3N2Zz4K";function tD({orgName:i,customEvent:e,apiService:t,frameList:n,lensList:r,orbitalList:o,showOrbitalList:l,viewerOnly:c,domService:f,ThreeDConfigurator:u,dataVariants:d,dataLenses:p,dataOrbitals:A,firstDitaVariant:g}){var Ze;const[E,C]=Ct.useState(),[_,v]=Ct.useState(),[S,y]=Ct.useState(),[x,w]=Ct.useState(!1),[b,B]=Ct.useState(!1),[L,R]=Ct.useState(),[T,N]=Ct.useState(),[k,O]=Ct.useState(),[F,V]=Ct.useState(),[X,te]=Ct.useState(!1),[Y,$]=Ct.useState("placeholder"),U=Ct.useRef(null);(Ze=U.current)==null||Ze.clientHeight;const D=Ct.useRef();D.current=f;const G=window.innerWidth<=576,K={variantId:"defaultId",variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",varinatSku:"lens-default"},J={variantId:"defaultId",variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",varinatSku:"orbital-default"},Ae=async(_e,it)=>{_e._id===(E==null?void 0:E._id)&&!it||D.current&&(w(!0),D.current.changeFrame(_e,[_,S]).then(()=>{w(!1)}),C(_e),N(d==null?void 0:d.find(Ue=>Ue.varinatSku==_e.sku)))},ge=_e=>(_e==null?void 0:_e.customisation.length)==0?null:_e==null?void 0:_e.customisation.find(He=>He.type=="Lens"),be=_e=>_e==null?void 0:_e.customisation.find(Ue=>Ue.type=="Orbital"),de=async _e=>{if(!D.current||_e==_)return;const it=_e.sku=="lens-default",Ue=ge(E),He=ot();!Ue&&it?(w(!0),D.current.changeLens([_e,S],!0,E).then(()=>{w(!1)})):!Ue&&!it?(_==null?void 0:_.sku)=="lens-default"?(w(!0),D.current.changeLens([_e,S],!0,E).then(()=>{w(!1)})):D.current.changeLens([_e,S],!1,E):Ue&&it?D.current.changeLens([Ue,S],!1,E):D.current.changeLens([_e,S],!1,E),_e.sku=="lens-default"?O(K):O(p==null?void 0:p.find($e=>{var lt;return $e.variantId==((lt=_e.metadata.find(mt=>mt.key==He))==null?void 0:lt.value)?$e:null})),v(_e)},Oe=async _e=>{if(!D.current||_e==S)return;const it=_e.sku=="orbital-default",Ue=be(E);w(!0),it?await D.current.changeOrbital(Ue).then(()=>{V(A==null?void 0:A.find(He=>{var $e;return He.variantId==(($e=Ue.metadata.find(lt=>lt.key=="variantId"))==null?void 0:$e.value)})),w(!1)}):await D.current.changeOrbital(_e).then(()=>{V(A==null?void 0:A.find(He=>{var $e;return He.variantId==(($e=_e.metadata.find(lt=>lt.key=="variantId"))==null?void 0:$e.value)})),w(!1)}),y(_e)},It=()=>(T==null?void 0:T.variantPrice)+((k==null?void 0:k.varinatSku)!=="lens-default"?k==null?void 0:k.variantPrice:0),ot=()=>{var Ue;const _e=(Ue=E.metadata.find(He=>He.key=="baseCurve"))==null?void 0:Ue.value;let it="variantId";return _e=="2B"?it="2bVariantId":_e=="6B"&&(it="6bVariantId"),it},oe=_e=>{te(_e)},Mt=_e=>{$(_e)},Ne=()=>{if(E&&_&&F){const _e=E.metadata.find(se=>se.key=="variantId"),it=E.metadata.find(se=>se.key=="baseCurve");let Ue="variantId";it&&it.value=="2B"?Ue="2bVariantId":it&&it.value=="6B"&&(Ue="6bVariantId");const He=_.metadata.find(se=>se.key==Ue),$e=_e?Number(_e.value):null,lt=He?Number(He.value):null,mt=F.variantId?Number(F.variantId):null,H={frameIdentifier:$e,lensIdentifier:lt,orbitalIdentifier:mt};e.emitEvent("onAddToCart",H);const Q=[];if(He){const se={id:lt,quantity:1,properties:null};Q.push(se)}if(F.variantId){const se={id:mt,quantity:1,properties:null};Q.push(se)}if(X&&Y!=""&&Y!="placeholder"){const se={id:44745490890985,quantity:1,properties:{customText:Y}};Q.push(se)}if(_e){const se={id:$e,quantity:1,properties:null};Q.push(se)}t.HandleShopifyAddToCart(Q)}};return Ct.useEffect(()=>{if(U.current){const _e=G?b?367.5:318.5:286;R((U.current.clientHeight-(_e+1))/14)}},[G,U,b]),Ct.useEffect(()=>{n&&C(n[0]),r&&v(r[0]),o&&y(o[0])},[n,r,o]),Ct.useEffect(()=>{N(g),O(K),V(J)},[g]),Ct.useEffect(()=>{},[X,Y]),De.jsxs("section",{id:"Sprie-config-Main-Container",ref:U,children:[De.jsxs("header",{id:"Sprie-config-Header",children:[De.jsx("img",{src:$L,alt:"dita-logo",width:97,height:20}),De.jsxs("p",{style:{margin:"0"},className:"sprie-config-Header-groupName",children:[i," CUSTOMIZER"]})]}),De.jsxs("section",{id:"Sprie-config-Viewer-Container",style:{height:`${L}rem`},children:[De.jsx("img",{src:eD,alt:"360deg-logo",width:44,height:34}),x&&De.jsx("div",{className:"sprie-config-loadingFrame",children:De.jsx("div",{className:"sprie-config-loader"})}),De.jsx("div",{style:{width:"100%",height:"100%"},id:"holder-canvas"})]}),De.jsxs("section",{id:"Sprie-config-Customisation-block",style:{paddingTop:"1.5rem",height:G?b?"21rem":"17.5rem":"15.42rem"},children:[De.jsxs("div",{className:"sprie-config-price-block",style:{top:G||!b?"-3rem":"-8.5rem"},children:[De.jsx("p",{style:{margin:"0 0.8rem 0 0"},children:`${It()}.00 ${T==null?void 0:T.priceCurrency} `}),!G&&b&&De.jsx(yy,{conditionRequired:X&&Y!="",onButtonClick:Ne}),b&&De.jsx("p",{style:{marginRight:".8rem",fontSize:".6rem",textAlign:"right"},children:"Please Allow 7-10 Days for Customization Process."})]}),De.jsxs(JL,{setShowAddToCart:B,children:[De.jsx(jL,{modelLoading:x,frameList:n,selectedFrame:E,onChangeFrame:Ae,heading:"SELECT FRAME"}),l&&De.jsx(ZL,{orbitalList:o,selectedOrbital:S,modelLoading:x,onChangeOrbital:Oe,heading:"SELECT ORBITAL"}),De.jsx(YL,{modelLoading:x,lensList:r,selectedLens:_,onChangeLens:de,heading:"SELECT LENS COLOR"}),De.jsx(qL,{heading:"LASER ENGRAVING",onChecked:oe,onTextAdded:Mt})]}),G&&b&&De.jsx("div",{style:{position:"absolute",bottom:"0",width:"100%"},children:De.jsx(yy,{conditionRequired:X&&Y!="",onButtonClick:Ne})})]})]})}function nD({apiService:i,sku:e,events:t,viewerOnly:n=!1}){var p;const r=Ct.useRef(),[o,l]=Ct.useState(null),c=(o==null?void 0:o.orgName)||"",f=(o==null?void 0:o.frameList)||null,u=(o==null?void 0:o.lensList)||null,d=(o==null?void 0:o.orbitalList)||null;return o!=null&&o.dataVariants,o!=null&&o.dataLenses,o!=null&&o.dataOrbitals,Ct.useEffect(()=>((async()=>{var _;r.current=new Ey,await((_=r.current)==null?void 0:_.Init(i.apiKey));const A=await i.FetchAssetBySKUOrBarcode({sku:e,barcode:null}),g=await i.FetchCustomisationList("Lens"),E=await i.FetchCustomisationList("Orbital"),C=await r.current.renderAsset({containerId:"holder-canvas",data:{assetDetails:A,customisation:A==null?void 0:A.customisation}});l({frameList:A==null?void 0:A.variants,lensList:g==null?void 0:g.data,orbitalList:E==null?void 0:E.data,orgName:A==null?void 0:A.group.name,showOrbitals:(A==null?void 0:A.customisation).filter(v=>v.type==="Orbital").length>0,domService:C,dataVariants:await i.PopulateDataList("data-variants"),dataLenses:await i.PopulateDataList("data-lenses"),dataOrbitals:await i.PopulateDataList("data-orbital")})})(),()=>{r.current=void 0}),[i,e]),De.jsxs(De.Fragment,{children:[(!f||!u)&&De.jsx("div",{className:"sprie-config-loadingBox",children:"Loading..."}),De.jsx(tD,{customEvent:t,orgName:c,apiService:i,frameList:f,lensList:u,orbitalList:d,showOrbitalList:(o==null?void 0:o.showOrbitals)||!1,viewerOnly:n,ThreeDConfigurator:r.current,domService:o==null?void 0:o.domService,dataVariants:o==null?void 0:o.dataVariants,dataLenses:o==null?void 0:o.dataLenses,dataOrbitals:o==null?void 0:o.dataOrbitals,firstDitaVariant:(p=o==null?void 0:o.dataVariants)==null?void 0:p.find(A=>A.varinatSku==e)})]})}var Op={},Cy={exports:{}},hi={},zp={exports:{}},Gp={};/**
4233
+ `},C.depthTest=!1,C.depthWrite=!1;const _=new Si(b5);_.depthTest=!1;const v=new Si(L5);v.depthTest=!1;function S(T,N){g.visible=!0,g.material=_,g.material.uniforms.tDiffuse.value=f.texture,_.uniforms.h.value=T*1/256,N.setRenderTarget(u),N.render(g,E),g.material=v,g.material.uniforms.tDiffuse.value=u.texture,v.uniforms.v.value=T*1/256,N.setRenderTarget(f),N.render(g,E),g.visible=!1}E.far=.125,y();function y(){E.updateProjectionMatrix()}const x=new B5,w=new R5(this.scene,this.camera);w.clearAlpha=0;const b=this.renderer.getDrawingBufferSize(new Ke),B=new Xi(b.width,b.height,{samples:4,type:Jn}),L=new M5(this.renderer,B);L.addPass(w),L.addPass(x);const R=()=>{var T;e.update(),this.resizeRenderer()&&(this.camera.aspect=this.canvas.clientWidth/this.canvas.clientHeight,(T=this.camera)==null||T.updateProjectionMatrix());const N=this.scene.background;if(this.scene.background=null,this.scene.overrideMaterial=C,!this.renderer||!this.camera)return;const k=this.renderer.getClearAlpha();this.renderer.setClearAlpha(0),this.renderer.clear(),this.renderer.setRenderTarget(f),this.renderer.render(this.scene,E),this.scene.overrideMaterial=null,S(l.shadow.blur,this.renderer),S(l.shadow.blur*.4,this.renderer),this.renderer.setRenderTarget(null),this.renderer.setClearAlpha(k),this.scene.background=N,Xr.uniforms.viewMatrixInverse.value=this.camera.matrixWorld,Xr.uniforms.projectionMatrixInverse.value=this.camera.projectionMatrixInverse,requestAnimationFrame(R),L.render()};R()}loadModelInsideScene(e){this.scene.traverse(t=>{t.name=="Scene"&&(this.scene.remove(t),t.traverse(n=>{n instanceof Wn&&(n.geometry.dispose(),n.material.dispose())}))}),this.scene.add(e)}}class VL{constructor(){Ft(this,"customRenderer"),this.customRenderer=new HL}async Init(){this.customRenderer.isInitialised||(await this.customRenderer.intialize(),this.customRenderer.setupAndRenderScene())}loadFirstFrame(e,t,n){return new Promise((r,o)=>{this.customRenderer.loadFirstFrame(e,t).then(()=>{r(1)}).catch(l=>{o(l)})})}changeFrame(e,t,n){return this.customRenderer.changeFrame(e,t,n)}changeLens(e,t,n,r){return this.customRenderer.changeLens(e,t,n,r)}changeOrbital(e){return this.customRenderer.changeOrbital(e)}}class WL{constructor(e){Ft(this,"orgId"),Ft(this,"rendererService"),Ft(this,"isLoading",!1),Ft(this,"userContainerId"),Ft(this,"containerElement",null),Ft(this,"defaultSelectorId","dita-3dconfig-element"),Ft(this,"defaultCanvasStyle",{width:"100%",height:"100%"}),Ft(this,"customisationArr",[]),Ft(this,"assetDetails",null),this.userContainerId=e.userContainerId,this.rendererService=new VL,this.orgId=e.orgId}prepareDOM(){const e=this.userContainerId??this.defaultSelectorId,t=document.getElementById(e);if(!t)throw new Error(`Container not found to embed 3d-configurator ${this.defaultSelectorId}`);this.containerElement=t;const n=document.createElement("canvas");return n.className="sprie-config-webgl",t.innerHTML="",t.appendChild(n),Object.assign(n.style,this.defaultCanvasStyle),!0}async loadFrame(e){return this.assetDetails=e.data.assetDetails,this.customisationArr=e.data.customisation,this.prepareDOM(),await this.rendererService.Init(),await this.rendererService.loadFirstFrame(this.orgId,this.assetDetails,this.customisationArr),this}changeFrame(e,t){return this.rendererService.changeFrame(this.orgId,e,t)}changeLens(e,t,n){return this.rendererService.changeLens(e,this.orgId,t,n)}changeOrbital(e){return this.rendererService.changeOrbital(e)}unmount(){this.containerElement&&(this.containerElement.innerHTML="",this.containerElement.style.height="0px",this.containerElement.style.width="auto")}}class Ey{constructor(){Ft(this,"events"),Ft(this,"authService"),Ft(this,"instanceArr"),this.authService=new xx,this.events=new Nx,this.instanceArr=[]}async Init(e){await this.authService.Init(e),hl.setJWT(this.authService.authPayload.JWT)}async loadBySKU(e){const t=await Lh.FetchAssetBySKUOrBarcode({sku:e.SKU,barcode:null});return await this.renderAsset({data:{assetDetails:t,customisation:t.customisation}})}async renderAsset(e){return new WL({orgId:this.authService.authPayload.ORGID,userContainerId:e.containerId}).loadFrame({containerId:e.containerId,data:{assetDetails:e.data.assetDetails,customisation:e.data.customisation}})}}window.ThreeDConfigurator=Ey;const ZN="",$N="";function jL({frameList:i,selectedFrame:e,modelLoading:t,onChangeFrame:n}){const r=window.innerWidth<=576;return De.jsx("div",{className:"sprie-config-palette",style:{padding:"0 4rem 1.6rem 4rem",marginTop:r?"1rem":"0"},children:i==null?void 0:i.map(o=>De.jsxs("div",{className:"sprie-config-palette-img-box",children:[De.jsx("button",{style:{border:"0",cursor:t?"default":"pointer",opacity:(e==null?void 0:e._id)===o._id?"1":".6",width:r?45:60,height:r?45:60},onClick:()=>n(o),disabled:t,children:De.jsx("img",{src:o.variantImage,alt:o.name+"image",className:`sprie-config-image ${r?"mobile-view":""}`,style:{transform:(e==null?void 0:e._id)===o._id?"scale(1.2,1.2)":"scale(1,1)"}})}),(e==null?void 0:e._id)===o._id&&De.jsx("p",{className:"sprie-config-palette-img-text",children:De.jsx("span",{className:"sprie-config-palette-imgName",children:o.name})})]},o._id))})}function YL({lensList:i,selectedLens:e,modelLoading:t,onChangeLens:n}){const r=window.innerWidth<=576;return De.jsx("div",{className:"sprie-config-palette",style:{padding:"0 1.2rem 1.6rem 1.2rem",marginTop:r?"1rem":"0",gap:r?".3rem":"1rem"},children:i==null?void 0:i.map(o=>De.jsxs("div",{className:"sprie-config-palette-img-box",children:[De.jsx("button",{style:{border:"0",cursor:t?"default":"pointer",opacity:(e==null?void 0:e._id)===o._id?"1":".6",width:r?45:60,height:r?45:60},onClick:()=>n(o),disabled:t,children:De.jsx("img",{src:o.thumbnail,alt:o.name+"image",className:`sprie-config-image ${r?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===o._id?"1px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),(e==null?void 0:e._id)===o._id&&De.jsx("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.2rem"},children:De.jsx("span",{className:"sprie-config-palette-imgName",children:o.name})})]},o._id))})}const e8="";function qL({heading:i,onChecked:e,onTextAdded:t}){const[n,r]=Ct.useState(""),[o,l]=Ct.useState(!1),[c,f]=Ct.useState(!1),u=Ct.useRef(null);return Ct.useEffect(()=>{e(o),o&&u.current?(u.current.style.backgroundColor="#ffffff",u.current.focus()):!o&&u.current&&(u.current.style.backgroundColor="transparent",u.current.blur(),r(""))}),Ct.useEffect(()=>{c&&n!=""&&t(n)},[c]),De.jsxs("div",{className:"sprie-config-engraving-block",style:{marginTop:".5rem"},children:[De.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".8rem"},children:[De.jsx("input",{type:"checkbox",className:"sprie-config-engraving-checkbox",onChange:d=>{l(d.target.checked)},checked:o}),De.jsxs("p",{style:{fontSize:".9rem",color:"#4d4d4d",fontWeight:"500",margin:"0"},children:["Add ","Laser Engraving"," ",De.jsx("span",{style:{fontWeight:"400"},children:"(OPTIONAL)"})]})]}),De.jsxs("div",{className:"sprie-config-engraving-inputField-block",children:[De.jsx("input",{type:"text",ref:u,className:"sprie-config-engraving-inputField",placeholder:"ADD CUSTOM TEXT",value:n,onChange:d=>r(d.target.value),maxLength:15,style:{padding:"0.7rem"},disabled:!o,onBlur:d=>f(!0),onFocus:d=>f(!1)}),De.jsx("span",{className:"sprie-config-engraving-inputInfo",children:`${n.length}/15 characters`}),De.jsx("a",{href:"#",className:"sprie-config-engraving-link",children:"About Custom Laser Engraving"})]})]})}const t8="";function XL({totalSteps:i,currentStep:e}){const t=window.innerWidth<=576;return De.jsx("div",{className:"step-tracker-block",style:{margin:t?"1rem 0":".7rem 0 1rem 0",paddingBottom:"1.5rem"},children:De.jsx("div",{className:"step-tracker",children:Array.from({length:i}).map((n,r)=>De.jsx("div",{className:`step-circle ${r+1===e?"active":""}`},r))})})}function KL({nextSlide:i,previousSlide:e,currentIndex:t,stepsName:n,isLastStep:r}){return De.jsxs("div",{className:"carousel-header",children:[De.jsx("button",{className:"carousel-btn prev",onClick:e,style:{visibility:t!==0?"visible":"hidden"},children:De.jsx("i",{className:"arrow left-arrow",style:{padding:".25rem"}})}),De.jsxs("p",{children:[De.jsx("span",{className:"step-syntax",children:`STEP ${t+1}: `}),De.jsx("span",{className:"select-syntax",children:n[t]})]}),De.jsx("button",{className:"carousel-btn next",onClick:i,style:{visibility:r?"hidden":"visible"},children:De.jsx("i",{className:"arrow right-arrow",style:{padding:".25rem"}})})]})}function JL({setShowAddToCart:i,children:e}){var u;const[t,n]=Ct.useState(0),r=Hc.Children.toArray(e),o=t===r.length-1,l=(u=r.map(d=>d))==null?void 0:u.map(d=>d.props.heading),c=()=>{n(d=>d===0?Hc.Children.count(e)-1:d-1)},f=()=>{n(d=>d===Hc.Children.count(e)-1?0:d+1)};return Ct.useEffect(()=>{i(!!o)},[o,i]),De.jsxs("div",{className:"carousel",children:[De.jsx(KL,{nextSlide:f,previousSlide:c,currentIndex:t,stepsName:l,isLastStep:o}),De.jsx(XL,{totalSteps:l==null?void 0:l.length,currentStep:t+1}),De.jsx("div",{className:"carousel-container",children:r.map((d,p)=>De.jsx("div",{className:"carousel-item",style:{transform:`translateX(-${t*100}%)`},children:d},p))})]})}const n8="";function yy({conditionRequired:i,onButtonClick:e}){const[t,n]=Ct.useState(!1),r=Ct.useRef(null),o=Ct.useRef(null);return Ct.useEffect(()=>{o.current&&(o.current.disabled=!t)},[t]),Ct.useEffect(()=>{r.current&&(r.current.style.display=i?"flex":"none"),o.current&&(o.current.disabled=i)},[i]),De.jsxs("div",{className:"sprie-config-add-to-cart-block",children:[De.jsxs("label",{htmlFor:"Sprie-Config-return-policy-checkbox",id:"Sprie-Config-return-policy-label",ref:r,style:{display:"none"},children:[De.jsx("input",{type:"checkbox",id:"Sprie-Config-return-policy-checkbox",name:"sprie-config-return-policy-checkbox",onChange:l=>n(l.target.checked),checked:t}),De.jsxs("p",{children:["I agree this customized Item cannot be returned or exchanged.",De.jsx("span",{style:{color:"red"},children:"*"})]})]}),De.jsx("button",{className:"sprie-config-add-to-cart-btn",ref:o,onClick:e,children:"ADD TO CART"})]})}function ZL({orbitalList:i,selectedOrbital:e,modelLoading:t,onChangeOrbital:n}){const r=window.innerWidth<=576;return De.jsx("div",{className:"sprie-config-palette",style:{padding:"0 1.2rem 1.6rem 1.2rem",marginTop:r?"1rem":"0",gap:r?".3rem":"1rem"},children:i==null?void 0:i.map(o=>De.jsxs("div",{className:"sprie-config-palette-img-box",children:[De.jsx("button",{style:{border:"0",cursor:t?"default":"pointer",opacity:(e==null?void 0:e._id)===o._id?"1":".6",width:r?45:60,height:r?45:60},onClick:()=>n(o),disabled:t,children:De.jsx("img",{src:o.thumbnail,alt:o.name+"image",className:`sprie-config-image ${r?"mobile-view":""}`,style:{border:(e==null?void 0:e._id)===o._id?"1px solid #9d9b9c":"0",borderRadius:"50%",padding:"1px"}})}),(e==null?void 0:e._id)===o._id&&De.jsx("p",{className:"sprie-config-palette-img-text",style:{bottom:"-1.2rem"},children:De.jsx("span",{className:"sprie-config-palette-imgName",children:o.name})})]},o._id))})}const $L="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDIwMDEwOTA0Ly9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy1TVkctMjAwMTA5MDQvRFREL3N2ZzEwLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiB3aWR0aD0iMzIwLjAwMDAwMHB0IiBoZWlnaHQ9IjY2LjAwMDAwMHB0IiB2aWV3Qm94PSIwIDAgMzIwLjAwMDAwMCA2Ni4wMDAwMDAiCiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0Ij4KCjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLDY2LjAwMDAwMCkgc2NhbGUoMC4xMDAwMDAsLTAuMTAwMDAwKSIKZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSJub25lIj4KPHBhdGggZD0iTTAgNjUxIGMwIC02IDkgLTExIDIxIC0xMSAxMSAwIDI5IC01IDQ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DNTMyLjkyLDMyOS40Myw1NDYuOCwzMDUuMDUsNTQ2LjgsMjUxLjkxeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTg4LjIsMTI4LjEzYzAtMTguNjMsMTMuNzgtMzIuMDIsMzIuOTktMzIuMDJjMTkuMjEsMCwzMi45OSwxMy4zOSwzMi45OSwzMi4wMnMtMTMuNzgsMzIuMDItMzIuOTksMzIuMDIKCUM2MDEuOTcsMTYwLjE0LDU4OC4yLDE0Ni43Niw1ODguMiwxMjguMTN6IE02NDAuNTksMTI4LjEzYzAtMTEuMjUtOC4xNS0xOS40LTE5LjQtMTkuNHMtMTkuNCw4LjE1LTE5LjQsMTkuNHM4LjE1LDE5LjQsMTkuNCwxOS40CglTNjQwLjU5LDEzOS4zOCw2NDAuNTksMTI4LjEzeiIvPgo8L3N2Zz4K";function tD({orgName:i,customEvent:e,apiService:t,frameList:n,lensList:r,orbitalList:o,showOrbitalList:l,viewerOnly:c,domService:f,ThreeDConfigurator:u,dataVariants:d,dataLenses:p,dataOrbitals:A,firstDitaVariant:g}){var Ze;const[E,C]=Ct.useState(),[_,v]=Ct.useState(),[S,y]=Ct.useState(),[x,w]=Ct.useState(!1),[b,B]=Ct.useState(!1),[L,R]=Ct.useState(),[T,N]=Ct.useState(),[k,O]=Ct.useState(),[F,V]=Ct.useState(),[X,te]=Ct.useState(!1),[Y,$]=Ct.useState("placeholder"),U=Ct.useRef(null);(Ze=U.current)==null||Ze.clientHeight;const D=Ct.useRef();D.current=f;const G=window.innerWidth<=576,K={variantId:"defaultId",variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",varinatSku:"lens-default"},J={variantId:"defaultId",variantName:"defaultName",variantPrice:0,priceCurrency:"defaultCurrency",varinatSku:"orbital-default"},Ae=async(_e,it)=>{_e._id===(E==null?void 0:E._id)&&!it||D.current&&(w(!0),D.current.changeFrame(_e,[_,S]).then(()=>{w(!1)}),C(_e),N(d==null?void 0:d.find(Ue=>Ue.varinatSku==_e.sku)))},ge=_e=>(_e==null?void 0:_e.customisation.length)==0?null:_e==null?void 0:_e.customisation.find(He=>He.type=="Lens"),be=_e=>_e==null?void 0:_e.customisation.find(Ue=>Ue.type=="Orbital"),de=async _e=>{if(!D.current||_e==_)return;const it=_e.sku=="lens-default",Ue=ge(E),He=ot();!Ue&&it?(w(!0),D.current.changeLens([_e,S],!0,E).then(()=>{w(!1)})):!Ue&&!it?(_==null?void 0:_.sku)=="lens-default"?(w(!0),D.current.changeLens([_e,S],!0,E).then(()=>{w(!1)})):D.current.changeLens([_e,S],!1,E):Ue&&it?D.current.changeLens([Ue,S],!1,E):D.current.changeLens([_e,S],!1,E),_e.sku=="lens-default"?O(K):O(p==null?void 0:p.find($e=>{var at;return $e.variantId==((at=_e.metadata.find(At=>At.key==He))==null?void 0:at.value)?$e:null})),v(_e)},Oe=async _e=>{if(!D.current||_e==S)return;const it=_e.sku=="orbital-default",Ue=be(E);w(!0),it?await D.current.changeOrbital(Ue).then(()=>{V(A==null?void 0:A.find(He=>{var $e;return He.variantId==(($e=Ue.metadata.find(at=>at.key=="variantId"))==null?void 0:$e.value)})),w(!1)}):await D.current.changeOrbital(_e).then(()=>{V(A==null?void 0:A.find(He=>{var $e;return He.variantId==(($e=_e.metadata.find(at=>at.key=="variantId"))==null?void 0:$e.value)})),w(!1)}),y(_e)},It=()=>(T==null?void 0:T.variantPrice)+((k==null?void 0:k.varinatSku)!=="lens-default"?k==null?void 0:k.variantPrice:0),ot=()=>{var Ue;const _e=(Ue=E.metadata.find(He=>He.key=="baseCurve"))==null?void 0:Ue.value;let it="variantId";return _e=="2B"?it="2bVariantId":_e=="6B"&&(it="6bVariantId"),it},oe=_e=>{te(_e)},Mt=_e=>{$(_e)},Ne=()=>{if(E&&_&&F){const _e=E.metadata.find(se=>se.key=="variantId"),it=E.metadata.find(se=>se.key=="baseCurve");let Ue="variantId";it&&it.value=="2B"?Ue="2bVariantId":it&&it.value=="6B"&&(Ue="6bVariantId");const He=_.metadata.find(se=>se.key==Ue),$e=_e?Number(_e.value):null,at=He?Number(He.value):null,At=F.variantId?Number(F.variantId):null,H={frameIdentifier:$e,lensIdentifier:at,orbitalIdentifier:At};e.emitEvent("onAddToCart",H);const Q=[];if(at&&He){const se={id:at,quantity:1,properties:null};Q.push(se)}if(At&&F.variantId){const se={id:At,quantity:1,properties:null};Q.push(se)}if(X&&Y!=""&&Y!="placeholder"){const se={id:44745490890985,quantity:1,properties:{customText:Y}};Q.push(se)}if(_e){const se={id:$e,quantity:1,properties:null};Q.push(se)}t.HandleShopifyAddToCart(Q)}};return Ct.useEffect(()=>{if(U.current){const _e=G?b?367.5:318.5:286;R((U.current.clientHeight-(_e+1))/14)}},[G,U,b]),Ct.useEffect(()=>{n&&C(n[0]),r&&v(r[0]),o&&y(o[0])},[n,r,o]),Ct.useEffect(()=>{N(g),O(K),V(J)},[g]),Ct.useEffect(()=>{},[X,Y]),De.jsxs("section",{id:"Sprie-config-Main-Container",ref:U,children:[De.jsxs("header",{id:"Sprie-config-Header",children:[De.jsx("img",{src:$L,alt:"dita-logo",width:97,height:20}),De.jsxs("p",{style:{margin:"0"},className:"sprie-config-Header-groupName",children:[i," CUSTOMIZER"]})]}),De.jsxs("section",{id:"Sprie-config-Viewer-Container",style:{height:`${L}rem`},children:[De.jsx("img",{src:eD,alt:"360deg-logo",width:44,height:34}),x&&De.jsx("div",{className:"sprie-config-loadingFrame",children:De.jsx("div",{className:"sprie-config-loader"})}),De.jsx("div",{style:{width:"100%",height:"100%"},id:"holder-canvas"})]}),De.jsxs("section",{id:"Sprie-config-Customisation-block",style:{paddingTop:"1.5rem",height:G?b?"21rem":"17.5rem":"15.42rem"},children:[De.jsxs("div",{className:"sprie-config-price-block",style:{top:G||!b?"-3rem":"-8.5rem"},children:[De.jsx("p",{style:{margin:"0 0.8rem 0 0"},children:`${It()}.00 ${T==null?void 0:T.priceCurrency} `}),!G&&b&&De.jsx(yy,{conditionRequired:X&&Y!="",onButtonClick:Ne}),b&&De.jsx("p",{style:{marginRight:".8rem",fontSize:".6rem",textAlign:"right"},children:"Please Allow 7-10 Days for Customization Process."})]}),De.jsxs(JL,{setShowAddToCart:B,children:[De.jsx(jL,{modelLoading:x,frameList:n,selectedFrame:E,onChangeFrame:Ae,heading:"SELECT FRAME"}),l&&De.jsx(ZL,{orbitalList:o,selectedOrbital:S,modelLoading:x,onChangeOrbital:Oe,heading:"SELECT ORBITAL"}),De.jsx(YL,{modelLoading:x,lensList:r,selectedLens:_,onChangeLens:de,heading:"SELECT LENS COLOR"}),De.jsx(qL,{heading:"LASER ENGRAVING",onChecked:oe,onTextAdded:Mt})]}),G&&b&&De.jsx("div",{style:{position:"absolute",bottom:"0",width:"100%"},children:De.jsx(yy,{conditionRequired:X&&Y!="",onButtonClick:Ne})})]})]})}function nD({apiService:i,sku:e,events:t,viewerOnly:n=!1}){var p;const r=Ct.useRef(),[o,l]=Ct.useState(null),c=(o==null?void 0:o.orgName)||"",f=(o==null?void 0:o.frameList)||null,u=(o==null?void 0:o.lensList)||null,d=(o==null?void 0:o.orbitalList)||null;return o!=null&&o.dataVariants,o!=null&&o.dataLenses,o!=null&&o.dataOrbitals,Ct.useEffect(()=>((async()=>{var _;r.current=new Ey,await((_=r.current)==null?void 0:_.Init(i.apiKey));const A=await i.FetchAssetBySKUOrBarcode({sku:e,barcode:null}),g=await i.FetchCustomisationList("Lens"),E=await i.FetchCustomisationList("Orbital"),C=await r.current.renderAsset({containerId:"holder-canvas",data:{assetDetails:A,customisation:A==null?void 0:A.customisation}});l({frameList:A==null?void 0:A.variants,lensList:g==null?void 0:g.data,orbitalList:E==null?void 0:E.data,orgName:A==null?void 0:A.group.name,showOrbitals:(A==null?void 0:A.customisation).filter(v=>v.type==="Orbital").length>0,domService:C,dataVariants:await i.PopulateDataList("data-variants"),dataLenses:await i.PopulateDataList("data-lenses"),dataOrbitals:await i.PopulateDataList("data-orbital")})})(),()=>{r.current=void 0}),[i,e]),De.jsxs(De.Fragment,{children:[(!f||!u)&&De.jsx("div",{className:"sprie-config-loadingBox",children:"Loading..."}),De.jsx(tD,{customEvent:t,orgName:c,apiService:i,frameList:f,lensList:u,orbitalList:d,showOrbitalList:(o==null?void 0:o.showOrbitals)||!1,viewerOnly:n,ThreeDConfigurator:r.current,domService:o==null?void 0:o.domService,dataVariants:o==null?void 0:o.dataVariants,dataLenses:o==null?void 0:o.dataLenses,dataOrbitals:o==null?void 0:o.dataOrbitals,firstDitaVariant:(p=o==null?void 0:o.dataVariants)==null?void 0:p.find(A=>A.varinatSku==e)})]})}var Op={},Cy={exports:{}},hi={},zp={exports:{}},Gp={};/**
4234
4234
  * @license React
4235
4235
  * scheduler.production.min.js
4236
4236
  *
@@ -4250,7 +4250,7 @@ bool bvhIntersectFirstHit(
4250
4250
  `+D+s}var K=!1;function J(s,a){if(!s||K)return"";K=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(le){var m=le}Reflect.construct(s,[],a)}else{try{a.call()}catch(le){m=le}s.call(a.prototype)}else{try{throw Error()}catch(le){m=le}s()}}catch(le){if(le&&m&&typeof le.stack=="string"){for(var I=le.stack.split(`
4251
4251
  `),M=m.stack.split(`
4252
4252
  `),P=I.length-1,W=M.length-1;1<=P&&0<=W&&I[P]!==M[W];)W--;for(;1<=P&&0<=W;P--,W--)if(I[P]!==M[W]){if(P!==1||W!==1)do if(P--,W--,0>W||I[P]!==M[W]){var Z=`
4253
- `+I[P].replace(" at new "," at ");return s.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",s.displayName)),Z}while(1<=P&&0<=W);break}}}finally{K=!1,Error.prepareStackTrace=h}return(s=s?s.displayName||s.name:"")?G(s):""}function Ae(s){switch(s.tag){case 5:return G(s.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return s=J(s.type,!1),s;case 11:return s=J(s.type.render,!1),s;case 1:return s=J(s.type,!0),s;default:return""}}function ge(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case B:return"Fragment";case b:return"Portal";case R:return"Profiler";case L:return"StrictMode";case O:return"Suspense";case F:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case N:return(s.displayName||"Context")+".Consumer";case T:return(s._context.displayName||"Context")+".Provider";case k:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case V:return a=s.displayName||null,a!==null?a:ge(s.type)||"Memo";case X:a=s._payload,s=s._init;try{return ge(s(a))}catch{}}return null}function be(s){var a=s.type;switch(s.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=a.render,s=s.displayName||s.name||"",a.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(a);case 8:return a===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function de(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Oe(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function It(s){var a=Oe(s)?"checked":"value",h=Object.getOwnPropertyDescriptor(s.constructor.prototype,a),m=""+s[a];if(!s.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var I=h.get,M=h.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return I.call(this)},set:function(P){m=""+P,M.call(this,P)}}),Object.defineProperty(s,a,{enumerable:h.enumerable}),{getValue:function(){return m},setValue:function(P){m=""+P},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function ot(s){s._valueTracker||(s._valueTracker=It(s))}function oe(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var h=a.getValue(),m="";return s&&(m=Oe(s)?s.checked?"true":"false":s.value),s=m,s!==h?(a.setValue(s),!0):!1}function Mt(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ne(s,a){var h=a.checked;return U({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??s._wrapperState.initialChecked})}function Ze(s,a){var h=a.defaultValue==null?"":a.defaultValue,m=a.checked!=null?a.checked:a.defaultChecked;h=de(a.value!=null?a.value:h),s._wrapperState={initialChecked:m,initialValue:h,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function _e(s,a){a=a.checked,a!=null&&y(s,"checked",a,!1)}function it(s,a){_e(s,a);var h=de(a.value),m=a.type;if(h!=null)m==="number"?(h===0&&s.value===""||s.value!=h)&&(s.value=""+h):s.value!==""+h&&(s.value=""+h);else if(m==="submit"||m==="reset"){s.removeAttribute("value");return}a.hasOwnProperty("value")?He(s,a.type,h):a.hasOwnProperty("defaultValue")&&He(s,a.type,de(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(s.defaultChecked=!!a.defaultChecked)}function Ue(s,a,h){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var m=a.type;if(!(m!=="submit"&&m!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+s._wrapperState.initialValue,h||a===s.value||(s.value=a),s.defaultValue=a}h=s.name,h!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,h!==""&&(s.name=h)}function He(s,a,h){(a!=="number"||Mt(s.ownerDocument)!==s)&&(h==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+h&&(s.defaultValue=""+h))}var $e=Array.isArray;function lt(s,a,h,m){if(s=s.options,a){a={};for(var I=0;I<h.length;I++)a["$"+h[I]]=!0;for(h=0;h<s.length;h++)I=a.hasOwnProperty("$"+s[h].value),s[h].selected!==I&&(s[h].selected=I),I&&m&&(s[h].defaultSelected=!0)}else{for(h=""+de(h),a=null,I=0;I<s.length;I++){if(s[I].value===h){s[I].selected=!0,m&&(s[I].defaultSelected=!0);return}a!==null||s[I].disabled||(a=s[I])}a!==null&&(a.selected=!0)}}function mt(s,a){if(a.dangerouslySetInnerHTML!=null)throw Error(t(91));return U({},a,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function H(s,a){var h=a.value;if(h==null){if(h=a.children,a=a.defaultValue,h!=null){if(a!=null)throw Error(t(92));if($e(h)){if(1<h.length)throw Error(t(93));h=h[0]}a=h}a==null&&(a=""),h=a}s._wrapperState={initialValue:de(h)}}function Q(s,a){var h=de(a.value),m=de(a.defaultValue);h!=null&&(h=""+h,h!==s.value&&(s.value=h),a.defaultValue==null&&s.defaultValue!==h&&(s.defaultValue=h)),m!=null&&(s.defaultValue=""+m)}function se(s){var a=s.textContent;a===s._wrapperState.initialValue&&a!==""&&a!==null&&(s.value=a)}function Ce(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(s,a){return s==null||s==="http://www.w3.org/1999/xhtml"?Ce(a):s==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var xe,We=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,h,m,I){MSApp.execUnsafeLocalFunction(function(){return s(a,h,m,I)})}:s}(function(s,a){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=a;else{for(xe=xe||document.createElement("div"),xe.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=xe.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;a.firstChild;)s.appendChild(a.firstChild)}});function Se(s,a){if(a){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=a;return}}s.textContent=a}var Re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},q=["Webkit","ms","Moz","O"];Object.keys(Re).forEach(function(s){q.forEach(function(a){a=a+s.charAt(0).toUpperCase()+s.substring(1),Re[a]=Re[s]})});function Me(s,a,h){return a==null||typeof a=="boolean"||a===""?"":h||typeof a!="number"||a===0||Re.hasOwnProperty(s)&&Re[s]?(""+a).trim():a+"px"}function pe(s,a){s=s.style;for(var h in a)if(a.hasOwnProperty(h)){var m=h.indexOf("--")===0,I=Me(h,a[h],m);h==="float"&&(h="cssFloat"),m?s.setProperty(h,I):s[h]=I}}var nt=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function je(s,a){if(a){if(nt[s]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(t(137,s));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(t(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(t(61))}if(a.style!=null&&typeof a.style!="object")throw Error(t(62))}}function Je(s,a){if(s.indexOf("-")===-1)return typeof a.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ge=null;function Pe(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var dt=null,ee=null,Te=null;function ye(s){if(s=Tc(s)){if(typeof dt!="function")throw Error(t(280));var a=s.stateNode;a&&(a=jf(a),dt(s.stateNode,s.type,a))}}function he(s){ee?Te?Te.push(s):Te=[s]:ee=s}function we(){if(ee){var s=ee,a=Te;if(Te=ee=null,ye(s),a)for(s=0;s<a.length;s++)ye(a[s])}}function qe(s,a){return s(a)}function At(){}var Wt=!1;function Dn(s,a,h){if(Wt)return s(a,h);Wt=!0;try{return qe(s,a,h)}finally{Wt=!1,(ee!==null||Te!==null)&&(At(),we())}}function Tt(s,a){var h=s.stateNode;if(h===null)return null;var m=jf(h);if(m===null)return null;h=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(t(231,a,typeof h));return h}var an=!1;if(c)try{var Pt={};Object.defineProperty(Pt,"passive",{get:function(){an=!0}}),window.addEventListener("test",Pt,Pt),window.removeEventListener("test",Pt,Pt)}catch{an=!1}function Ti(s,a,h,m,I,M,P,W,Z){var le=Array.prototype.slice.call(arguments,3);try{a.apply(h,le)}catch(Ee){this.onError(Ee)}}var Cr=!1,ir=null,Co=!1,ws=null,wf={onError:function(s){Cr=!0,ir=s}};function Mf(s,a,h,m,I,M,P,W,Z){Cr=!1,ir=null,Ti.apply(wf,arguments)}function Wp(s,a,h,m,I,M,P,W,Z){if(Mf.apply(this,arguments),Cr){if(Cr){var le=ir;Cr=!1,ir=null}else throw Error(t(198));Co||(Co=!0,ws=le)}}function Kr(s){var a=s,h=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,a.flags&4098&&(h=a.return),s=a.return;while(s)}return a.tag===3?h:null}function Tf(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function z(s){if(Kr(s)!==s)throw Error(t(188))}function re(s){var a=s.alternate;if(!a){if(a=Kr(s),a===null)throw Error(t(188));return a!==s?null:s}for(var h=s,m=a;;){var I=h.return;if(I===null)break;var M=I.alternate;if(M===null){if(m=I.return,m!==null){h=m;continue}break}if(I.child===M.child){for(M=I.child;M;){if(M===h)return z(I),s;if(M===m)return z(I),a;M=M.sibling}throw Error(t(188))}if(h.return!==m.return)h=I,m=M;else{for(var P=!1,W=I.child;W;){if(W===h){P=!0,h=I,m=M;break}if(W===m){P=!0,m=I,h=M;break}W=W.sibling}if(!P){for(W=M.child;W;){if(W===h){P=!0,h=M,m=I;break}if(W===m){P=!0,m=M,h=I;break}W=W.sibling}if(!P)throw Error(t(189))}}if(h.alternate!==m)throw Error(t(190))}if(h.tag!==3)throw Error(t(188));return h.stateNode.current===h?s:a}function ce(s){return s=re(s),s!==null?ue(s):null}function ue(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var a=ue(s);if(a!==null)return a;s=s.sibling}return null}var fe=e.unstable_scheduleCallback,ke=e.unstable_cancelCallback,et=e.unstable_shouldYield,at=e.unstable_requestPaint,Qe=e.unstable_now,pt=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,ht=e.unstable_UserBlockingPriority,jt=e.unstable_NormalPriority,ii=e.unstable_LowPriority,dn=e.unstable_IdlePriority,di=null,Bt=null;function Et(s){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(di,s,void 0,(s.current.flags&128)===128)}catch{}}var ri=Math.clz32?Math.clz32:Bf,ln=Math.log,Jr=Math.LN2;function Bf(s){return s>>>=0,s===0?32:31-(ln(s)/Jr|0)|0}var Ir=64,Ms=4194304;function An(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Qi(s,a){var h=s.pendingLanes;if(h===0)return 0;var m=0,I=s.suspendedLanes,M=s.pingedLanes,P=h&268435455;if(P!==0){var W=P&~I;W!==0?m=An(W):(M&=P,M!==0&&(m=An(M)))}else P=h&~I,P!==0?m=An(P):M!==0&&(m=An(M));if(m===0)return 0;if(a!==0&&a!==m&&!(a&I)&&(I=m&-m,M=a&-a,I>=M||I===16&&(M&4194240)!==0))return a;if(m&4&&(m|=h&16),a=s.entangledLanes,a!==0)for(s=s.entanglements,a&=m;0<a;)h=31-ri(a),I=1<<h,m|=s[h],a&=~I;return m}function uc(s,a){switch(s){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function si(s,a){for(var h=s.suspendedLanes,m=s.pingedLanes,I=s.expirationTimes,M=s.pendingLanes;0<M;){var P=31-ri(M),W=1<<P,Z=I[P];Z===-1?(!(W&h)||W&m)&&(I[P]=uc(W,a)):Z<=a&&(s.expiredLanes|=W),M&=~W}}function Io(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Rf(){var s=Ir;return Ir<<=1,!(Ir&4194240)&&(Ir=64),s}function Ga(s){for(var a=[],h=0;31>h;h++)a.push(s);return a}function fc(s,a,h){s.pendingLanes|=a,a!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,a=31-ri(a),s[a]=h}function xD(s,a){var h=s.pendingLanes&~a;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=a,s.mutableReadLanes&=a,s.entangledLanes&=a,a=s.entanglements;var m=s.eventTimes;for(s=s.expirationTimes;0<h;){var I=31-ri(h),M=1<<I;a[I]=0,m[I]=-1,s[I]=-1,h&=~M}}function jp(s,a){var h=s.entangledLanes|=a;for(s=s.entanglements;h;){var m=31-ri(h),I=1<<m;I&a|s[m]&a&&(s[m]|=a),h&=~I}}var kt=0;function zy(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var Gy,Yp,Hy,Vy,Wy,qp=!1,bf=[],Ts=null,Bs=null,Rs=null,hc=new Map,dc=new Map,bs=[],SD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jy(s,a){switch(s){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":Bs=null;break;case"mouseover":case"mouseout":Rs=null;break;case"pointerover":case"pointerout":hc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":dc.delete(a.pointerId)}}function Ac(s,a,h,m,I,M){return s===null||s.nativeEvent!==M?(s={blockedOn:a,domEventName:h,eventSystemFlags:m,nativeEvent:M,targetContainers:[I]},a!==null&&(a=Tc(a),a!==null&&Yp(a)),s):(s.eventSystemFlags|=m,a=s.targetContainers,I!==null&&a.indexOf(I)===-1&&a.push(I),s)}function wD(s,a,h,m,I){switch(a){case"focusin":return Ts=Ac(Ts,s,a,h,m,I),!0;case"dragenter":return Bs=Ac(Bs,s,a,h,m,I),!0;case"mouseover":return Rs=Ac(Rs,s,a,h,m,I),!0;case"pointerover":var M=I.pointerId;return hc.set(M,Ac(hc.get(M)||null,s,a,h,m,I)),!0;case"gotpointercapture":return M=I.pointerId,dc.set(M,Ac(dc.get(M)||null,s,a,h,m,I)),!0}return!1}function Yy(s){var a=xo(s.target);if(a!==null){var h=Kr(a);if(h!==null){if(a=h.tag,a===13){if(a=Tf(h),a!==null){s.blockedOn=a,Wy(s.priority,function(){Hy(h)});return}}else if(a===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Lf(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var h=Kp(s.domEventName,s.eventSystemFlags,a[0],s.nativeEvent);if(h===null){h=s.nativeEvent;var m=new h.constructor(h.type,h);Ge=m,h.target.dispatchEvent(m),Ge=null}else return a=Tc(h),a!==null&&Yp(a),s.blockedOn=h,!1;a.shift()}return!0}function qy(s,a,h){Lf(s)&&h.delete(a)}function MD(){qp=!1,Ts!==null&&Lf(Ts)&&(Ts=null),Bs!==null&&Lf(Bs)&&(Bs=null),Rs!==null&&Lf(Rs)&&(Rs=null),hc.forEach(qy),dc.forEach(qy)}function pc(s,a){s.blockedOn===a&&(s.blockedOn=null,qp||(qp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,MD)))}function gc(s){function a(I){return pc(I,s)}if(0<bf.length){pc(bf[0],s);for(var h=1;h<bf.length;h++){var m=bf[h];m.blockedOn===s&&(m.blockedOn=null)}}for(Ts!==null&&pc(Ts,s),Bs!==null&&pc(Bs,s),Rs!==null&&pc(Rs,s),hc.forEach(a),dc.forEach(a),h=0;h<bs.length;h++)m=bs[h],m.blockedOn===s&&(m.blockedOn=null);for(;0<bs.length&&(h=bs[0],h.blockedOn===null);)Yy(h),h.blockedOn===null&&bs.shift()}var Ha=x.ReactCurrentBatchConfig,Df=!0;function TD(s,a,h,m){var I=kt,M=Ha.transition;Ha.transition=null;try{kt=1,Xp(s,a,h,m)}finally{kt=I,Ha.transition=M}}function BD(s,a,h,m){var I=kt,M=Ha.transition;Ha.transition=null;try{kt=4,Xp(s,a,h,m)}finally{kt=I,Ha.transition=M}}function Xp(s,a,h,m){if(Df){var I=Kp(s,a,h,m);if(I===null)dg(s,a,m,Nf,h),jy(s,m);else if(wD(I,s,a,h,m))m.stopPropagation();else if(jy(s,m),a&4&&-1<SD.indexOf(s)){for(;I!==null;){var M=Tc(I);if(M!==null&&Gy(M),M=Kp(s,a,h,m),M===null&&dg(s,a,m,Nf,h),M===I)break;I=M}I!==null&&m.stopPropagation()}else dg(s,a,m,null,h)}}var Nf=null;function Kp(s,a,h,m){if(Nf=null,s=Pe(m),s=xo(s),s!==null)if(a=Kr(s),a===null)s=null;else if(h=a.tag,h===13){if(s=Tf(a),s!==null)return s;s=null}else if(h===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null);return Nf=s,null}function Xy(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(pt()){case ft:return 1;case ht:return 4;case jt:case ii:return 16;case dn:return 536870912;default:return 16}default:return 16}}var Ls=null,Jp=null,Pf=null;function Ky(){if(Pf)return Pf;var s,a=Jp,h=a.length,m,I="value"in Ls?Ls.value:Ls.textContent,M=I.length;for(s=0;s<h&&a[s]===I[s];s++);var P=h-s;for(m=1;m<=P&&a[h-m]===I[M-m];m++);return Pf=I.slice(s,1<m?1-m:void 0)}function Uf(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function kf(){return!0}function Jy(){return!1}function Bi(s){function a(h,m,I,M,P){this._reactName=h,this._targetInst=I,this.type=m,this.nativeEvent=M,this.target=P,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(h=s[W],this[W]=h?h(M):M[W]);return this.isDefaultPrevented=(M.defaultPrevented!=null?M.defaultPrevented:M.returnValue===!1)?kf:Jy,this.isPropagationStopped=Jy,this}return U(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=kf)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=kf)},persist:function(){},isPersistent:kf}),a}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zp=Bi(Va),mc=U({},Va,{view:0,detail:0}),RD=Bi(mc),$p,eg,vc,Ff=U({},mc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ng,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==vc&&(vc&&s.type==="mousemove"?($p=s.screenX-vc.screenX,eg=s.screenY-vc.screenY):eg=$p=0,vc=s),$p)},movementY:function(s){return"movementY"in s?s.movementY:eg}}),Zy=Bi(Ff),bD=U({},Ff,{dataTransfer:0}),LD=Bi(bD),DD=U({},mc,{relatedTarget:0}),tg=Bi(DD),ND=U({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),PD=Bi(ND),UD=U({},Va,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),kD=Bi(UD),FD=U({},Va,{data:0}),$y=Bi(FD),QD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GD(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=zD[s])?!!a[s]:!1}function ng(){return GD}var HD=U({},mc,{key:function(s){if(s.key){var a=QD[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=Uf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?OD[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ng,charCode:function(s){return s.type==="keypress"?Uf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Uf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),VD=Bi(HD),WD=U({},Ff,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eC=Bi(WD),jD=U({},mc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ng}),YD=Bi(jD),qD=U({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),XD=Bi(qD),KD=U({},Ff,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),JD=Bi(KD),ZD=[9,13,27,32],ig=c&&"CompositionEvent"in window,_c=null;c&&"documentMode"in document&&(_c=document.documentMode);var $D=c&&"TextEvent"in window&&!_c,tC=c&&(!ig||_c&&8<_c&&11>=_c),nC=String.fromCharCode(32),iC=!1;function rC(s,a){switch(s){case"keyup":return ZD.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Wa=!1;function e6(s,a){switch(s){case"compositionend":return sC(a);case"keypress":return a.which!==32?null:(iC=!0,nC);case"textInput":return s=a.data,s===nC&&iC?null:s;default:return null}}function t6(s,a){if(Wa)return s==="compositionend"||!ig&&rC(s,a)?(s=Ky(),Pf=Jp=Ls=null,Wa=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return tC&&a.locale!=="ko"?null:a.data;default:return null}}var n6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oC(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!n6[s.type]:a==="textarea"}function aC(s,a,h,m){he(m),a=Hf(a,"onChange"),0<a.length&&(h=new Zp("onChange","change",null,h,m),s.push({event:h,listeners:a}))}var Ec=null,yc=null;function i6(s){SC(s,0)}function Qf(s){var a=Ka(s);if(oe(a))return s}function r6(s,a){if(s==="change")return a}var lC=!1;if(c){var rg;if(c){var sg="oninput"in document;if(!sg){var cC=document.createElement("div");cC.setAttribute("oninput","return;"),sg=typeof cC.oninput=="function"}rg=sg}else rg=!1;lC=rg&&(!document.documentMode||9<document.documentMode)}function uC(){Ec&&(Ec.detachEvent("onpropertychange",fC),yc=Ec=null)}function fC(s){if(s.propertyName==="value"&&Qf(yc)){var a=[];aC(a,yc,s,Pe(s)),Dn(i6,a)}}function s6(s,a,h){s==="focusin"?(uC(),Ec=a,yc=h,Ec.attachEvent("onpropertychange",fC)):s==="focusout"&&uC()}function o6(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Qf(yc)}function a6(s,a){if(s==="click")return Qf(a)}function l6(s,a){if(s==="input"||s==="change")return Qf(a)}function c6(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var rr=typeof Object.is=="function"?Object.is:c6;function Cc(s,a){if(rr(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var h=Object.keys(s),m=Object.keys(a);if(h.length!==m.length)return!1;for(m=0;m<h.length;m++){var I=h[m];if(!f.call(a,I)||!rr(s[I],a[I]))return!1}return!0}function hC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function dC(s,a){var h=hC(s);s=0;for(var m;h;){if(h.nodeType===3){if(m=s+h.textContent.length,s<=a&&m>=a)return{node:h,offset:a-s};s=m}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=hC(h)}}function AC(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?AC(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function pC(){for(var s=window,a=Mt();a instanceof s.HTMLIFrameElement;){try{var h=typeof a.contentWindow.location.href=="string"}catch{h=!1}if(h)s=a.contentWindow;else break;a=Mt(s.document)}return a}function og(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}function u6(s){var a=pC(),h=s.focusedElem,m=s.selectionRange;if(a!==h&&h&&h.ownerDocument&&AC(h.ownerDocument.documentElement,h)){if(m!==null&&og(h)){if(a=m.start,s=m.end,s===void 0&&(s=a),"selectionStart"in h)h.selectionStart=a,h.selectionEnd=Math.min(s,h.value.length);else if(s=(a=h.ownerDocument||document)&&a.defaultView||window,s.getSelection){s=s.getSelection();var I=h.textContent.length,M=Math.min(m.start,I);m=m.end===void 0?M:Math.min(m.end,I),!s.extend&&M>m&&(I=m,m=M,M=I),I=dC(h,M);var P=dC(h,m);I&&P&&(s.rangeCount!==1||s.anchorNode!==I.node||s.anchorOffset!==I.offset||s.focusNode!==P.node||s.focusOffset!==P.offset)&&(a=a.createRange(),a.setStart(I.node,I.offset),s.removeAllRanges(),M>m?(s.addRange(a),s.extend(P.node,P.offset)):(a.setEnd(P.node,P.offset),s.addRange(a)))}}for(a=[],s=h;s=s.parentNode;)s.nodeType===1&&a.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<a.length;h++)s=a[h],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var f6=c&&"documentMode"in document&&11>=document.documentMode,ja=null,ag=null,Ic=null,lg=!1;function gC(s,a,h){var m=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;lg||ja==null||ja!==Mt(m)||(m=ja,"selectionStart"in m&&og(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ic&&Cc(Ic,m)||(Ic=m,m=Hf(ag,"onSelect"),0<m.length&&(a=new Zp("onSelect","select",null,a,h),s.push({event:a,listeners:m}),a.target=ja)))}function Of(s,a){var h={};return h[s.toLowerCase()]=a.toLowerCase(),h["Webkit"+s]="webkit"+a,h["Moz"+s]="moz"+a,h}var Ya={animationend:Of("Animation","AnimationEnd"),animationiteration:Of("Animation","AnimationIteration"),animationstart:Of("Animation","AnimationStart"),transitionend:Of("Transition","TransitionEnd")},cg={},mC={};c&&(mC=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function zf(s){if(cg[s])return cg[s];if(!Ya[s])return s;var a=Ya[s],h;for(h in a)if(a.hasOwnProperty(h)&&h in mC)return cg[s]=a[h];return s}var vC=zf("animationend"),_C=zf("animationiteration"),EC=zf("animationstart"),yC=zf("transitionend"),CC=new Map,IC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ds(s,a){CC.set(s,a),o(a,[s])}for(var ug=0;ug<IC.length;ug++){var fg=IC[ug],h6=fg.toLowerCase(),d6=fg[0].toUpperCase()+fg.slice(1);Ds(h6,"on"+d6)}Ds(vC,"onAnimationEnd"),Ds(_C,"onAnimationIteration"),Ds(EC,"onAnimationStart"),Ds("dblclick","onDoubleClick"),Ds("focusin","onFocus"),Ds("focusout","onBlur"),Ds(yC,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),A6=new Set("cancel close invalid load scroll toggle".split(" ").concat(xc));function xC(s,a,h){var m=s.type||"unknown-event";s.currentTarget=h,Wp(m,a,void 0,s),s.currentTarget=null}function SC(s,a){a=(a&4)!==0;for(var h=0;h<s.length;h++){var m=s[h],I=m.event;m=m.listeners;e:{var M=void 0;if(a)for(var P=m.length-1;0<=P;P--){var W=m[P],Z=W.instance,le=W.currentTarget;if(W=W.listener,Z!==M&&I.isPropagationStopped())break e;xC(I,W,le),M=Z}else for(P=0;P<m.length;P++){if(W=m[P],Z=W.instance,le=W.currentTarget,W=W.listener,Z!==M&&I.isPropagationStopped())break e;xC(I,W,le),M=Z}}}if(Co)throw s=ws,Co=!1,ws=null,s}function Jt(s,a){var h=a[_g];h===void 0&&(h=a[_g]=new Set);var m=s+"__bubble";h.has(m)||(wC(a,s,2,!1),h.add(m))}function hg(s,a,h){var m=0;a&&(m|=4),wC(h,s,m,a)}var Gf="_reactListening"+Math.random().toString(36).slice(2);function Sc(s){if(!s[Gf]){s[Gf]=!0,n.forEach(function(h){h!=="selectionchange"&&(A6.has(h)||hg(h,!1,s),hg(h,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Gf]||(a[Gf]=!0,hg("selectionchange",!1,a))}}function wC(s,a,h,m){switch(Xy(a)){case 1:var I=TD;break;case 4:I=BD;break;default:I=Xp}h=I.bind(null,a,h,s),I=void 0,!an||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(I=!0),m?I!==void 0?s.addEventListener(a,h,{capture:!0,passive:I}):s.addEventListener(a,h,!0):I!==void 0?s.addEventListener(a,h,{passive:I}):s.addEventListener(a,h,!1)}function dg(s,a,h,m,I){var M=m;if(!(a&1)&&!(a&2)&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var W=m.stateNode.containerInfo;if(W===I||W.nodeType===8&&W.parentNode===I)break;if(P===4)for(P=m.return;P!==null;){var Z=P.tag;if((Z===3||Z===4)&&(Z=P.stateNode.containerInfo,Z===I||Z.nodeType===8&&Z.parentNode===I))return;P=P.return}for(;W!==null;){if(P=xo(W),P===null)return;if(Z=P.tag,Z===5||Z===6){m=M=P;continue e}W=W.parentNode}}m=m.return}Dn(function(){var le=M,Ee=Pe(h),Ie=[];e:{var ve=CC.get(s);if(ve!==void 0){var Fe=Zp,Ve=s;switch(s){case"keypress":if(Uf(h)===0)break e;case"keydown":case"keyup":Fe=VD;break;case"focusin":Ve="focus",Fe=tg;break;case"focusout":Ve="blur",Fe=tg;break;case"beforeblur":case"afterblur":Fe=tg;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Fe=Zy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Fe=LD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Fe=YD;break;case vC:case _C:case EC:Fe=PD;break;case yC:Fe=XD;break;case"scroll":Fe=RD;break;case"wheel":Fe=JD;break;case"copy":case"cut":case"paste":Fe=kD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Fe=eC}var Ye=(a&4)!==0,pn=!Ye&&s==="scroll",ie=Ye?ve!==null?ve+"Capture":null:ve;Ye=[];for(var ne=le,ae;ne!==null;){ae=ne;var Be=ae.stateNode;if(ae.tag===5&&Be!==null&&(ae=Be,ie!==null&&(Be=Tt(ne,ie),Be!=null&&Ye.push(wc(ne,Be,ae)))),pn)break;ne=ne.return}0<Ye.length&&(ve=new Fe(ve,Ve,null,h,Ee),Ie.push({event:ve,listeners:Ye}))}}if(!(a&7)){e:{if(ve=s==="mouseover"||s==="pointerover",Fe=s==="mouseout"||s==="pointerout",ve&&h!==Ge&&(Ve=h.relatedTarget||h.fromElement)&&(xo(Ve)||Ve[Zr]))break e;if((Fe||ve)&&(ve=Ee.window===Ee?Ee:(ve=Ee.ownerDocument)?ve.defaultView||ve.parentWindow:window,Fe?(Ve=h.relatedTarget||h.toElement,Fe=le,Ve=Ve?xo(Ve):null,Ve!==null&&(pn=Kr(Ve),Ve!==pn||Ve.tag!==5&&Ve.tag!==6)&&(Ve=null)):(Fe=null,Ve=le),Fe!==Ve)){if(Ye=Zy,Be="onMouseLeave",ie="onMouseEnter",ne="mouse",(s==="pointerout"||s==="pointerover")&&(Ye=eC,Be="onPointerLeave",ie="onPointerEnter",ne="pointer"),pn=Fe==null?ve:Ka(Fe),ae=Ve==null?ve:Ka(Ve),ve=new Ye(Be,ne+"leave",Fe,h,Ee),ve.target=pn,ve.relatedTarget=ae,Be=null,xo(Ee)===le&&(Ye=new Ye(ie,ne+"enter",Ve,h,Ee),Ye.target=ae,Ye.relatedTarget=pn,Be=Ye),pn=Be,Fe&&Ve)t:{for(Ye=Fe,ie=Ve,ne=0,ae=Ye;ae;ae=qa(ae))ne++;for(ae=0,Be=ie;Be;Be=qa(Be))ae++;for(;0<ne-ae;)Ye=qa(Ye),ne--;for(;0<ae-ne;)ie=qa(ie),ae--;for(;ne--;){if(Ye===ie||ie!==null&&Ye===ie.alternate)break t;Ye=qa(Ye),ie=qa(ie)}Ye=null}else Ye=null;Fe!==null&&MC(Ie,ve,Fe,Ye,!1),Ve!==null&&pn!==null&&MC(Ie,pn,Ve,Ye,!0)}}e:{if(ve=le?Ka(le):window,Fe=ve.nodeName&&ve.nodeName.toLowerCase(),Fe==="select"||Fe==="input"&&ve.type==="file")var Xe=r6;else if(oC(ve))if(lC)Xe=l6;else{Xe=o6;var rt=s6}else(Fe=ve.nodeName)&&Fe.toLowerCase()==="input"&&(ve.type==="checkbox"||ve.type==="radio")&&(Xe=a6);if(Xe&&(Xe=Xe(s,le))){aC(Ie,Xe,h,Ee);break e}rt&&rt(s,ve,le),s==="focusout"&&(rt=ve._wrapperState)&&rt.controlled&&ve.type==="number"&&He(ve,"number",ve.value)}switch(rt=le?Ka(le):window,s){case"focusin":(oC(rt)||rt.contentEditable==="true")&&(ja=rt,ag=le,Ic=null);break;case"focusout":Ic=ag=ja=null;break;case"mousedown":lg=!0;break;case"contextmenu":case"mouseup":case"dragend":lg=!1,gC(Ie,h,Ee);break;case"selectionchange":if(f6)break;case"keydown":case"keyup":gC(Ie,h,Ee)}var st;if(ig)e:{switch(s){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Wa?rC(s,h)&&(ut="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(ut="onCompositionStart");ut&&(tC&&h.locale!=="ko"&&(Wa||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Wa&&(st=Ky()):(Ls=Ee,Jp="value"in Ls?Ls.value:Ls.textContent,Wa=!0)),rt=Hf(le,ut),0<rt.length&&(ut=new $y(ut,s,null,h,Ee),Ie.push({event:ut,listeners:rt}),st?ut.data=st:(st=sC(h),st!==null&&(ut.data=st)))),(st=$D?e6(s,h):t6(s,h))&&(le=Hf(le,"onBeforeInput"),0<le.length&&(Ee=new $y("onBeforeInput","beforeinput",null,h,Ee),Ie.push({event:Ee,listeners:le}),Ee.data=st))}SC(Ie,a)})}function wc(s,a,h){return{instance:s,listener:a,currentTarget:h}}function Hf(s,a){for(var h=a+"Capture",m=[];s!==null;){var I=s,M=I.stateNode;I.tag===5&&M!==null&&(I=M,M=Tt(s,h),M!=null&&m.unshift(wc(s,M,I)),M=Tt(s,a),M!=null&&m.push(wc(s,M,I))),s=s.return}return m}function qa(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function MC(s,a,h,m,I){for(var M=a._reactName,P=[];h!==null&&h!==m;){var W=h,Z=W.alternate,le=W.stateNode;if(Z!==null&&Z===m)break;W.tag===5&&le!==null&&(W=le,I?(Z=Tt(h,M),Z!=null&&P.unshift(wc(h,Z,W))):I||(Z=Tt(h,M),Z!=null&&P.push(wc(h,Z,W)))),h=h.return}P.length!==0&&s.push({event:a,listeners:P})}var p6=/\r\n?/g,g6=/\u0000|\uFFFD/g;function TC(s){return(typeof s=="string"?s:""+s).replace(p6,`
4253
+ `+I[P].replace(" at new "," at ");return s.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",s.displayName)),Z}while(1<=P&&0<=W);break}}}finally{K=!1,Error.prepareStackTrace=h}return(s=s?s.displayName||s.name:"")?G(s):""}function Ae(s){switch(s.tag){case 5:return G(s.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return s=J(s.type,!1),s;case 11:return s=J(s.type.render,!1),s;case 1:return s=J(s.type,!0),s;default:return""}}function ge(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case B:return"Fragment";case b:return"Portal";case R:return"Profiler";case L:return"StrictMode";case O:return"Suspense";case F:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case N:return(s.displayName||"Context")+".Consumer";case T:return(s._context.displayName||"Context")+".Provider";case k:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case V:return a=s.displayName||null,a!==null?a:ge(s.type)||"Memo";case X:a=s._payload,s=s._init;try{return ge(s(a))}catch{}}return null}function be(s){var a=s.type;switch(s.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=a.render,s=s.displayName||s.name||"",a.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(a);case 8:return a===L?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function de(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Oe(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function It(s){var a=Oe(s)?"checked":"value",h=Object.getOwnPropertyDescriptor(s.constructor.prototype,a),m=""+s[a];if(!s.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var I=h.get,M=h.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return I.call(this)},set:function(P){m=""+P,M.call(this,P)}}),Object.defineProperty(s,a,{enumerable:h.enumerable}),{getValue:function(){return m},setValue:function(P){m=""+P},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function ot(s){s._valueTracker||(s._valueTracker=It(s))}function oe(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var h=a.getValue(),m="";return s&&(m=Oe(s)?s.checked?"true":"false":s.value),s=m,s!==h?(a.setValue(s),!0):!1}function Mt(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ne(s,a){var h=a.checked;return U({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??s._wrapperState.initialChecked})}function Ze(s,a){var h=a.defaultValue==null?"":a.defaultValue,m=a.checked!=null?a.checked:a.defaultChecked;h=de(a.value!=null?a.value:h),s._wrapperState={initialChecked:m,initialValue:h,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function _e(s,a){a=a.checked,a!=null&&y(s,"checked",a,!1)}function it(s,a){_e(s,a);var h=de(a.value),m=a.type;if(h!=null)m==="number"?(h===0&&s.value===""||s.value!=h)&&(s.value=""+h):s.value!==""+h&&(s.value=""+h);else if(m==="submit"||m==="reset"){s.removeAttribute("value");return}a.hasOwnProperty("value")?He(s,a.type,h):a.hasOwnProperty("defaultValue")&&He(s,a.type,de(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(s.defaultChecked=!!a.defaultChecked)}function Ue(s,a,h){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var m=a.type;if(!(m!=="submit"&&m!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+s._wrapperState.initialValue,h||a===s.value||(s.value=a),s.defaultValue=a}h=s.name,h!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,h!==""&&(s.name=h)}function He(s,a,h){(a!=="number"||Mt(s.ownerDocument)!==s)&&(h==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+h&&(s.defaultValue=""+h))}var $e=Array.isArray;function at(s,a,h,m){if(s=s.options,a){a={};for(var I=0;I<h.length;I++)a["$"+h[I]]=!0;for(h=0;h<s.length;h++)I=a.hasOwnProperty("$"+s[h].value),s[h].selected!==I&&(s[h].selected=I),I&&m&&(s[h].defaultSelected=!0)}else{for(h=""+de(h),a=null,I=0;I<s.length;I++){if(s[I].value===h){s[I].selected=!0,m&&(s[I].defaultSelected=!0);return}a!==null||s[I].disabled||(a=s[I])}a!==null&&(a.selected=!0)}}function At(s,a){if(a.dangerouslySetInnerHTML!=null)throw Error(t(91));return U({},a,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function H(s,a){var h=a.value;if(h==null){if(h=a.children,a=a.defaultValue,h!=null){if(a!=null)throw Error(t(92));if($e(h)){if(1<h.length)throw Error(t(93));h=h[0]}a=h}a==null&&(a=""),h=a}s._wrapperState={initialValue:de(h)}}function Q(s,a){var h=de(a.value),m=de(a.defaultValue);h!=null&&(h=""+h,h!==s.value&&(s.value=h),a.defaultValue==null&&s.defaultValue!==h&&(s.defaultValue=h)),m!=null&&(s.defaultValue=""+m)}function se(s){var a=s.textContent;a===s._wrapperState.initialValue&&a!==""&&a!==null&&(s.value=a)}function Ce(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(s,a){return s==null||s==="http://www.w3.org/1999/xhtml"?Ce(a):s==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var xe,We=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,h,m,I){MSApp.execUnsafeLocalFunction(function(){return s(a,h,m,I)})}:s}(function(s,a){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=a;else{for(xe=xe||document.createElement("div"),xe.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=xe.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;a.firstChild;)s.appendChild(a.firstChild)}});function Se(s,a){if(a){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=a;return}}s.textContent=a}var Re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},q=["Webkit","ms","Moz","O"];Object.keys(Re).forEach(function(s){q.forEach(function(a){a=a+s.charAt(0).toUpperCase()+s.substring(1),Re[a]=Re[s]})});function Me(s,a,h){return a==null||typeof a=="boolean"||a===""?"":h||typeof a!="number"||a===0||Re.hasOwnProperty(s)&&Re[s]?(""+a).trim():a+"px"}function pe(s,a){s=s.style;for(var h in a)if(a.hasOwnProperty(h)){var m=h.indexOf("--")===0,I=Me(h,a[h],m);h==="float"&&(h="cssFloat"),m?s.setProperty(h,I):s[h]=I}}var nt=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function je(s,a){if(a){if(nt[s]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(t(137,s));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(t(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(t(61))}if(a.style!=null&&typeof a.style!="object")throw Error(t(62))}}function Je(s,a){if(s.indexOf("-")===-1)return typeof a.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ge=null;function Pe(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var dt=null,ee=null,Te=null;function ye(s){if(s=Tc(s)){if(typeof dt!="function")throw Error(t(280));var a=s.stateNode;a&&(a=jf(a),dt(s.stateNode,s.type,a))}}function he(s){ee?Te?Te.push(s):Te=[s]:ee=s}function we(){if(ee){var s=ee,a=Te;if(Te=ee=null,ye(s),a)for(s=0;s<a.length;s++)ye(a[s])}}function qe(s,a){return s(a)}function pt(){}var Wt=!1;function Dn(s,a,h){if(Wt)return s(a,h);Wt=!0;try{return qe(s,a,h)}finally{Wt=!1,(ee!==null||Te!==null)&&(pt(),we())}}function Tt(s,a){var h=s.stateNode;if(h===null)return null;var m=jf(h);if(m===null)return null;h=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(t(231,a,typeof h));return h}var an=!1;if(c)try{var Pt={};Object.defineProperty(Pt,"passive",{get:function(){an=!0}}),window.addEventListener("test",Pt,Pt),window.removeEventListener("test",Pt,Pt)}catch{an=!1}function Ti(s,a,h,m,I,M,P,W,Z){var le=Array.prototype.slice.call(arguments,3);try{a.apply(h,le)}catch(Ee){this.onError(Ee)}}var Cr=!1,ir=null,Co=!1,ws=null,wf={onError:function(s){Cr=!0,ir=s}};function Mf(s,a,h,m,I,M,P,W,Z){Cr=!1,ir=null,Ti.apply(wf,arguments)}function Wp(s,a,h,m,I,M,P,W,Z){if(Mf.apply(this,arguments),Cr){if(Cr){var le=ir;Cr=!1,ir=null}else throw Error(t(198));Co||(Co=!0,ws=le)}}function Kr(s){var a=s,h=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,a.flags&4098&&(h=a.return),s=a.return;while(s)}return a.tag===3?h:null}function Tf(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function z(s){if(Kr(s)!==s)throw Error(t(188))}function re(s){var a=s.alternate;if(!a){if(a=Kr(s),a===null)throw Error(t(188));return a!==s?null:s}for(var h=s,m=a;;){var I=h.return;if(I===null)break;var M=I.alternate;if(M===null){if(m=I.return,m!==null){h=m;continue}break}if(I.child===M.child){for(M=I.child;M;){if(M===h)return z(I),s;if(M===m)return z(I),a;M=M.sibling}throw Error(t(188))}if(h.return!==m.return)h=I,m=M;else{for(var P=!1,W=I.child;W;){if(W===h){P=!0,h=I,m=M;break}if(W===m){P=!0,m=I,h=M;break}W=W.sibling}if(!P){for(W=M.child;W;){if(W===h){P=!0,h=M,m=I;break}if(W===m){P=!0,m=M,h=I;break}W=W.sibling}if(!P)throw Error(t(189))}}if(h.alternate!==m)throw Error(t(190))}if(h.tag!==3)throw Error(t(188));return h.stateNode.current===h?s:a}function ce(s){return s=re(s),s!==null?ue(s):null}function ue(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var a=ue(s);if(a!==null)return a;s=s.sibling}return null}var fe=e.unstable_scheduleCallback,ke=e.unstable_cancelCallback,et=e.unstable_shouldYield,lt=e.unstable_requestPaint,Qe=e.unstable_now,gt=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,ht=e.unstable_UserBlockingPriority,jt=e.unstable_NormalPriority,ii=e.unstable_LowPriority,dn=e.unstable_IdlePriority,di=null,Bt=null;function Et(s){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(di,s,void 0,(s.current.flags&128)===128)}catch{}}var ri=Math.clz32?Math.clz32:Bf,ln=Math.log,Jr=Math.LN2;function Bf(s){return s>>>=0,s===0?32:31-(ln(s)/Jr|0)|0}var Ir=64,Ms=4194304;function An(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Qi(s,a){var h=s.pendingLanes;if(h===0)return 0;var m=0,I=s.suspendedLanes,M=s.pingedLanes,P=h&268435455;if(P!==0){var W=P&~I;W!==0?m=An(W):(M&=P,M!==0&&(m=An(M)))}else P=h&~I,P!==0?m=An(P):M!==0&&(m=An(M));if(m===0)return 0;if(a!==0&&a!==m&&!(a&I)&&(I=m&-m,M=a&-a,I>=M||I===16&&(M&4194240)!==0))return a;if(m&4&&(m|=h&16),a=s.entangledLanes,a!==0)for(s=s.entanglements,a&=m;0<a;)h=31-ri(a),I=1<<h,m|=s[h],a&=~I;return m}function uc(s,a){switch(s){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function si(s,a){for(var h=s.suspendedLanes,m=s.pingedLanes,I=s.expirationTimes,M=s.pendingLanes;0<M;){var P=31-ri(M),W=1<<P,Z=I[P];Z===-1?(!(W&h)||W&m)&&(I[P]=uc(W,a)):Z<=a&&(s.expiredLanes|=W),M&=~W}}function Io(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Rf(){var s=Ir;return Ir<<=1,!(Ir&4194240)&&(Ir=64),s}function Ga(s){for(var a=[],h=0;31>h;h++)a.push(s);return a}function fc(s,a,h){s.pendingLanes|=a,a!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,a=31-ri(a),s[a]=h}function xD(s,a){var h=s.pendingLanes&~a;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=a,s.mutableReadLanes&=a,s.entangledLanes&=a,a=s.entanglements;var m=s.eventTimes;for(s=s.expirationTimes;0<h;){var I=31-ri(h),M=1<<I;a[I]=0,m[I]=-1,s[I]=-1,h&=~M}}function jp(s,a){var h=s.entangledLanes|=a;for(s=s.entanglements;h;){var m=31-ri(h),I=1<<m;I&a|s[m]&a&&(s[m]|=a),h&=~I}}var kt=0;function zy(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var Gy,Yp,Hy,Vy,Wy,qp=!1,bf=[],Ts=null,Bs=null,Rs=null,hc=new Map,dc=new Map,bs=[],SD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jy(s,a){switch(s){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":Bs=null;break;case"mouseover":case"mouseout":Rs=null;break;case"pointerover":case"pointerout":hc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":dc.delete(a.pointerId)}}function Ac(s,a,h,m,I,M){return s===null||s.nativeEvent!==M?(s={blockedOn:a,domEventName:h,eventSystemFlags:m,nativeEvent:M,targetContainers:[I]},a!==null&&(a=Tc(a),a!==null&&Yp(a)),s):(s.eventSystemFlags|=m,a=s.targetContainers,I!==null&&a.indexOf(I)===-1&&a.push(I),s)}function wD(s,a,h,m,I){switch(a){case"focusin":return Ts=Ac(Ts,s,a,h,m,I),!0;case"dragenter":return Bs=Ac(Bs,s,a,h,m,I),!0;case"mouseover":return Rs=Ac(Rs,s,a,h,m,I),!0;case"pointerover":var M=I.pointerId;return hc.set(M,Ac(hc.get(M)||null,s,a,h,m,I)),!0;case"gotpointercapture":return M=I.pointerId,dc.set(M,Ac(dc.get(M)||null,s,a,h,m,I)),!0}return!1}function Yy(s){var a=xo(s.target);if(a!==null){var h=Kr(a);if(h!==null){if(a=h.tag,a===13){if(a=Tf(h),a!==null){s.blockedOn=a,Wy(s.priority,function(){Hy(h)});return}}else if(a===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Lf(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var h=Kp(s.domEventName,s.eventSystemFlags,a[0],s.nativeEvent);if(h===null){h=s.nativeEvent;var m=new h.constructor(h.type,h);Ge=m,h.target.dispatchEvent(m),Ge=null}else return a=Tc(h),a!==null&&Yp(a),s.blockedOn=h,!1;a.shift()}return!0}function qy(s,a,h){Lf(s)&&h.delete(a)}function MD(){qp=!1,Ts!==null&&Lf(Ts)&&(Ts=null),Bs!==null&&Lf(Bs)&&(Bs=null),Rs!==null&&Lf(Rs)&&(Rs=null),hc.forEach(qy),dc.forEach(qy)}function pc(s,a){s.blockedOn===a&&(s.blockedOn=null,qp||(qp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,MD)))}function gc(s){function a(I){return pc(I,s)}if(0<bf.length){pc(bf[0],s);for(var h=1;h<bf.length;h++){var m=bf[h];m.blockedOn===s&&(m.blockedOn=null)}}for(Ts!==null&&pc(Ts,s),Bs!==null&&pc(Bs,s),Rs!==null&&pc(Rs,s),hc.forEach(a),dc.forEach(a),h=0;h<bs.length;h++)m=bs[h],m.blockedOn===s&&(m.blockedOn=null);for(;0<bs.length&&(h=bs[0],h.blockedOn===null);)Yy(h),h.blockedOn===null&&bs.shift()}var Ha=x.ReactCurrentBatchConfig,Df=!0;function TD(s,a,h,m){var I=kt,M=Ha.transition;Ha.transition=null;try{kt=1,Xp(s,a,h,m)}finally{kt=I,Ha.transition=M}}function BD(s,a,h,m){var I=kt,M=Ha.transition;Ha.transition=null;try{kt=4,Xp(s,a,h,m)}finally{kt=I,Ha.transition=M}}function Xp(s,a,h,m){if(Df){var I=Kp(s,a,h,m);if(I===null)dg(s,a,m,Nf,h),jy(s,m);else if(wD(I,s,a,h,m))m.stopPropagation();else if(jy(s,m),a&4&&-1<SD.indexOf(s)){for(;I!==null;){var M=Tc(I);if(M!==null&&Gy(M),M=Kp(s,a,h,m),M===null&&dg(s,a,m,Nf,h),M===I)break;I=M}I!==null&&m.stopPropagation()}else dg(s,a,m,null,h)}}var Nf=null;function Kp(s,a,h,m){if(Nf=null,s=Pe(m),s=xo(s),s!==null)if(a=Kr(s),a===null)s=null;else if(h=a.tag,h===13){if(s=Tf(a),s!==null)return s;s=null}else if(h===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null);return Nf=s,null}function Xy(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(gt()){case ft:return 1;case ht:return 4;case jt:case ii:return 16;case dn:return 536870912;default:return 16}default:return 16}}var Ls=null,Jp=null,Pf=null;function Ky(){if(Pf)return Pf;var s,a=Jp,h=a.length,m,I="value"in Ls?Ls.value:Ls.textContent,M=I.length;for(s=0;s<h&&a[s]===I[s];s++);var P=h-s;for(m=1;m<=P&&a[h-m]===I[M-m];m++);return Pf=I.slice(s,1<m?1-m:void 0)}function Uf(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function kf(){return!0}function Jy(){return!1}function Bi(s){function a(h,m,I,M,P){this._reactName=h,this._targetInst=I,this.type=m,this.nativeEvent=M,this.target=P,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(h=s[W],this[W]=h?h(M):M[W]);return this.isDefaultPrevented=(M.defaultPrevented!=null?M.defaultPrevented:M.returnValue===!1)?kf:Jy,this.isPropagationStopped=Jy,this}return U(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=kf)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=kf)},persist:function(){},isPersistent:kf}),a}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zp=Bi(Va),mc=U({},Va,{view:0,detail:0}),RD=Bi(mc),$p,eg,vc,Ff=U({},mc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ng,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==vc&&(vc&&s.type==="mousemove"?($p=s.screenX-vc.screenX,eg=s.screenY-vc.screenY):eg=$p=0,vc=s),$p)},movementY:function(s){return"movementY"in s?s.movementY:eg}}),Zy=Bi(Ff),bD=U({},Ff,{dataTransfer:0}),LD=Bi(bD),DD=U({},mc,{relatedTarget:0}),tg=Bi(DD),ND=U({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),PD=Bi(ND),UD=U({},Va,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),kD=Bi(UD),FD=U({},Va,{data:0}),$y=Bi(FD),QD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},zD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GD(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=zD[s])?!!a[s]:!1}function ng(){return GD}var HD=U({},mc,{key:function(s){if(s.key){var a=QD[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=Uf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?OD[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ng,charCode:function(s){return s.type==="keypress"?Uf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Uf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),VD=Bi(HD),WD=U({},Ff,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eC=Bi(WD),jD=U({},mc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ng}),YD=Bi(jD),qD=U({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),XD=Bi(qD),KD=U({},Ff,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),JD=Bi(KD),ZD=[9,13,27,32],ig=c&&"CompositionEvent"in window,_c=null;c&&"documentMode"in document&&(_c=document.documentMode);var $D=c&&"TextEvent"in window&&!_c,tC=c&&(!ig||_c&&8<_c&&11>=_c),nC=String.fromCharCode(32),iC=!1;function rC(s,a){switch(s){case"keyup":return ZD.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Wa=!1;function e6(s,a){switch(s){case"compositionend":return sC(a);case"keypress":return a.which!==32?null:(iC=!0,nC);case"textInput":return s=a.data,s===nC&&iC?null:s;default:return null}}function t6(s,a){if(Wa)return s==="compositionend"||!ig&&rC(s,a)?(s=Ky(),Pf=Jp=Ls=null,Wa=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return tC&&a.locale!=="ko"?null:a.data;default:return null}}var n6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oC(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!n6[s.type]:a==="textarea"}function aC(s,a,h,m){he(m),a=Hf(a,"onChange"),0<a.length&&(h=new Zp("onChange","change",null,h,m),s.push({event:h,listeners:a}))}var Ec=null,yc=null;function i6(s){SC(s,0)}function Qf(s){var a=Ka(s);if(oe(a))return s}function r6(s,a){if(s==="change")return a}var lC=!1;if(c){var rg;if(c){var sg="oninput"in document;if(!sg){var cC=document.createElement("div");cC.setAttribute("oninput","return;"),sg=typeof cC.oninput=="function"}rg=sg}else rg=!1;lC=rg&&(!document.documentMode||9<document.documentMode)}function uC(){Ec&&(Ec.detachEvent("onpropertychange",fC),yc=Ec=null)}function fC(s){if(s.propertyName==="value"&&Qf(yc)){var a=[];aC(a,yc,s,Pe(s)),Dn(i6,a)}}function s6(s,a,h){s==="focusin"?(uC(),Ec=a,yc=h,Ec.attachEvent("onpropertychange",fC)):s==="focusout"&&uC()}function o6(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Qf(yc)}function a6(s,a){if(s==="click")return Qf(a)}function l6(s,a){if(s==="input"||s==="change")return Qf(a)}function c6(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var rr=typeof Object.is=="function"?Object.is:c6;function Cc(s,a){if(rr(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var h=Object.keys(s),m=Object.keys(a);if(h.length!==m.length)return!1;for(m=0;m<h.length;m++){var I=h[m];if(!f.call(a,I)||!rr(s[I],a[I]))return!1}return!0}function hC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function dC(s,a){var h=hC(s);s=0;for(var m;h;){if(h.nodeType===3){if(m=s+h.textContent.length,s<=a&&m>=a)return{node:h,offset:a-s};s=m}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=hC(h)}}function AC(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?AC(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function pC(){for(var s=window,a=Mt();a instanceof s.HTMLIFrameElement;){try{var h=typeof a.contentWindow.location.href=="string"}catch{h=!1}if(h)s=a.contentWindow;else break;a=Mt(s.document)}return a}function og(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}function u6(s){var a=pC(),h=s.focusedElem,m=s.selectionRange;if(a!==h&&h&&h.ownerDocument&&AC(h.ownerDocument.documentElement,h)){if(m!==null&&og(h)){if(a=m.start,s=m.end,s===void 0&&(s=a),"selectionStart"in h)h.selectionStart=a,h.selectionEnd=Math.min(s,h.value.length);else if(s=(a=h.ownerDocument||document)&&a.defaultView||window,s.getSelection){s=s.getSelection();var I=h.textContent.length,M=Math.min(m.start,I);m=m.end===void 0?M:Math.min(m.end,I),!s.extend&&M>m&&(I=m,m=M,M=I),I=dC(h,M);var P=dC(h,m);I&&P&&(s.rangeCount!==1||s.anchorNode!==I.node||s.anchorOffset!==I.offset||s.focusNode!==P.node||s.focusOffset!==P.offset)&&(a=a.createRange(),a.setStart(I.node,I.offset),s.removeAllRanges(),M>m?(s.addRange(a),s.extend(P.node,P.offset)):(a.setEnd(P.node,P.offset),s.addRange(a)))}}for(a=[],s=h;s=s.parentNode;)s.nodeType===1&&a.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<a.length;h++)s=a[h],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var f6=c&&"documentMode"in document&&11>=document.documentMode,ja=null,ag=null,Ic=null,lg=!1;function gC(s,a,h){var m=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;lg||ja==null||ja!==Mt(m)||(m=ja,"selectionStart"in m&&og(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ic&&Cc(Ic,m)||(Ic=m,m=Hf(ag,"onSelect"),0<m.length&&(a=new Zp("onSelect","select",null,a,h),s.push({event:a,listeners:m}),a.target=ja)))}function Of(s,a){var h={};return h[s.toLowerCase()]=a.toLowerCase(),h["Webkit"+s]="webkit"+a,h["Moz"+s]="moz"+a,h}var Ya={animationend:Of("Animation","AnimationEnd"),animationiteration:Of("Animation","AnimationIteration"),animationstart:Of("Animation","AnimationStart"),transitionend:Of("Transition","TransitionEnd")},cg={},mC={};c&&(mC=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function zf(s){if(cg[s])return cg[s];if(!Ya[s])return s;var a=Ya[s],h;for(h in a)if(a.hasOwnProperty(h)&&h in mC)return cg[s]=a[h];return s}var vC=zf("animationend"),_C=zf("animationiteration"),EC=zf("animationstart"),yC=zf("transitionend"),CC=new Map,IC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ds(s,a){CC.set(s,a),o(a,[s])}for(var ug=0;ug<IC.length;ug++){var fg=IC[ug],h6=fg.toLowerCase(),d6=fg[0].toUpperCase()+fg.slice(1);Ds(h6,"on"+d6)}Ds(vC,"onAnimationEnd"),Ds(_C,"onAnimationIteration"),Ds(EC,"onAnimationStart"),Ds("dblclick","onDoubleClick"),Ds("focusin","onFocus"),Ds("focusout","onBlur"),Ds(yC,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),A6=new Set("cancel close invalid load scroll toggle".split(" ").concat(xc));function xC(s,a,h){var m=s.type||"unknown-event";s.currentTarget=h,Wp(m,a,void 0,s),s.currentTarget=null}function SC(s,a){a=(a&4)!==0;for(var h=0;h<s.length;h++){var m=s[h],I=m.event;m=m.listeners;e:{var M=void 0;if(a)for(var P=m.length-1;0<=P;P--){var W=m[P],Z=W.instance,le=W.currentTarget;if(W=W.listener,Z!==M&&I.isPropagationStopped())break e;xC(I,W,le),M=Z}else for(P=0;P<m.length;P++){if(W=m[P],Z=W.instance,le=W.currentTarget,W=W.listener,Z!==M&&I.isPropagationStopped())break e;xC(I,W,le),M=Z}}}if(Co)throw s=ws,Co=!1,ws=null,s}function Jt(s,a){var h=a[_g];h===void 0&&(h=a[_g]=new Set);var m=s+"__bubble";h.has(m)||(wC(a,s,2,!1),h.add(m))}function hg(s,a,h){var m=0;a&&(m|=4),wC(h,s,m,a)}var Gf="_reactListening"+Math.random().toString(36).slice(2);function Sc(s){if(!s[Gf]){s[Gf]=!0,n.forEach(function(h){h!=="selectionchange"&&(A6.has(h)||hg(h,!1,s),hg(h,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Gf]||(a[Gf]=!0,hg("selectionchange",!1,a))}}function wC(s,a,h,m){switch(Xy(a)){case 1:var I=TD;break;case 4:I=BD;break;default:I=Xp}h=I.bind(null,a,h,s),I=void 0,!an||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(I=!0),m?I!==void 0?s.addEventListener(a,h,{capture:!0,passive:I}):s.addEventListener(a,h,!0):I!==void 0?s.addEventListener(a,h,{passive:I}):s.addEventListener(a,h,!1)}function dg(s,a,h,m,I){var M=m;if(!(a&1)&&!(a&2)&&m!==null)e:for(;;){if(m===null)return;var P=m.tag;if(P===3||P===4){var W=m.stateNode.containerInfo;if(W===I||W.nodeType===8&&W.parentNode===I)break;if(P===4)for(P=m.return;P!==null;){var Z=P.tag;if((Z===3||Z===4)&&(Z=P.stateNode.containerInfo,Z===I||Z.nodeType===8&&Z.parentNode===I))return;P=P.return}for(;W!==null;){if(P=xo(W),P===null)return;if(Z=P.tag,Z===5||Z===6){m=M=P;continue e}W=W.parentNode}}m=m.return}Dn(function(){var le=M,Ee=Pe(h),Ie=[];e:{var ve=CC.get(s);if(ve!==void 0){var Fe=Zp,Ve=s;switch(s){case"keypress":if(Uf(h)===0)break e;case"keydown":case"keyup":Fe=VD;break;case"focusin":Ve="focus",Fe=tg;break;case"focusout":Ve="blur",Fe=tg;break;case"beforeblur":case"afterblur":Fe=tg;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Fe=Zy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Fe=LD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Fe=YD;break;case vC:case _C:case EC:Fe=PD;break;case yC:Fe=XD;break;case"scroll":Fe=RD;break;case"wheel":Fe=JD;break;case"copy":case"cut":case"paste":Fe=kD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Fe=eC}var Ye=(a&4)!==0,pn=!Ye&&s==="scroll",ie=Ye?ve!==null?ve+"Capture":null:ve;Ye=[];for(var ne=le,ae;ne!==null;){ae=ne;var Be=ae.stateNode;if(ae.tag===5&&Be!==null&&(ae=Be,ie!==null&&(Be=Tt(ne,ie),Be!=null&&Ye.push(wc(ne,Be,ae)))),pn)break;ne=ne.return}0<Ye.length&&(ve=new Fe(ve,Ve,null,h,Ee),Ie.push({event:ve,listeners:Ye}))}}if(!(a&7)){e:{if(ve=s==="mouseover"||s==="pointerover",Fe=s==="mouseout"||s==="pointerout",ve&&h!==Ge&&(Ve=h.relatedTarget||h.fromElement)&&(xo(Ve)||Ve[Zr]))break e;if((Fe||ve)&&(ve=Ee.window===Ee?Ee:(ve=Ee.ownerDocument)?ve.defaultView||ve.parentWindow:window,Fe?(Ve=h.relatedTarget||h.toElement,Fe=le,Ve=Ve?xo(Ve):null,Ve!==null&&(pn=Kr(Ve),Ve!==pn||Ve.tag!==5&&Ve.tag!==6)&&(Ve=null)):(Fe=null,Ve=le),Fe!==Ve)){if(Ye=Zy,Be="onMouseLeave",ie="onMouseEnter",ne="mouse",(s==="pointerout"||s==="pointerover")&&(Ye=eC,Be="onPointerLeave",ie="onPointerEnter",ne="pointer"),pn=Fe==null?ve:Ka(Fe),ae=Ve==null?ve:Ka(Ve),ve=new Ye(Be,ne+"leave",Fe,h,Ee),ve.target=pn,ve.relatedTarget=ae,Be=null,xo(Ee)===le&&(Ye=new Ye(ie,ne+"enter",Ve,h,Ee),Ye.target=ae,Ye.relatedTarget=pn,Be=Ye),pn=Be,Fe&&Ve)t:{for(Ye=Fe,ie=Ve,ne=0,ae=Ye;ae;ae=qa(ae))ne++;for(ae=0,Be=ie;Be;Be=qa(Be))ae++;for(;0<ne-ae;)Ye=qa(Ye),ne--;for(;0<ae-ne;)ie=qa(ie),ae--;for(;ne--;){if(Ye===ie||ie!==null&&Ye===ie.alternate)break t;Ye=qa(Ye),ie=qa(ie)}Ye=null}else Ye=null;Fe!==null&&MC(Ie,ve,Fe,Ye,!1),Ve!==null&&pn!==null&&MC(Ie,pn,Ve,Ye,!0)}}e:{if(ve=le?Ka(le):window,Fe=ve.nodeName&&ve.nodeName.toLowerCase(),Fe==="select"||Fe==="input"&&ve.type==="file")var Xe=r6;else if(oC(ve))if(lC)Xe=l6;else{Xe=o6;var rt=s6}else(Fe=ve.nodeName)&&Fe.toLowerCase()==="input"&&(ve.type==="checkbox"||ve.type==="radio")&&(Xe=a6);if(Xe&&(Xe=Xe(s,le))){aC(Ie,Xe,h,Ee);break e}rt&&rt(s,ve,le),s==="focusout"&&(rt=ve._wrapperState)&&rt.controlled&&ve.type==="number"&&He(ve,"number",ve.value)}switch(rt=le?Ka(le):window,s){case"focusin":(oC(rt)||rt.contentEditable==="true")&&(ja=rt,ag=le,Ic=null);break;case"focusout":Ic=ag=ja=null;break;case"mousedown":lg=!0;break;case"contextmenu":case"mouseup":case"dragend":lg=!1,gC(Ie,h,Ee);break;case"selectionchange":if(f6)break;case"keydown":case"keyup":gC(Ie,h,Ee)}var st;if(ig)e:{switch(s){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Wa?rC(s,h)&&(ut="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(ut="onCompositionStart");ut&&(tC&&h.locale!=="ko"&&(Wa||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Wa&&(st=Ky()):(Ls=Ee,Jp="value"in Ls?Ls.value:Ls.textContent,Wa=!0)),rt=Hf(le,ut),0<rt.length&&(ut=new $y(ut,s,null,h,Ee),Ie.push({event:ut,listeners:rt}),st?ut.data=st:(st=sC(h),st!==null&&(ut.data=st)))),(st=$D?e6(s,h):t6(s,h))&&(le=Hf(le,"onBeforeInput"),0<le.length&&(Ee=new $y("onBeforeInput","beforeinput",null,h,Ee),Ie.push({event:Ee,listeners:le}),Ee.data=st))}SC(Ie,a)})}function wc(s,a,h){return{instance:s,listener:a,currentTarget:h}}function Hf(s,a){for(var h=a+"Capture",m=[];s!==null;){var I=s,M=I.stateNode;I.tag===5&&M!==null&&(I=M,M=Tt(s,h),M!=null&&m.unshift(wc(s,M,I)),M=Tt(s,a),M!=null&&m.push(wc(s,M,I))),s=s.return}return m}function qa(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function MC(s,a,h,m,I){for(var M=a._reactName,P=[];h!==null&&h!==m;){var W=h,Z=W.alternate,le=W.stateNode;if(Z!==null&&Z===m)break;W.tag===5&&le!==null&&(W=le,I?(Z=Tt(h,M),Z!=null&&P.unshift(wc(h,Z,W))):I||(Z=Tt(h,M),Z!=null&&P.push(wc(h,Z,W)))),h=h.return}P.length!==0&&s.push({event:a,listeners:P})}var p6=/\r\n?/g,g6=/\u0000|\uFFFD/g;function TC(s){return(typeof s=="string"?s:""+s).replace(p6,`
4254
4254
  `).replace(g6,"")}function Vf(s,a,h){if(a=TC(a),TC(s)!==a&&h)throw Error(t(425))}function Wf(){}var Ag=null,pg=null;function gg(s,a){return s==="textarea"||s==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var mg=typeof setTimeout=="function"?setTimeout:void 0,m6=typeof clearTimeout=="function"?clearTimeout:void 0,BC=typeof Promise=="function"?Promise:void 0,v6=typeof queueMicrotask=="function"?queueMicrotask:typeof BC<"u"?function(s){return BC.resolve(null).then(s).catch(_6)}:mg;function _6(s){setTimeout(function(){throw s})}function vg(s,a){var h=a,m=0;do{var I=h.nextSibling;if(s.removeChild(h),I&&I.nodeType===8)if(h=I.data,h==="/$"){if(m===0){s.removeChild(I),gc(a);return}m--}else h!=="$"&&h!=="$?"&&h!=="$!"||m++;h=I}while(h);gc(a)}function Ns(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return s}function RC(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"){if(a===0)return s;a--}else h==="/$"&&a++}s=s.previousSibling}return null}var Xa=Math.random().toString(36).slice(2),xr="__reactFiber$"+Xa,Mc="__reactProps$"+Xa,Zr="__reactContainer$"+Xa,_g="__reactEvents$"+Xa,E6="__reactListeners$"+Xa,y6="__reactHandles$"+Xa;function xo(s){var a=s[xr];if(a)return a;for(var h=s.parentNode;h;){if(a=h[Zr]||h[xr]){if(h=a.alternate,a.child!==null||h!==null&&h.child!==null)for(s=RC(s);s!==null;){if(h=s[xr])return h;s=RC(s)}return a}s=h,h=s.parentNode}return null}function Tc(s){return s=s[xr]||s[Zr],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Ka(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(t(33))}function jf(s){return s[Mc]||null}var Eg=[],Ja=-1;function Ps(s){return{current:s}}function Zt(s){0>Ja||(s.current=Eg[Ja],Eg[Ja]=null,Ja--)}function Yt(s,a){Ja++,Eg[Ja]=s.current,s.current=a}var Us={},jn=Ps(Us),Ai=Ps(!1),So=Us;function Za(s,a){var h=s.type.contextTypes;if(!h)return Us;var m=s.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===a)return m.__reactInternalMemoizedMaskedChildContext;var I={},M;for(M in h)I[M]=a[M];return m&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=a,s.__reactInternalMemoizedMaskedChildContext=I),I}function pi(s){return s=s.childContextTypes,s!=null}function Yf(){Zt(Ai),Zt(jn)}function bC(s,a,h){if(jn.current!==Us)throw Error(t(168));Yt(jn,a),Yt(Ai,h)}function LC(s,a,h){var m=s.stateNode;if(a=a.childContextTypes,typeof m.getChildContext!="function")return h;m=m.getChildContext();for(var I in m)if(!(I in a))throw Error(t(108,be(s)||"Unknown",I));return U({},h,m)}function qf(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Us,So=jn.current,Yt(jn,s),Yt(Ai,Ai.current),!0}function DC(s,a,h){var m=s.stateNode;if(!m)throw Error(t(169));h?(s=LC(s,a,So),m.__reactInternalMemoizedMergedChildContext=s,Zt(Ai),Zt(jn),Yt(jn,s)):Zt(Ai),Yt(Ai,h)}var $r=null,Xf=!1,yg=!1;function NC(s){$r===null?$r=[s]:$r.push(s)}function C6(s){Xf=!0,NC(s)}function ks(){if(!yg&&$r!==null){yg=!0;var s=0,a=kt;try{var h=$r;for(kt=1;s<h.length;s++){var m=h[s];do m=m(!0);while(m!==null)}$r=null,Xf=!1}catch(I){throw $r!==null&&($r=$r.slice(s+1)),fe(ft,ks),I}finally{kt=a,yg=!1}}return null}var $a=[],el=0,Kf=null,Jf=0,Oi=[],zi=0,wo=null,es=1,ts="";function Mo(s,a){$a[el++]=Jf,$a[el++]=Kf,Kf=s,Jf=a}function PC(s,a,h){Oi[zi++]=es,Oi[zi++]=ts,Oi[zi++]=wo,wo=s;var m=es;s=ts;var I=32-ri(m)-1;m&=~(1<<I),h+=1;var M=32-ri(a)+I;if(30<M){var P=I-I%5;M=(m&(1<<P)-1).toString(32),m>>=P,I-=P,es=1<<32-ri(a)+I|h<<I|m,ts=M+s}else es=1<<M|h<<I|m,ts=s}function Cg(s){s.return!==null&&(Mo(s,1),PC(s,1,0))}function Ig(s){for(;s===Kf;)Kf=$a[--el],$a[el]=null,Jf=$a[--el],$a[el]=null;for(;s===wo;)wo=Oi[--zi],Oi[zi]=null,ts=Oi[--zi],Oi[zi]=null,es=Oi[--zi],Oi[zi]=null}var Ri=null,bi=null,en=!1,sr=null;function UC(s,a){var h=Wi(5,null,null,0);h.elementType="DELETED",h.stateNode=a,h.return=s,a=s.deletions,a===null?(s.deletions=[h],s.flags|=16):a.push(h)}function kC(s,a){switch(s.tag){case 5:var h=s.type;return a=a.nodeType!==1||h.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(s.stateNode=a,Ri=s,bi=Ns(a.firstChild),!0):!1;case 6:return a=s.pendingProps===""||a.nodeType!==3?null:a,a!==null?(s.stateNode=a,Ri=s,bi=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(h=wo!==null?{id:es,overflow:ts}:null,s.memoizedState={dehydrated:a,treeContext:h,retryLane:1073741824},h=Wi(18,null,null,0),h.stateNode=a,h.return=s,s.child=h,Ri=s,bi=null,!0):!1;default:return!1}}function xg(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Sg(s){if(en){var a=bi;if(a){var h=a;if(!kC(s,a)){if(xg(s))throw Error(t(418));a=Ns(h.nextSibling);var m=Ri;a&&kC(s,a)?UC(m,h):(s.flags=s.flags&-4097|2,en=!1,Ri=s)}}else{if(xg(s))throw Error(t(418));s.flags=s.flags&-4097|2,en=!1,Ri=s}}}function FC(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Ri=s}function Zf(s){if(s!==Ri)return!1;if(!en)return FC(s),en=!0,!1;var a;if((a=s.tag!==3)&&!(a=s.tag!==5)&&(a=s.type,a=a!=="head"&&a!=="body"&&!gg(s.type,s.memoizedProps)),a&&(a=bi)){if(xg(s))throw QC(),Error(t(418));for(;a;)UC(s,a),a=Ns(a.nextSibling)}if(FC(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(t(317));e:{for(s=s.nextSibling,a=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"){if(a===0){bi=Ns(s.nextSibling);break e}a--}else h!=="$"&&h!=="$!"&&h!=="$?"||a++}s=s.nextSibling}bi=null}}else bi=Ri?Ns(s.stateNode.nextSibling):null;return!0}function QC(){for(var s=bi;s;)s=Ns(s.nextSibling)}function tl(){bi=Ri=null,en=!1}function wg(s){sr===null?sr=[s]:sr.push(s)}var I6=x.ReactCurrentBatchConfig;function or(s,a){if(s&&s.defaultProps){a=U({},a),s=s.defaultProps;for(var h in s)a[h]===void 0&&(a[h]=s[h]);return a}return a}var $f=Ps(null),eh=null,nl=null,Mg=null;function Tg(){Mg=nl=eh=null}function Bg(s){var a=$f.current;Zt($f),s._currentValue=a}function Rg(s,a,h){for(;s!==null;){var m=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),s===h)break;s=s.return}}function il(s,a){eh=s,Mg=nl=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&a&&(gi=!0),s.firstContext=null)}function Gi(s){var a=s._currentValue;if(Mg!==s)if(s={context:s,memoizedValue:a,next:null},nl===null){if(eh===null)throw Error(t(308));nl=s,eh.dependencies={lanes:0,firstContext:s}}else nl=nl.next=s;return a}var To=null;function bg(s){To===null?To=[s]:To.push(s)}function OC(s,a,h,m){var I=a.interleaved;return I===null?(h.next=h,bg(a)):(h.next=I.next,I.next=h),a.interleaved=h,ns(s,m)}function ns(s,a){s.lanes|=a;var h=s.alternate;for(h!==null&&(h.lanes|=a),h=s,s=s.return;s!==null;)s.childLanes|=a,h=s.alternate,h!==null&&(h.childLanes|=a),h=s,s=s.return;return h.tag===3?h.stateNode:null}var Fs=!1;function Lg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zC(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function is(s,a){return{eventTime:s,lane:a,tag:0,payload:null,callback:null,next:null}}function Qs(s,a,h){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,Rt&2){var I=m.pending;return I===null?a.next=a:(a.next=I.next,I.next=a),m.pending=a,ns(s,h)}return I=m.interleaved,I===null?(a.next=a,bg(m)):(a.next=I.next,I.next=a),m.interleaved=a,ns(s,h)}function th(s,a,h){if(a=a.updateQueue,a!==null&&(a=a.shared,(h&4194240)!==0)){var m=a.lanes;m&=s.pendingLanes,h|=m,a.lanes=h,jp(s,h)}}function GC(s,a){var h=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,h===m)){var I=null,M=null;if(h=h.firstBaseUpdate,h!==null){do{var P={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};M===null?I=M=P:M=M.next=P,h=h.next}while(h!==null);M===null?I=M=a:M=M.next=a}else I=M=a;h={baseState:m.baseState,firstBaseUpdate:I,lastBaseUpdate:M,shared:m.shared,effects:m.effects},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=a:s.next=a,h.lastBaseUpdate=a}function nh(s,a,h,m){var I=s.updateQueue;Fs=!1;var M=I.firstBaseUpdate,P=I.lastBaseUpdate,W=I.shared.pending;if(W!==null){I.shared.pending=null;var Z=W,le=Z.next;Z.next=null,P===null?M=le:P.next=le,P=Z;var Ee=s.alternate;Ee!==null&&(Ee=Ee.updateQueue,W=Ee.lastBaseUpdate,W!==P&&(W===null?Ee.firstBaseUpdate=le:W.next=le,Ee.lastBaseUpdate=Z))}if(M!==null){var Ie=I.baseState;P=0,Ee=le=Z=null,W=M;do{var ve=W.lane,Fe=W.eventTime;if((m&ve)===ve){Ee!==null&&(Ee=Ee.next={eventTime:Fe,lane:0,tag:W.tag,payload:W.payload,callback:W.callback,next:null});e:{var Ve=s,Ye=W;switch(ve=a,Fe=h,Ye.tag){case 1:if(Ve=Ye.payload,typeof Ve=="function"){Ie=Ve.call(Fe,Ie,ve);break e}Ie=Ve;break e;case 3:Ve.flags=Ve.flags&-65537|128;case 0:if(Ve=Ye.payload,ve=typeof Ve=="function"?Ve.call(Fe,Ie,ve):Ve,ve==null)break e;Ie=U({},Ie,ve);break e;case 2:Fs=!0}}W.callback!==null&&W.lane!==0&&(s.flags|=64,ve=I.effects,ve===null?I.effects=[W]:ve.push(W))}else Fe={eventTime:Fe,lane:ve,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Ee===null?(le=Ee=Fe,Z=Ie):Ee=Ee.next=Fe,P|=ve;if(W=W.next,W===null){if(W=I.shared.pending,W===null)break;ve=W,W=ve.next,ve.next=null,I.lastBaseUpdate=ve,I.shared.pending=null}}while(1);if(Ee===null&&(Z=Ie),I.baseState=Z,I.firstBaseUpdate=le,I.lastBaseUpdate=Ee,a=I.shared.interleaved,a!==null){I=a;do P|=I.lane,I=I.next;while(I!==a)}else M===null&&(I.shared.lanes=0);bo|=P,s.lanes=P,s.memoizedState=Ie}}function HC(s,a,h){if(s=a.effects,a.effects=null,s!==null)for(a=0;a<s.length;a++){var m=s[a],I=m.callback;if(I!==null){if(m.callback=null,m=h,typeof I!="function")throw Error(t(191,I));I.call(m)}}}var VC=new i.Component().refs;function Dg(s,a,h,m){a=s.memoizedState,h=h(m,a),h=h==null?a:U({},a,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}var ih={isMounted:function(s){return(s=s._reactInternals)?Kr(s)===s:!1},enqueueSetState:function(s,a,h){s=s._reactInternals;var m=ai(),I=Hs(s),M=is(m,I);M.payload=a,h!=null&&(M.callback=h),a=Qs(s,M,I),a!==null&&(cr(a,s,I,m),th(a,s,I))},enqueueReplaceState:function(s,a,h){s=s._reactInternals;var m=ai(),I=Hs(s),M=is(m,I);M.tag=1,M.payload=a,h!=null&&(M.callback=h),a=Qs(s,M,I),a!==null&&(cr(a,s,I,m),th(a,s,I))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var h=ai(),m=Hs(s),I=is(h,m);I.tag=2,a!=null&&(I.callback=a),a=Qs(s,I,m),a!==null&&(cr(a,s,m,h),th(a,s,m))}};function WC(s,a,h,m,I,M,P){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,M,P):a.prototype&&a.prototype.isPureReactComponent?!Cc(h,m)||!Cc(I,M):!0}function jC(s,a,h){var m=!1,I=Us,M=a.contextType;return typeof M=="object"&&M!==null?M=Gi(M):(I=pi(a)?So:jn.current,m=a.contextTypes,M=(m=m!=null)?Za(s,I):Us),a=new a(h,M),s.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ih,s.stateNode=a,a._reactInternals=s,m&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=I,s.__reactInternalMemoizedMaskedChildContext=M),a}function YC(s,a,h,m){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(h,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(h,m),a.state!==s&&ih.enqueueReplaceState(a,a.state,null)}function Ng(s,a,h,m){var I=s.stateNode;I.props=h,I.state=s.memoizedState,I.refs=VC,Lg(s);var M=a.contextType;typeof M=="object"&&M!==null?I.context=Gi(M):(M=pi(a)?So:jn.current,I.context=Za(s,M)),I.state=s.memoizedState,M=a.getDerivedStateFromProps,typeof M=="function"&&(Dg(s,a,M,h),I.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(a=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),a!==I.state&&ih.enqueueReplaceState(I,I.state,null),nh(s,h,I,m),I.state=s.memoizedState),typeof I.componentDidMount=="function"&&(s.flags|=4194308)}function Bc(s,a,h){if(s=h.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(t(309));var m=h.stateNode}if(!m)throw Error(t(147,s));var I=m,M=""+s;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===M?a.ref:(a=function(P){var W=I.refs;W===VC&&(W=I.refs={}),P===null?delete W[M]:W[M]=P},a._stringRef=M,a)}if(typeof s!="string")throw Error(t(284));if(!h._owner)throw Error(t(290,s))}return s}function rh(s,a){throw s=Object.prototype.toString.call(a),Error(t(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s))}function qC(s){var a=s._init;return a(s._payload)}function XC(s){function a(ie,ne){if(s){var ae=ie.deletions;ae===null?(ie.deletions=[ne],ie.flags|=16):ae.push(ne)}}function h(ie,ne){if(!s)return null;for(;ne!==null;)a(ie,ne),ne=ne.sibling;return null}function m(ie,ne){for(ie=new Map;ne!==null;)ne.key!==null?ie.set(ne.key,ne):ie.set(ne.index,ne),ne=ne.sibling;return ie}function I(ie,ne){return ie=Ws(ie,ne),ie.index=0,ie.sibling=null,ie}function M(ie,ne,ae){return ie.index=ae,s?(ae=ie.alternate,ae!==null?(ae=ae.index,ae<ne?(ie.flags|=2,ne):ae):(ie.flags|=2,ne)):(ie.flags|=1048576,ne)}function P(ie){return s&&ie.alternate===null&&(ie.flags|=2),ie}function W(ie,ne,ae,Be){return ne===null||ne.tag!==6?(ne=mm(ae,ie.mode,Be),ne.return=ie,ne):(ne=I(ne,ae),ne.return=ie,ne)}function Z(ie,ne,ae,Be){var Xe=ae.type;return Xe===B?Ee(ie,ne,ae.props.children,Be,ae.key):ne!==null&&(ne.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===X&&qC(Xe)===ne.type)?(Be=I(ne,ae.props),Be.ref=Bc(ie,ne,ae),Be.return=ie,Be):(Be=Ih(ae.type,ae.key,ae.props,null,ie.mode,Be),Be.ref=Bc(ie,ne,ae),Be.return=ie,Be)}function le(ie,ne,ae,Be){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==ae.containerInfo||ne.stateNode.implementation!==ae.implementation?(ne=vm(ae,ie.mode,Be),ne.return=ie,ne):(ne=I(ne,ae.children||[]),ne.return=ie,ne)}function Ee(ie,ne,ae,Be,Xe){return ne===null||ne.tag!==7?(ne=Po(ae,ie.mode,Be,Xe),ne.return=ie,ne):(ne=I(ne,ae),ne.return=ie,ne)}function Ie(ie,ne,ae){if(typeof ne=="string"&&ne!==""||typeof ne=="number")return ne=mm(""+ne,ie.mode,ae),ne.return=ie,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case w:return ae=Ih(ne.type,ne.key,ne.props,null,ie.mode,ae),ae.ref=Bc(ie,null,ne),ae.return=ie,ae;case b:return ne=vm(ne,ie.mode,ae),ne.return=ie,ne;case X:var Be=ne._init;return Ie(ie,Be(ne._payload),ae)}if($e(ne)||$(ne))return ne=Po(ne,ie.mode,ae,null),ne.return=ie,ne;rh(ie,ne)}return null}function ve(ie,ne,ae,Be){var Xe=ne!==null?ne.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number")return Xe!==null?null:W(ie,ne,""+ae,Be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:return ae.key===Xe?Z(ie,ne,ae,Be):null;case b:return ae.key===Xe?le(ie,ne,ae,Be):null;case X:return Xe=ae._init,ve(ie,ne,Xe(ae._payload),Be)}if($e(ae)||$(ae))return Xe!==null?null:Ee(ie,ne,ae,Be,null);rh(ie,ae)}return null}function Fe(ie,ne,ae,Be,Xe){if(typeof Be=="string"&&Be!==""||typeof Be=="number")return ie=ie.get(ae)||null,W(ne,ie,""+Be,Xe);if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case w:return ie=ie.get(Be.key===null?ae:Be.key)||null,Z(ne,ie,Be,Xe);case b:return ie=ie.get(Be.key===null?ae:Be.key)||null,le(ne,ie,Be,Xe);case X:var rt=Be._init;return Fe(ie,ne,ae,rt(Be._payload),Xe)}if($e(Be)||$(Be))return ie=ie.get(ae)||null,Ee(ne,ie,Be,Xe,null);rh(ne,Be)}return null}function Ve(ie,ne,ae,Be){for(var Xe=null,rt=null,st=ne,ut=ne=0,Un=null;st!==null&&ut<ae.length;ut++){st.index>ut?(Un=st,st=null):Un=st.sibling;var bt=ve(ie,st,ae[ut],Be);if(bt===null){st===null&&(st=Un);break}s&&st&&bt.alternate===null&&a(ie,st),ne=M(bt,ne,ut),rt===null?Xe=bt:rt.sibling=bt,rt=bt,st=Un}if(ut===ae.length)return h(ie,st),en&&Mo(ie,ut),Xe;if(st===null){for(;ut<ae.length;ut++)st=Ie(ie,ae[ut],Be),st!==null&&(ne=M(st,ne,ut),rt===null?Xe=st:rt.sibling=st,rt=st);return en&&Mo(ie,ut),Xe}for(st=m(ie,st);ut<ae.length;ut++)Un=Fe(st,ie,ut,ae[ut],Be),Un!==null&&(s&&Un.alternate!==null&&st.delete(Un.key===null?ut:Un.key),ne=M(Un,ne,ut),rt===null?Xe=Un:rt.sibling=Un,rt=Un);return s&&st.forEach(function(js){return a(ie,js)}),en&&Mo(ie,ut),Xe}function Ye(ie,ne,ae,Be){var Xe=$(ae);if(typeof Xe!="function")throw Error(t(150));if(ae=Xe.call(ae),ae==null)throw Error(t(151));for(var rt=Xe=null,st=ne,ut=ne=0,Un=null,bt=ae.next();st!==null&&!bt.done;ut++,bt=ae.next()){st.index>ut?(Un=st,st=null):Un=st.sibling;var js=ve(ie,st,bt.value,Be);if(js===null){st===null&&(st=Un);break}s&&st&&js.alternate===null&&a(ie,st),ne=M(js,ne,ut),rt===null?Xe=js:rt.sibling=js,rt=js,st=Un}if(bt.done)return h(ie,st),en&&Mo(ie,ut),Xe;if(st===null){for(;!bt.done;ut++,bt=ae.next())bt=Ie(ie,bt.value,Be),bt!==null&&(ne=M(bt,ne,ut),rt===null?Xe=bt:rt.sibling=bt,rt=bt);return en&&Mo(ie,ut),Xe}for(st=m(ie,st);!bt.done;ut++,bt=ae.next())bt=Fe(st,ie,ut,bt.value,Be),bt!==null&&(s&&bt.alternate!==null&&st.delete(bt.key===null?ut:bt.key),ne=M(bt,ne,ut),rt===null?Xe=bt:rt.sibling=bt,rt=bt);return s&&st.forEach(function(nN){return a(ie,nN)}),en&&Mo(ie,ut),Xe}function pn(ie,ne,ae,Be){if(typeof ae=="object"&&ae!==null&&ae.type===B&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:e:{for(var Xe=ae.key,rt=ne;rt!==null;){if(rt.key===Xe){if(Xe=ae.type,Xe===B){if(rt.tag===7){h(ie,rt.sibling),ne=I(rt,ae.props.children),ne.return=ie,ie=ne;break e}}else if(rt.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===X&&qC(Xe)===rt.type){h(ie,rt.sibling),ne=I(rt,ae.props),ne.ref=Bc(ie,rt,ae),ne.return=ie,ie=ne;break e}h(ie,rt);break}else a(ie,rt);rt=rt.sibling}ae.type===B?(ne=Po(ae.props.children,ie.mode,Be,ae.key),ne.return=ie,ie=ne):(Be=Ih(ae.type,ae.key,ae.props,null,ie.mode,Be),Be.ref=Bc(ie,ne,ae),Be.return=ie,ie=Be)}return P(ie);case b:e:{for(rt=ae.key;ne!==null;){if(ne.key===rt)if(ne.tag===4&&ne.stateNode.containerInfo===ae.containerInfo&&ne.stateNode.implementation===ae.implementation){h(ie,ne.sibling),ne=I(ne,ae.children||[]),ne.return=ie,ie=ne;break e}else{h(ie,ne);break}else a(ie,ne);ne=ne.sibling}ne=vm(ae,ie.mode,Be),ne.return=ie,ie=ne}return P(ie);case X:return rt=ae._init,pn(ie,ne,rt(ae._payload),Be)}if($e(ae))return Ve(ie,ne,ae,Be);if($(ae))return Ye(ie,ne,ae,Be);rh(ie,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?(ae=""+ae,ne!==null&&ne.tag===6?(h(ie,ne.sibling),ne=I(ne,ae),ne.return=ie,ie=ne):(h(ie,ne),ne=mm(ae,ie.mode,Be),ne.return=ie,ie=ne),P(ie)):h(ie,ne)}return pn}var rl=XC(!0),KC=XC(!1),Rc={},Sr=Ps(Rc),bc=Ps(Rc),Lc=Ps(Rc);function Bo(s){if(s===Rc)throw Error(t(174));return s}function Pg(s,a){switch(Yt(Lc,a),Yt(bc,s),Yt(Sr,Rc),s=a.nodeType,s){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:me(null,"");break;default:s=s===8?a.parentNode:a,a=s.namespaceURI||null,s=s.tagName,a=me(a,s)}Zt(Sr),Yt(Sr,a)}function sl(){Zt(Sr),Zt(bc),Zt(Lc)}function JC(s){Bo(Lc.current);var a=Bo(Sr.current),h=me(a,s.type);a!==h&&(Yt(bc,s),Yt(Sr,h))}function Ug(s){bc.current===s&&(Zt(Sr),Zt(bc))}var rn=Ps(0);function sh(s){for(var a=s;a!==null;){if(a.tag===13){var h=a.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if(a.flags&128)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var kg=[];function Fg(){for(var s=0;s<kg.length;s++)kg[s]._workInProgressVersionPrimary=null;kg.length=0}var oh=x.ReactCurrentDispatcher,Qg=x.ReactCurrentBatchConfig,Ro=0,sn=null,Sn=null,Nn=null,ah=!1,Dc=!1,Nc=0,x6=0;function Yn(){throw Error(t(321))}function Og(s,a){if(a===null)return!1;for(var h=0;h<a.length&&h<s.length;h++)if(!rr(s[h],a[h]))return!1;return!0}function zg(s,a,h,m,I,M){if(Ro=M,sn=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,oh.current=s===null||s.memoizedState===null?T6:B6,s=h(m,I),Dc){M=0;do{if(Dc=!1,Nc=0,25<=M)throw Error(t(301));M+=1,Nn=Sn=null,a.updateQueue=null,oh.current=R6,s=h(m,I)}while(Dc)}if(oh.current=uh,a=Sn!==null&&Sn.next!==null,Ro=0,Nn=Sn=sn=null,ah=!1,a)throw Error(t(300));return s}function Gg(){var s=Nc!==0;return Nc=0,s}function wr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nn===null?sn.memoizedState=Nn=s:Nn=Nn.next=s,Nn}function Hi(){if(Sn===null){var s=sn.alternate;s=s!==null?s.memoizedState:null}else s=Sn.next;var a=Nn===null?sn.memoizedState:Nn.next;if(a!==null)Nn=a,Sn=s;else{if(s===null)throw Error(t(310));Sn=s,s={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},Nn===null?sn.memoizedState=Nn=s:Nn=Nn.next=s}return Nn}function Pc(s,a){return typeof a=="function"?a(s):a}function Hg(s){var a=Hi(),h=a.queue;if(h===null)throw Error(t(311));h.lastRenderedReducer=s;var m=Sn,I=m.baseQueue,M=h.pending;if(M!==null){if(I!==null){var P=I.next;I.next=M.next,M.next=P}m.baseQueue=I=M,h.pending=null}if(I!==null){M=I.next,m=m.baseState;var W=P=null,Z=null,le=M;do{var Ee=le.lane;if((Ro&Ee)===Ee)Z!==null&&(Z=Z.next={lane:0,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),m=le.hasEagerState?le.eagerState:s(m,le.action);else{var Ie={lane:Ee,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null};Z===null?(W=Z=Ie,P=m):Z=Z.next=Ie,sn.lanes|=Ee,bo|=Ee}le=le.next}while(le!==null&&le!==M);Z===null?P=m:Z.next=W,rr(m,a.memoizedState)||(gi=!0),a.memoizedState=m,a.baseState=P,a.baseQueue=Z,h.lastRenderedState=m}if(s=h.interleaved,s!==null){I=s;do M=I.lane,sn.lanes|=M,bo|=M,I=I.next;while(I!==s)}else I===null&&(h.lanes=0);return[a.memoizedState,h.dispatch]}function Vg(s){var a=Hi(),h=a.queue;if(h===null)throw Error(t(311));h.lastRenderedReducer=s;var m=h.dispatch,I=h.pending,M=a.memoizedState;if(I!==null){h.pending=null;var P=I=I.next;do M=s(M,P.action),P=P.next;while(P!==I);rr(M,a.memoizedState)||(gi=!0),a.memoizedState=M,a.baseQueue===null&&(a.baseState=M),h.lastRenderedState=M}return[M,m]}function ZC(){}function $C(s,a){var h=sn,m=Hi(),I=a(),M=!rr(m.memoizedState,I);if(M&&(m.memoizedState=I,gi=!0),m=m.queue,Wg(nI.bind(null,h,m,s),[s]),m.getSnapshot!==a||M||Nn!==null&&Nn.memoizedState.tag&1){if(h.flags|=2048,Uc(9,tI.bind(null,h,m,I,a),void 0,null),Pn===null)throw Error(t(349));Ro&30||eI(h,a,I)}return I}function eI(s,a,h){s.flags|=16384,s={getSnapshot:a,value:h},a=sn.updateQueue,a===null?(a={lastEffect:null,stores:null},sn.updateQueue=a,a.stores=[s]):(h=a.stores,h===null?a.stores=[s]:h.push(s))}function tI(s,a,h,m){a.value=h,a.getSnapshot=m,iI(a)&&rI(s)}function nI(s,a,h){return h(function(){iI(a)&&rI(s)})}function iI(s){var a=s.getSnapshot;s=s.value;try{var h=a();return!rr(s,h)}catch{return!0}}function rI(s){var a=ns(s,1);a!==null&&cr(a,s,1,-1)}function sI(s){var a=wr();return typeof s=="function"&&(s=s()),a.memoizedState=a.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:s},a.queue=s,s=s.dispatch=M6.bind(null,sn,s),[a.memoizedState,s]}function Uc(s,a,h,m){return s={tag:s,create:a,destroy:h,deps:m,next:null},a=sn.updateQueue,a===null?(a={lastEffect:null,stores:null},sn.updateQueue=a,a.lastEffect=s.next=s):(h=a.lastEffect,h===null?a.lastEffect=s.next=s:(m=h.next,h.next=s,s.next=m,a.lastEffect=s)),s}function oI(){return Hi().memoizedState}function lh(s,a,h,m){var I=wr();sn.flags|=s,I.memoizedState=Uc(1|a,h,void 0,m===void 0?null:m)}function ch(s,a,h,m){var I=Hi();m=m===void 0?null:m;var M=void 0;if(Sn!==null){var P=Sn.memoizedState;if(M=P.destroy,m!==null&&Og(m,P.deps)){I.memoizedState=Uc(a,h,M,m);return}}sn.flags|=s,I.memoizedState=Uc(1|a,h,M,m)}function aI(s,a){return lh(8390656,8,s,a)}function Wg(s,a){return ch(2048,8,s,a)}function lI(s,a){return ch(4,2,s,a)}function cI(s,a){return ch(4,4,s,a)}function uI(s,a){if(typeof a=="function")return s=s(),a(s),function(){a(null)};if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function fI(s,a,h){return h=h!=null?h.concat([s]):null,ch(4,4,uI.bind(null,a,s),h)}function jg(){}function hI(s,a){var h=Hi();a=a===void 0?null:a;var m=h.memoizedState;return m!==null&&a!==null&&Og(a,m[1])?m[0]:(h.memoizedState=[s,a],s)}function dI(s,a){var h=Hi();a=a===void 0?null:a;var m=h.memoizedState;return m!==null&&a!==null&&Og(a,m[1])?m[0]:(s=s(),h.memoizedState=[s,a],s)}function AI(s,a,h){return Ro&21?(rr(h,a)||(h=Rf(),sn.lanes|=h,bo|=h,s.baseState=!0),a):(s.baseState&&(s.baseState=!1,gi=!0),s.memoizedState=h)}function S6(s,a){var h=kt;kt=h!==0&&4>h?h:4,s(!0);var m=Qg.transition;Qg.transition={};try{s(!1),a()}finally{kt=h,Qg.transition=m}}function pI(){return Hi().memoizedState}function w6(s,a,h){var m=Hs(s);if(h={lane:m,action:h,hasEagerState:!1,eagerState:null,next:null},gI(s))mI(a,h);else if(h=OC(s,a,h,m),h!==null){var I=ai();cr(h,s,m,I),vI(h,a,m)}}function M6(s,a,h){var m=Hs(s),I={lane:m,action:h,hasEagerState:!1,eagerState:null,next:null};if(gI(s))mI(a,I);else{var M=s.alternate;if(s.lanes===0&&(M===null||M.lanes===0)&&(M=a.lastRenderedReducer,M!==null))try{var P=a.lastRenderedState,W=M(P,h);if(I.hasEagerState=!0,I.eagerState=W,rr(W,P)){var Z=a.interleaved;Z===null?(I.next=I,bg(a)):(I.next=Z.next,Z.next=I),a.interleaved=I;return}}catch{}finally{}h=OC(s,a,I,m),h!==null&&(I=ai(),cr(h,s,m,I),vI(h,a,m))}}function gI(s){var a=s.alternate;return s===sn||a!==null&&a===sn}function mI(s,a){Dc=ah=!0;var h=s.pending;h===null?a.next=a:(a.next=h.next,h.next=a),s.pending=a}function vI(s,a,h){if(h&4194240){var m=a.lanes;m&=s.pendingLanes,h|=m,a.lanes=h,jp(s,h)}}var uh={readContext:Gi,useCallback:Yn,useContext:Yn,useEffect:Yn,useImperativeHandle:Yn,useInsertionEffect:Yn,useLayoutEffect:Yn,useMemo:Yn,useReducer:Yn,useRef:Yn,useState:Yn,useDebugValue:Yn,useDeferredValue:Yn,useTransition:Yn,useMutableSource:Yn,useSyncExternalStore:Yn,useId:Yn,unstable_isNewReconciler:!1},T6={readContext:Gi,useCallback:function(s,a){return wr().memoizedState=[s,a===void 0?null:a],s},useContext:Gi,useEffect:aI,useImperativeHandle:function(s,a,h){return h=h!=null?h.concat([s]):null,lh(4194308,4,uI.bind(null,a,s),h)},useLayoutEffect:function(s,a){return lh(4194308,4,s,a)},useInsertionEffect:function(s,a){return lh(4,2,s,a)},useMemo:function(s,a){var h=wr();return a=a===void 0?null:a,s=s(),h.memoizedState=[s,a],s},useReducer:function(s,a,h){var m=wr();return a=h!==void 0?h(a):a,m.memoizedState=m.baseState=a,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:a},m.queue=s,s=s.dispatch=w6.bind(null,sn,s),[m.memoizedState,s]},useRef:function(s){var a=wr();return s={current:s},a.memoizedState=s},useState:sI,useDebugValue:jg,useDeferredValue:function(s){return wr().memoizedState=s},useTransition:function(){var s=sI(!1),a=s[0];return s=S6.bind(null,s[1]),wr().memoizedState=s,[a,s]},useMutableSource:function(){},useSyncExternalStore:function(s,a,h){var m=sn,I=wr();if(en){if(h===void 0)throw Error(t(407));h=h()}else{if(h=a(),Pn===null)throw Error(t(349));Ro&30||eI(m,a,h)}I.memoizedState=h;var M={value:h,getSnapshot:a};return I.queue=M,aI(nI.bind(null,m,M,s),[s]),m.flags|=2048,Uc(9,tI.bind(null,m,M,h,a),void 0,null),h},useId:function(){var s=wr(),a=Pn.identifierPrefix;if(en){var h=ts,m=es;h=(m&~(1<<32-ri(m)-1)).toString(32)+h,a=":"+a+"R"+h,h=Nc++,0<h&&(a+="H"+h.toString(32)),a+=":"}else h=x6++,a=":"+a+"r"+h.toString(32)+":";return s.memoizedState=a},unstable_isNewReconciler:!1},B6={readContext:Gi,useCallback:hI,useContext:Gi,useEffect:Wg,useImperativeHandle:fI,useInsertionEffect:lI,useLayoutEffect:cI,useMemo:dI,useReducer:Hg,useRef:oI,useState:function(){return Hg(Pc)},useDebugValue:jg,useDeferredValue:function(s){var a=Hi();return AI(a,Sn.memoizedState,s)},useTransition:function(){var s=Hg(Pc)[0],a=Hi().memoizedState;return[s,a]},useMutableSource:ZC,useSyncExternalStore:$C,useId:pI,unstable_isNewReconciler:!1},R6={readContext:Gi,useCallback:hI,useContext:Gi,useEffect:Wg,useImperativeHandle:fI,useInsertionEffect:lI,useLayoutEffect:cI,useMemo:dI,useReducer:Vg,useRef:oI,useState:function(){return Vg(Pc)},useDebugValue:jg,useDeferredValue:function(s){var a=Hi();return Sn===null?a.memoizedState=s:AI(a,Sn.memoizedState,s)},useTransition:function(){var s=Vg(Pc)[0],a=Hi().memoizedState;return[s,a]},useMutableSource:ZC,useSyncExternalStore:$C,useId:pI,unstable_isNewReconciler:!1};function ol(s,a){try{var h="",m=a;do h+=Ae(m),m=m.return;while(m);var I=h}catch(M){I=`
4255
4255
  Error generating stack: `+M.message+`
4256
- `+M.stack}return{value:s,source:a,stack:I,digest:null}}function Yg(s,a,h){return{value:s,source:null,stack:h??null,digest:a??null}}function qg(s,a){try{console.error(a.value)}catch(h){setTimeout(function(){throw h})}}var b6=typeof WeakMap=="function"?WeakMap:Map;function _I(s,a,h){h=is(-1,h),h.tag=3,h.payload={element:null};var m=a.value;return h.callback=function(){mh||(mh=!0,cm=m),qg(s,a)},h}function EI(s,a,h){h=is(-1,h),h.tag=3;var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var I=a.value;h.payload=function(){return m(I)},h.callback=function(){qg(s,a)}}var M=s.stateNode;return M!==null&&typeof M.componentDidCatch=="function"&&(h.callback=function(){qg(s,a),typeof m!="function"&&(zs===null?zs=new Set([this]):zs.add(this));var P=a.stack;this.componentDidCatch(a.value,{componentStack:P!==null?P:""})}),h}function yI(s,a,h){var m=s.pingCache;if(m===null){m=s.pingCache=new b6;var I=new Set;m.set(a,I)}else I=m.get(a),I===void 0&&(I=new Set,m.set(a,I));I.has(h)||(I.add(h),s=W6.bind(null,s,a,h),a.then(s,s))}function CI(s){do{var a;if((a=s.tag===13)&&(a=s.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return s;s=s.return}while(s!==null);return null}function II(s,a,h,m,I){return s.mode&1?(s.flags|=65536,s.lanes=I,s):(s===a?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(a=is(-1,1),a.tag=2,Qs(h,a,1))),h.lanes|=1),s)}var L6=x.ReactCurrentOwner,gi=!1;function oi(s,a,h,m){a.child=s===null?KC(a,null,h,m):rl(a,s.child,h,m)}function xI(s,a,h,m,I){h=h.render;var M=a.ref;return il(a,I),m=zg(s,a,h,m,M,I),h=Gg(),s!==null&&!gi?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~I,rs(s,a,I)):(en&&h&&Cg(a),a.flags|=1,oi(s,a,m,I),a.child)}function SI(s,a,h,m,I){if(s===null){var M=h.type;return typeof M=="function"&&!gm(M)&&M.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(a.tag=15,a.type=M,wI(s,a,M,m,I)):(s=Ih(h.type,null,m,a,a.mode,I),s.ref=a.ref,s.return=a,a.child=s)}if(M=s.child,!(s.lanes&I)){var P=M.memoizedProps;if(h=h.compare,h=h!==null?h:Cc,h(P,m)&&s.ref===a.ref)return rs(s,a,I)}return a.flags|=1,s=Ws(M,m),s.ref=a.ref,s.return=a,a.child=s}function wI(s,a,h,m,I){if(s!==null){var M=s.memoizedProps;if(Cc(M,m)&&s.ref===a.ref)if(gi=!1,a.pendingProps=m=M,(s.lanes&I)!==0)s.flags&131072&&(gi=!0);else return a.lanes=s.lanes,rs(s,a,I)}return Xg(s,a,h,m,I)}function MI(s,a,h){var m=a.pendingProps,I=m.children,M=s!==null?s.memoizedState:null;if(m.mode==="hidden")if(!(a.mode&1))a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yt(ll,Li),Li|=h;else{if(!(h&1073741824))return s=M!==null?M.baseLanes|h:h,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:s,cachePool:null,transitions:null},a.updateQueue=null,Yt(ll,Li),Li|=s,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=M!==null?M.baseLanes:h,Yt(ll,Li),Li|=m}else M!==null?(m=M.baseLanes|h,a.memoizedState=null):m=h,Yt(ll,Li),Li|=m;return oi(s,a,I,h),a.child}function TI(s,a){var h=a.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(a.flags|=512,a.flags|=2097152)}function Xg(s,a,h,m,I){var M=pi(h)?So:jn.current;return M=Za(a,M),il(a,I),h=zg(s,a,h,m,M,I),m=Gg(),s!==null&&!gi?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~I,rs(s,a,I)):(en&&m&&Cg(a),a.flags|=1,oi(s,a,h,I),a.child)}function BI(s,a,h,m,I){if(pi(h)){var M=!0;qf(a)}else M=!1;if(il(a,I),a.stateNode===null)hh(s,a),jC(a,h,m),Ng(a,h,m,I),m=!0;else if(s===null){var P=a.stateNode,W=a.memoizedProps;P.props=W;var Z=P.context,le=h.contextType;typeof le=="object"&&le!==null?le=Gi(le):(le=pi(h)?So:jn.current,le=Za(a,le));var Ee=h.getDerivedStateFromProps,Ie=typeof Ee=="function"||typeof P.getSnapshotBeforeUpdate=="function";Ie||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(W!==m||Z!==le)&&YC(a,P,m,le),Fs=!1;var ve=a.memoizedState;P.state=ve,nh(a,m,P,I),Z=a.memoizedState,W!==m||ve!==Z||Ai.current||Fs?(typeof Ee=="function"&&(Dg(a,h,Ee,m),Z=a.memoizedState),(W=Fs||WC(a,h,W,m,ve,Z,le))?(Ie||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(a.flags|=4194308)):(typeof P.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=Z),P.props=m,P.state=Z,P.context=le,m=W):(typeof P.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{P=a.stateNode,zC(s,a),W=a.memoizedProps,le=a.type===a.elementType?W:or(a.type,W),P.props=le,Ie=a.pendingProps,ve=P.context,Z=h.contextType,typeof Z=="object"&&Z!==null?Z=Gi(Z):(Z=pi(h)?So:jn.current,Z=Za(a,Z));var Fe=h.getDerivedStateFromProps;(Ee=typeof Fe=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(W!==Ie||ve!==Z)&&YC(a,P,m,Z),Fs=!1,ve=a.memoizedState,P.state=ve,nh(a,m,P,I);var Ve=a.memoizedState;W!==Ie||ve!==Ve||Ai.current||Fs?(typeof Fe=="function"&&(Dg(a,h,Fe,m),Ve=a.memoizedState),(le=Fs||WC(a,h,le,m,ve,Ve,Z)||!1)?(Ee||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(m,Ve,Z),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(m,Ve,Z)),typeof P.componentDidUpdate=="function"&&(a.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof P.componentDidUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Ve),P.props=m,P.state=Ve,P.context=Z,m=le):(typeof P.componentDidUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=1024),m=!1)}return Kg(s,a,h,m,M,I)}function Kg(s,a,h,m,I,M){TI(s,a);var P=(a.flags&128)!==0;if(!m&&!P)return I&&DC(a,h,!1),rs(s,a,M);m=a.stateNode,L6.current=a;var W=P&&typeof h.getDerivedStateFromError!="function"?null:m.render();return a.flags|=1,s!==null&&P?(a.child=rl(a,s.child,null,M),a.child=rl(a,null,W,M)):oi(s,a,W,M),a.memoizedState=m.state,I&&DC(a,h,!0),a.child}function RI(s){var a=s.stateNode;a.pendingContext?bC(s,a.pendingContext,a.pendingContext!==a.context):a.context&&bC(s,a.context,!1),Pg(s,a.containerInfo)}function bI(s,a,h,m,I){return tl(),wg(I),a.flags|=256,oi(s,a,h,m),a.child}var Jg={dehydrated:null,treeContext:null,retryLane:0};function Zg(s){return{baseLanes:s,cachePool:null,transitions:null}}function LI(s,a,h){var m=a.pendingProps,I=rn.current,M=!1,P=(a.flags&128)!==0,W;if((W=P)||(W=s!==null&&s.memoizedState===null?!1:(I&2)!==0),W?(M=!0,a.flags&=-129):(s===null||s.memoizedState!==null)&&(I|=1),Yt(rn,I&1),s===null)return Sg(a),s=a.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(a.mode&1?s.data==="$!"?a.lanes=8:a.lanes=1073741824:a.lanes=1,null):(P=m.children,s=m.fallback,M?(m=a.mode,M=a.child,P={mode:"hidden",children:P},!(m&1)&&M!==null?(M.childLanes=0,M.pendingProps=P):M=xh(P,m,0,null),s=Po(s,m,h,null),M.return=a,s.return=a,M.sibling=s,a.child=M,a.child.memoizedState=Zg(h),a.memoizedState=Jg,s):$g(a,P));if(I=s.memoizedState,I!==null&&(W=I.dehydrated,W!==null))return D6(s,a,P,m,W,I,h);if(M){M=m.fallback,P=a.mode,I=s.child,W=I.sibling;var Z={mode:"hidden",children:m.children};return!(P&1)&&a.child!==I?(m=a.child,m.childLanes=0,m.pendingProps=Z,a.deletions=null):(m=Ws(I,Z),m.subtreeFlags=I.subtreeFlags&14680064),W!==null?M=Ws(W,M):(M=Po(M,P,h,null),M.flags|=2),M.return=a,m.return=a,m.sibling=M,a.child=m,m=M,M=a.child,P=s.child.memoizedState,P=P===null?Zg(h):{baseLanes:P.baseLanes|h,cachePool:null,transitions:P.transitions},M.memoizedState=P,M.childLanes=s.childLanes&~h,a.memoizedState=Jg,m}return M=s.child,s=M.sibling,m=Ws(M,{mode:"visible",children:m.children}),!(a.mode&1)&&(m.lanes=h),m.return=a,m.sibling=null,s!==null&&(h=a.deletions,h===null?(a.deletions=[s],a.flags|=16):h.push(s)),a.child=m,a.memoizedState=null,m}function $g(s,a){return a=xh({mode:"visible",children:a},s.mode,0,null),a.return=s,s.child=a}function fh(s,a,h,m){return m!==null&&wg(m),rl(a,s.child,null,h),s=$g(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function D6(s,a,h,m,I,M,P){if(h)return a.flags&256?(a.flags&=-257,m=Yg(Error(t(422))),fh(s,a,P,m)):a.memoizedState!==null?(a.child=s.child,a.flags|=128,null):(M=m.fallback,I=a.mode,m=xh({mode:"visible",children:m.children},I,0,null),M=Po(M,I,P,null),M.flags|=2,m.return=a,M.return=a,m.sibling=M,a.child=m,a.mode&1&&rl(a,s.child,null,P),a.child.memoizedState=Zg(P),a.memoizedState=Jg,M);if(!(a.mode&1))return fh(s,a,P,null);if(I.data==="$!"){if(m=I.nextSibling&&I.nextSibling.dataset,m)var W=m.dgst;return m=W,M=Error(t(419)),m=Yg(M,m,void 0),fh(s,a,P,m)}if(W=(P&s.childLanes)!==0,gi||W){if(m=Pn,m!==null){switch(P&-P){case 4:I=2;break;case 16:I=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:I=32;break;case 536870912:I=268435456;break;default:I=0}I=I&(m.suspendedLanes|P)?0:I,I!==0&&I!==M.retryLane&&(M.retryLane=I,ns(s,I),cr(m,s,I,-1))}return pm(),m=Yg(Error(t(421))),fh(s,a,P,m)}return I.data==="$?"?(a.flags|=128,a.child=s.child,a=j6.bind(null,s),I._reactRetry=a,null):(s=M.treeContext,bi=Ns(I.nextSibling),Ri=a,en=!0,sr=null,s!==null&&(Oi[zi++]=es,Oi[zi++]=ts,Oi[zi++]=wo,es=s.id,ts=s.overflow,wo=a),a=$g(a,m.children),a.flags|=4096,a)}function DI(s,a,h){s.lanes|=a;var m=s.alternate;m!==null&&(m.lanes|=a),Rg(s.return,a,h)}function em(s,a,h,m,I){var M=s.memoizedState;M===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:h,tailMode:I}:(M.isBackwards=a,M.rendering=null,M.renderingStartTime=0,M.last=m,M.tail=h,M.tailMode=I)}function NI(s,a,h){var m=a.pendingProps,I=m.revealOrder,M=m.tail;if(oi(s,a,m.children,h),m=rn.current,m&2)m=m&1|2,a.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&DI(s,h,a);else if(s.tag===19)DI(s,h,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}m&=1}if(Yt(rn,m),!(a.mode&1))a.memoizedState=null;else switch(I){case"forwards":for(h=a.child,I=null;h!==null;)s=h.alternate,s!==null&&sh(s)===null&&(I=h),h=h.sibling;h=I,h===null?(I=a.child,a.child=null):(I=h.sibling,h.sibling=null),em(a,!1,I,h,M);break;case"backwards":for(h=null,I=a.child,a.child=null;I!==null;){if(s=I.alternate,s!==null&&sh(s)===null){a.child=I;break}s=I.sibling,I.sibling=h,h=I,I=s}em(a,!0,h,null,M);break;case"together":em(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function hh(s,a){!(a.mode&1)&&s!==null&&(s.alternate=null,a.alternate=null,a.flags|=2)}function rs(s,a,h){if(s!==null&&(a.dependencies=s.dependencies),bo|=a.lanes,!(h&a.childLanes))return null;if(s!==null&&a.child!==s.child)throw Error(t(153));if(a.child!==null){for(s=a.child,h=Ws(s,s.pendingProps),a.child=h,h.return=a;s.sibling!==null;)s=s.sibling,h=h.sibling=Ws(s,s.pendingProps),h.return=a;h.sibling=null}return a.child}function N6(s,a,h){switch(a.tag){case 3:RI(a),tl();break;case 5:JC(a);break;case 1:pi(a.type)&&qf(a);break;case 4:Pg(a,a.stateNode.containerInfo);break;case 10:var m=a.type._context,I=a.memoizedProps.value;Yt($f,m._currentValue),m._currentValue=I;break;case 13:if(m=a.memoizedState,m!==null)return m.dehydrated!==null?(Yt(rn,rn.current&1),a.flags|=128,null):h&a.child.childLanes?LI(s,a,h):(Yt(rn,rn.current&1),s=rs(s,a,h),s!==null?s.sibling:null);Yt(rn,rn.current&1);break;case 19:if(m=(h&a.childLanes)!==0,s.flags&128){if(m)return NI(s,a,h);a.flags|=128}if(I=a.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Yt(rn,rn.current),m)break;return null;case 22:case 23:return a.lanes=0,MI(s,a,h)}return rs(s,a,h)}var PI,tm,UI,kI;PI=function(s,a){for(var h=a.child;h!==null;){if(h.tag===5||h.tag===6)s.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===a)break;for(;h.sibling===null;){if(h.return===null||h.return===a)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},tm=function(){},UI=function(s,a,h,m){var I=s.memoizedProps;if(I!==m){s=a.stateNode,Bo(Sr.current);var M=null;switch(h){case"input":I=Ne(s,I),m=Ne(s,m),M=[];break;case"select":I=U({},I,{value:void 0}),m=U({},m,{value:void 0}),M=[];break;case"textarea":I=mt(s,I),m=mt(s,m),M=[];break;default:typeof I.onClick!="function"&&typeof m.onClick=="function"&&(s.onclick=Wf)}je(h,m);var P;h=null;for(le in I)if(!m.hasOwnProperty(le)&&I.hasOwnProperty(le)&&I[le]!=null)if(le==="style"){var W=I[le];for(P in W)W.hasOwnProperty(P)&&(h||(h={}),h[P]="")}else le!=="dangerouslySetInnerHTML"&&le!=="children"&&le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&le!=="autoFocus"&&(r.hasOwnProperty(le)?M||(M=[]):(M=M||[]).push(le,null));for(le in m){var Z=m[le];if(W=I!=null?I[le]:void 0,m.hasOwnProperty(le)&&Z!==W&&(Z!=null||W!=null))if(le==="style")if(W){for(P in W)!W.hasOwnProperty(P)||Z&&Z.hasOwnProperty(P)||(h||(h={}),h[P]="");for(P in Z)Z.hasOwnProperty(P)&&W[P]!==Z[P]&&(h||(h={}),h[P]=Z[P])}else h||(M||(M=[]),M.push(le,h)),h=Z;else le==="dangerouslySetInnerHTML"?(Z=Z?Z.__html:void 0,W=W?W.__html:void 0,Z!=null&&W!==Z&&(M=M||[]).push(le,Z)):le==="children"?typeof Z!="string"&&typeof Z!="number"||(M=M||[]).push(le,""+Z):le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&(r.hasOwnProperty(le)?(Z!=null&&le==="onScroll"&&Jt("scroll",s),M||W===Z||(M=[])):(M=M||[]).push(le,Z))}h&&(M=M||[]).push("style",h);var le=M;(a.updateQueue=le)&&(a.flags|=4)}},kI=function(s,a,h,m){h!==m&&(a.flags|=4)};function kc(s,a){if(!en)switch(s.tailMode){case"hidden":a=s.tail;for(var h=null;a!==null;)a.alternate!==null&&(h=a),a=a.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var m=null;h!==null;)h.alternate!==null&&(m=h),h=h.sibling;m===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function qn(s){var a=s.alternate!==null&&s.alternate.child===s.child,h=0,m=0;if(a)for(var I=s.child;I!==null;)h|=I.lanes|I.childLanes,m|=I.subtreeFlags&14680064,m|=I.flags&14680064,I.return=s,I=I.sibling;else for(I=s.child;I!==null;)h|=I.lanes|I.childLanes,m|=I.subtreeFlags,m|=I.flags,I.return=s,I=I.sibling;return s.subtreeFlags|=m,s.childLanes=h,a}function P6(s,a,h){var m=a.pendingProps;switch(Ig(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(a),null;case 1:return pi(a.type)&&Yf(),qn(a),null;case 3:return m=a.stateNode,sl(),Zt(Ai),Zt(jn),Fg(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(s===null||s.child===null)&&(Zf(a)?a.flags|=4:s===null||s.memoizedState.isDehydrated&&!(a.flags&256)||(a.flags|=1024,sr!==null&&(hm(sr),sr=null))),tm(s,a),qn(a),null;case 5:Ug(a);var I=Bo(Lc.current);if(h=a.type,s!==null&&a.stateNode!=null)UI(s,a,h,m,I),s.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!m){if(a.stateNode===null)throw Error(t(166));return qn(a),null}if(s=Bo(Sr.current),Zf(a)){m=a.stateNode,h=a.type;var M=a.memoizedProps;switch(m[xr]=a,m[Mc]=M,s=(a.mode&1)!==0,h){case"dialog":Jt("cancel",m),Jt("close",m);break;case"iframe":case"object":case"embed":Jt("load",m);break;case"video":case"audio":for(I=0;I<xc.length;I++)Jt(xc[I],m);break;case"source":Jt("error",m);break;case"img":case"image":case"link":Jt("error",m),Jt("load",m);break;case"details":Jt("toggle",m);break;case"input":Ze(m,M),Jt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!M.multiple},Jt("invalid",m);break;case"textarea":H(m,M),Jt("invalid",m)}je(h,M),I=null;for(var P in M)if(M.hasOwnProperty(P)){var W=M[P];P==="children"?typeof W=="string"?m.textContent!==W&&(M.suppressHydrationWarning!==!0&&Vf(m.textContent,W,s),I=["children",W]):typeof W=="number"&&m.textContent!==""+W&&(M.suppressHydrationWarning!==!0&&Vf(m.textContent,W,s),I=["children",""+W]):r.hasOwnProperty(P)&&W!=null&&P==="onScroll"&&Jt("scroll",m)}switch(h){case"input":ot(m),Ue(m,M,!0);break;case"textarea":ot(m),se(m);break;case"select":case"option":break;default:typeof M.onClick=="function"&&(m.onclick=Wf)}m=I,a.updateQueue=m,m!==null&&(a.flags|=4)}else{P=I.nodeType===9?I:I.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Ce(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=P.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof m.is=="string"?s=P.createElement(h,{is:m.is}):(s=P.createElement(h),h==="select"&&(P=s,m.multiple?P.multiple=!0:m.size&&(P.size=m.size))):s=P.createElementNS(s,h),s[xr]=a,s[Mc]=m,PI(s,a,!1,!1),a.stateNode=s;e:{switch(P=Je(h,m),h){case"dialog":Jt("cancel",s),Jt("close",s),I=m;break;case"iframe":case"object":case"embed":Jt("load",s),I=m;break;case"video":case"audio":for(I=0;I<xc.length;I++)Jt(xc[I],s);I=m;break;case"source":Jt("error",s),I=m;break;case"img":case"image":case"link":Jt("error",s),Jt("load",s),I=m;break;case"details":Jt("toggle",s),I=m;break;case"input":Ze(s,m),I=Ne(s,m),Jt("invalid",s);break;case"option":I=m;break;case"select":s._wrapperState={wasMultiple:!!m.multiple},I=U({},m,{value:void 0}),Jt("invalid",s);break;case"textarea":H(s,m),I=mt(s,m),Jt("invalid",s);break;default:I=m}je(h,I),W=I;for(M in W)if(W.hasOwnProperty(M)){var Z=W[M];M==="style"?pe(s,Z):M==="dangerouslySetInnerHTML"?(Z=Z?Z.__html:void 0,Z!=null&&We(s,Z)):M==="children"?typeof Z=="string"?(h!=="textarea"||Z!=="")&&Se(s,Z):typeof Z=="number"&&Se(s,""+Z):M!=="suppressContentEditableWarning"&&M!=="suppressHydrationWarning"&&M!=="autoFocus"&&(r.hasOwnProperty(M)?Z!=null&&M==="onScroll"&&Jt("scroll",s):Z!=null&&y(s,M,Z,P))}switch(h){case"input":ot(s),Ue(s,m,!1);break;case"textarea":ot(s),se(s);break;case"option":m.value!=null&&s.setAttribute("value",""+de(m.value));break;case"select":s.multiple=!!m.multiple,M=m.value,M!=null?lt(s,!!m.multiple,M,!1):m.defaultValue!=null&&lt(s,!!m.multiple,m.defaultValue,!0);break;default:typeof I.onClick=="function"&&(s.onclick=Wf)}switch(h){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return qn(a),null;case 6:if(s&&a.stateNode!=null)kI(s,a,s.memoizedProps,m);else{if(typeof m!="string"&&a.stateNode===null)throw Error(t(166));if(h=Bo(Lc.current),Bo(Sr.current),Zf(a)){if(m=a.stateNode,h=a.memoizedProps,m[xr]=a,(M=m.nodeValue!==h)&&(s=Ri,s!==null))switch(s.tag){case 3:Vf(m.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Vf(m.nodeValue,h,(s.mode&1)!==0)}M&&(a.flags|=4)}else m=(h.nodeType===9?h:h.ownerDocument).createTextNode(m),m[xr]=a,a.stateNode=m}return qn(a),null;case 13:if(Zt(rn),m=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(en&&bi!==null&&a.mode&1&&!(a.flags&128))QC(),tl(),a.flags|=98560,M=!1;else if(M=Zf(a),m!==null&&m.dehydrated!==null){if(s===null){if(!M)throw Error(t(318));if(M=a.memoizedState,M=M!==null?M.dehydrated:null,!M)throw Error(t(317));M[xr]=a}else tl(),!(a.flags&128)&&(a.memoizedState=null),a.flags|=4;qn(a),M=!1}else sr!==null&&(hm(sr),sr=null),M=!0;if(!M)return a.flags&65536?a:null}return a.flags&128?(a.lanes=h,a):(m=m!==null,m!==(s!==null&&s.memoizedState!==null)&&m&&(a.child.flags|=8192,a.mode&1&&(s===null||rn.current&1?wn===0&&(wn=3):pm())),a.updateQueue!==null&&(a.flags|=4),qn(a),null);case 4:return sl(),tm(s,a),s===null&&Sc(a.stateNode.containerInfo),qn(a),null;case 10:return Bg(a.type._context),qn(a),null;case 17:return pi(a.type)&&Yf(),qn(a),null;case 19:if(Zt(rn),M=a.memoizedState,M===null)return qn(a),null;if(m=(a.flags&128)!==0,P=M.rendering,P===null)if(m)kc(M,!1);else{if(wn!==0||s!==null&&s.flags&128)for(s=a.child;s!==null;){if(P=sh(s),P!==null){for(a.flags|=128,kc(M,!1),m=P.updateQueue,m!==null&&(a.updateQueue=m,a.flags|=4),a.subtreeFlags=0,m=h,h=a.child;h!==null;)M=h,s=m,M.flags&=14680066,P=M.alternate,P===null?(M.childLanes=0,M.lanes=s,M.child=null,M.subtreeFlags=0,M.memoizedProps=null,M.memoizedState=null,M.updateQueue=null,M.dependencies=null,M.stateNode=null):(M.childLanes=P.childLanes,M.lanes=P.lanes,M.child=P.child,M.subtreeFlags=0,M.deletions=null,M.memoizedProps=P.memoizedProps,M.memoizedState=P.memoizedState,M.updateQueue=P.updateQueue,M.type=P.type,s=P.dependencies,M.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return Yt(rn,rn.current&1|2),a.child}s=s.sibling}M.tail!==null&&Qe()>cl&&(a.flags|=128,m=!0,kc(M,!1),a.lanes=4194304)}else{if(!m)if(s=sh(P),s!==null){if(a.flags|=128,m=!0,h=s.updateQueue,h!==null&&(a.updateQueue=h,a.flags|=4),kc(M,!0),M.tail===null&&M.tailMode==="hidden"&&!P.alternate&&!en)return qn(a),null}else 2*Qe()-M.renderingStartTime>cl&&h!==1073741824&&(a.flags|=128,m=!0,kc(M,!1),a.lanes=4194304);M.isBackwards?(P.sibling=a.child,a.child=P):(h=M.last,h!==null?h.sibling=P:a.child=P,M.last=P)}return M.tail!==null?(a=M.tail,M.rendering=a,M.tail=a.sibling,M.renderingStartTime=Qe(),a.sibling=null,h=rn.current,Yt(rn,m?h&1|2:h&1),a):(qn(a),null);case 22:case 23:return Am(),m=a.memoizedState!==null,s!==null&&s.memoizedState!==null!==m&&(a.flags|=8192),m&&a.mode&1?Li&1073741824&&(qn(a),a.subtreeFlags&6&&(a.flags|=8192)):qn(a),null;case 24:return null;case 25:return null}throw Error(t(156,a.tag))}function U6(s,a){switch(Ig(a),a.tag){case 1:return pi(a.type)&&Yf(),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return sl(),Zt(Ai),Zt(jn),Fg(),s=a.flags,s&65536&&!(s&128)?(a.flags=s&-65537|128,a):null;case 5:return Ug(a),null;case 13:if(Zt(rn),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(t(340));tl()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return Zt(rn),null;case 4:return sl(),null;case 10:return Bg(a.type._context),null;case 22:case 23:return Am(),null;case 24:return null;default:return null}}var dh=!1,Xn=!1,k6=typeof WeakSet=="function"?WeakSet:Set,ze=null;function al(s,a){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(m){cn(s,a,m)}else h.current=null}function nm(s,a,h){try{h()}catch(m){cn(s,a,m)}}var FI=!1;function F6(s,a){if(Ag=Df,s=pC(),og(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var m=h.getSelection&&h.getSelection();if(m&&m.rangeCount!==0){h=m.anchorNode;var I=m.anchorOffset,M=m.focusNode;m=m.focusOffset;try{h.nodeType,M.nodeType}catch{h=null;break e}var P=0,W=-1,Z=-1,le=0,Ee=0,Ie=s,ve=null;t:for(;;){for(var Fe;Ie!==h||I!==0&&Ie.nodeType!==3||(W=P+I),Ie!==M||m!==0&&Ie.nodeType!==3||(Z=P+m),Ie.nodeType===3&&(P+=Ie.nodeValue.length),(Fe=Ie.firstChild)!==null;)ve=Ie,Ie=Fe;for(;;){if(Ie===s)break t;if(ve===h&&++le===I&&(W=P),ve===M&&++Ee===m&&(Z=P),(Fe=Ie.nextSibling)!==null)break;Ie=ve,ve=Ie.parentNode}Ie=Fe}h=W===-1||Z===-1?null:{start:W,end:Z}}else h=null}h=h||{start:0,end:0}}else h=null;for(pg={focusedElem:s,selectionRange:h},Df=!1,ze=a;ze!==null;)if(a=ze,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,ze=s;else for(;ze!==null;){a=ze;try{var Ve=a.alternate;if(a.flags&1024)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ve!==null){var Ye=Ve.memoizedProps,pn=Ve.memoizedState,ie=a.stateNode,ne=ie.getSnapshotBeforeUpdate(a.elementType===a.type?Ye:or(a.type,Ye),pn);ie.__reactInternalSnapshotBeforeUpdate=ne}break;case 3:var ae=a.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Be){cn(a,a.return,Be)}if(s=a.sibling,s!==null){s.return=a.return,ze=s;break}ze=a.return}return Ve=FI,FI=!1,Ve}function Fc(s,a,h){var m=a.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var I=m=m.next;do{if((I.tag&s)===s){var M=I.destroy;I.destroy=void 0,M!==void 0&&nm(a,h,M)}I=I.next}while(I!==m)}}function Ah(s,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var h=a=a.next;do{if((h.tag&s)===s){var m=h.create;h.destroy=m()}h=h.next}while(h!==a)}}function im(s){var a=s.ref;if(a!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof a=="function"?a(s):a.current=s}}function QI(s){var a=s.alternate;a!==null&&(s.alternate=null,QI(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&(delete a[xr],delete a[Mc],delete a[_g],delete a[E6],delete a[y6])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function OI(s){return s.tag===5||s.tag===3||s.tag===4}function zI(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||OI(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function rm(s,a,h){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?h.nodeType===8?h.parentNode.insertBefore(s,a):h.insertBefore(s,a):(h.nodeType===8?(a=h.parentNode,a.insertBefore(s,h)):(a=h,a.appendChild(s)),h=h._reactRootContainer,h!=null||a.onclick!==null||(a.onclick=Wf));else if(m!==4&&(s=s.child,s!==null))for(rm(s,a,h),s=s.sibling;s!==null;)rm(s,a,h),s=s.sibling}function sm(s,a,h){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?h.insertBefore(s,a):h.appendChild(s);else if(m!==4&&(s=s.child,s!==null))for(sm(s,a,h),s=s.sibling;s!==null;)sm(s,a,h),s=s.sibling}var On=null,ar=!1;function Os(s,a,h){for(h=h.child;h!==null;)GI(s,a,h),h=h.sibling}function GI(s,a,h){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(di,h)}catch{}switch(h.tag){case 5:Xn||al(h,a);case 6:var m=On,I=ar;On=null,Os(s,a,h),On=m,ar=I,On!==null&&(ar?(s=On,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):On.removeChild(h.stateNode));break;case 18:On!==null&&(ar?(s=On,h=h.stateNode,s.nodeType===8?vg(s.parentNode,h):s.nodeType===1&&vg(s,h),gc(s)):vg(On,h.stateNode));break;case 4:m=On,I=ar,On=h.stateNode.containerInfo,ar=!0,Os(s,a,h),On=m,ar=I;break;case 0:case 11:case 14:case 15:if(!Xn&&(m=h.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){I=m=m.next;do{var M=I,P=M.destroy;M=M.tag,P!==void 0&&(M&2||M&4)&&nm(h,a,P),I=I.next}while(I!==m)}Os(s,a,h);break;case 1:if(!Xn&&(al(h,a),m=h.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=h.memoizedProps,m.state=h.memoizedState,m.componentWillUnmount()}catch(W){cn(h,a,W)}Os(s,a,h);break;case 21:Os(s,a,h);break;case 22:h.mode&1?(Xn=(m=Xn)||h.memoizedState!==null,Os(s,a,h),Xn=m):Os(s,a,h);break;default:Os(s,a,h)}}function HI(s){var a=s.updateQueue;if(a!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new k6),a.forEach(function(m){var I=Y6.bind(null,s,m);h.has(m)||(h.add(m),m.then(I,I))})}}function lr(s,a){var h=a.deletions;if(h!==null)for(var m=0;m<h.length;m++){var I=h[m];try{var M=s,P=a,W=P;e:for(;W!==null;){switch(W.tag){case 5:On=W.stateNode,ar=!1;break e;case 3:On=W.stateNode.containerInfo,ar=!0;break e;case 4:On=W.stateNode.containerInfo,ar=!0;break e}W=W.return}if(On===null)throw Error(t(160));GI(M,P,I),On=null,ar=!1;var Z=I.alternate;Z!==null&&(Z.return=null),I.return=null}catch(le){cn(I,a,le)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)VI(a,s),a=a.sibling}function VI(s,a){var h=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(lr(a,s),Mr(s),m&4){try{Fc(3,s,s.return),Ah(3,s)}catch(Ye){cn(s,s.return,Ye)}try{Fc(5,s,s.return)}catch(Ye){cn(s,s.return,Ye)}}break;case 1:lr(a,s),Mr(s),m&512&&h!==null&&al(h,h.return);break;case 5:if(lr(a,s),Mr(s),m&512&&h!==null&&al(h,h.return),s.flags&32){var I=s.stateNode;try{Se(I,"")}catch(Ye){cn(s,s.return,Ye)}}if(m&4&&(I=s.stateNode,I!=null)){var M=s.memoizedProps,P=h!==null?h.memoizedProps:M,W=s.type,Z=s.updateQueue;if(s.updateQueue=null,Z!==null)try{W==="input"&&M.type==="radio"&&M.name!=null&&_e(I,M),Je(W,P);var le=Je(W,M);for(P=0;P<Z.length;P+=2){var Ee=Z[P],Ie=Z[P+1];Ee==="style"?pe(I,Ie):Ee==="dangerouslySetInnerHTML"?We(I,Ie):Ee==="children"?Se(I,Ie):y(I,Ee,Ie,le)}switch(W){case"input":it(I,M);break;case"textarea":Q(I,M);break;case"select":var ve=I._wrapperState.wasMultiple;I._wrapperState.wasMultiple=!!M.multiple;var Fe=M.value;Fe!=null?lt(I,!!M.multiple,Fe,!1):ve!==!!M.multiple&&(M.defaultValue!=null?lt(I,!!M.multiple,M.defaultValue,!0):lt(I,!!M.multiple,M.multiple?[]:"",!1))}I[Mc]=M}catch(Ye){cn(s,s.return,Ye)}}break;case 6:if(lr(a,s),Mr(s),m&4){if(s.stateNode===null)throw Error(t(162));I=s.stateNode,M=s.memoizedProps;try{I.nodeValue=M}catch(Ye){cn(s,s.return,Ye)}}break;case 3:if(lr(a,s),Mr(s),m&4&&h!==null&&h.memoizedState.isDehydrated)try{gc(a.containerInfo)}catch(Ye){cn(s,s.return,Ye)}break;case 4:lr(a,s),Mr(s);break;case 13:lr(a,s),Mr(s),I=s.child,I.flags&8192&&(M=I.memoizedState!==null,I.stateNode.isHidden=M,!M||I.alternate!==null&&I.alternate.memoizedState!==null||(lm=Qe())),m&4&&HI(s);break;case 22:if(Ee=h!==null&&h.memoizedState!==null,s.mode&1?(Xn=(le=Xn)||Ee,lr(a,s),Xn=le):lr(a,s),Mr(s),m&8192){if(le=s.memoizedState!==null,(s.stateNode.isHidden=le)&&!Ee&&s.mode&1)for(ze=s,Ee=s.child;Ee!==null;){for(Ie=ze=Ee;ze!==null;){switch(ve=ze,Fe=ve.child,ve.tag){case 0:case 11:case 14:case 15:Fc(4,ve,ve.return);break;case 1:al(ve,ve.return);var Ve=ve.stateNode;if(typeof Ve.componentWillUnmount=="function"){m=ve,h=ve.return;try{a=m,Ve.props=a.memoizedProps,Ve.state=a.memoizedState,Ve.componentWillUnmount()}catch(Ye){cn(m,h,Ye)}}break;case 5:al(ve,ve.return);break;case 22:if(ve.memoizedState!==null){YI(Ie);continue}}Fe!==null?(Fe.return=ve,ze=Fe):YI(Ie)}Ee=Ee.sibling}e:for(Ee=null,Ie=s;;){if(Ie.tag===5){if(Ee===null){Ee=Ie;try{I=Ie.stateNode,le?(M=I.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none"):(W=Ie.stateNode,Z=Ie.memoizedProps.style,P=Z!=null&&Z.hasOwnProperty("display")?Z.display:null,W.style.display=Me("display",P))}catch(Ye){cn(s,s.return,Ye)}}}else if(Ie.tag===6){if(Ee===null)try{Ie.stateNode.nodeValue=le?"":Ie.memoizedProps}catch(Ye){cn(s,s.return,Ye)}}else if((Ie.tag!==22&&Ie.tag!==23||Ie.memoizedState===null||Ie===s)&&Ie.child!==null){Ie.child.return=Ie,Ie=Ie.child;continue}if(Ie===s)break e;for(;Ie.sibling===null;){if(Ie.return===null||Ie.return===s)break e;Ee===Ie&&(Ee=null),Ie=Ie.return}Ee===Ie&&(Ee=null),Ie.sibling.return=Ie.return,Ie=Ie.sibling}}break;case 19:lr(a,s),Mr(s),m&4&&HI(s);break;case 21:break;default:lr(a,s),Mr(s)}}function Mr(s){var a=s.flags;if(a&2){try{e:{for(var h=s.return;h!==null;){if(OI(h)){var m=h;break e}h=h.return}throw Error(t(160))}switch(m.tag){case 5:var I=m.stateNode;m.flags&32&&(Se(I,""),m.flags&=-33);var M=zI(s);sm(s,M,I);break;case 3:case 4:var P=m.stateNode.containerInfo,W=zI(s);rm(s,W,P);break;default:throw Error(t(161))}}catch(Z){cn(s,s.return,Z)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function Q6(s,a,h){ze=s,WI(s)}function WI(s,a,h){for(var m=(s.mode&1)!==0;ze!==null;){var I=ze,M=I.child;if(I.tag===22&&m){var P=I.memoizedState!==null||dh;if(!P){var W=I.alternate,Z=W!==null&&W.memoizedState!==null||Xn;W=dh;var le=Xn;if(dh=P,(Xn=Z)&&!le)for(ze=I;ze!==null;)P=ze,Z=P.child,P.tag===22&&P.memoizedState!==null?qI(I):Z!==null?(Z.return=P,ze=Z):qI(I);for(;M!==null;)ze=M,WI(M),M=M.sibling;ze=I,dh=W,Xn=le}jI(s)}else I.subtreeFlags&8772&&M!==null?(M.return=I,ze=M):jI(s)}}function jI(s){for(;ze!==null;){var a=ze;if(a.flags&8772){var h=a.alternate;try{if(a.flags&8772)switch(a.tag){case 0:case 11:case 15:Xn||Ah(5,a);break;case 1:var m=a.stateNode;if(a.flags&4&&!Xn)if(h===null)m.componentDidMount();else{var I=a.elementType===a.type?h.memoizedProps:or(a.type,h.memoizedProps);m.componentDidUpdate(I,h.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var M=a.updateQueue;M!==null&&HC(a,M,m);break;case 3:var P=a.updateQueue;if(P!==null){if(h=null,a.child!==null)switch(a.child.tag){case 5:h=a.child.stateNode;break;case 1:h=a.child.stateNode}HC(a,P,h)}break;case 5:var W=a.stateNode;if(h===null&&a.flags&4){h=W;var Z=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":Z.autoFocus&&h.focus();break;case"img":Z.src&&(h.src=Z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var le=a.alternate;if(le!==null){var Ee=le.memoizedState;if(Ee!==null){var Ie=Ee.dehydrated;Ie!==null&&gc(Ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Xn||a.flags&512&&im(a)}catch(ve){cn(a,a.return,ve)}}if(a===s){ze=null;break}if(h=a.sibling,h!==null){h.return=a.return,ze=h;break}ze=a.return}}function YI(s){for(;ze!==null;){var a=ze;if(a===s){ze=null;break}var h=a.sibling;if(h!==null){h.return=a.return,ze=h;break}ze=a.return}}function qI(s){for(;ze!==null;){var a=ze;try{switch(a.tag){case 0:case 11:case 15:var h=a.return;try{Ah(4,a)}catch(Z){cn(a,h,Z)}break;case 1:var m=a.stateNode;if(typeof m.componentDidMount=="function"){var I=a.return;try{m.componentDidMount()}catch(Z){cn(a,I,Z)}}var M=a.return;try{im(a)}catch(Z){cn(a,M,Z)}break;case 5:var P=a.return;try{im(a)}catch(Z){cn(a,P,Z)}}}catch(Z){cn(a,a.return,Z)}if(a===s){ze=null;break}var W=a.sibling;if(W!==null){W.return=a.return,ze=W;break}ze=a.return}}var O6=Math.ceil,ph=x.ReactCurrentDispatcher,om=x.ReactCurrentOwner,Vi=x.ReactCurrentBatchConfig,Rt=0,Pn=null,_n=null,zn=0,Li=0,ll=Ps(0),wn=0,Qc=null,bo=0,gh=0,am=0,Oc=null,mi=null,lm=0,cl=1/0,ss=null,mh=!1,cm=null,zs=null,vh=!1,Gs=null,_h=0,zc=0,um=null,Eh=-1,yh=0;function ai(){return Rt&6?Qe():Eh!==-1?Eh:Eh=Qe()}function Hs(s){return s.mode&1?Rt&2&&zn!==0?zn&-zn:I6.transition!==null?(yh===0&&(yh=Rf()),yh):(s=kt,s!==0||(s=window.event,s=s===void 0?16:Xy(s.type)),s):1}function cr(s,a,h,m){if(50<zc)throw zc=0,um=null,Error(t(185));fc(s,h,m),(!(Rt&2)||s!==Pn)&&(s===Pn&&(!(Rt&2)&&(gh|=h),wn===4&&Vs(s,zn)),vi(s,m),h===1&&Rt===0&&!(a.mode&1)&&(cl=Qe()+500,Xf&&ks()))}function vi(s,a){var h=s.callbackNode;si(s,a);var m=Qi(s,s===Pn?zn:0);if(m===0)h!==null&&ke(h),s.callbackNode=null,s.callbackPriority=0;else if(a=m&-m,s.callbackPriority!==a){if(h!=null&&ke(h),a===1)s.tag===0?C6(KI.bind(null,s)):NC(KI.bind(null,s)),v6(function(){!(Rt&6)&&ks()}),h=null;else{switch(zy(m)){case 1:h=ft;break;case 4:h=ht;break;case 16:h=jt;break;case 536870912:h=dn;break;default:h=jt}h=rx(h,XI.bind(null,s))}s.callbackPriority=a,s.callbackNode=h}}function XI(s,a){if(Eh=-1,yh=0,Rt&6)throw Error(t(327));var h=s.callbackNode;if(ul()&&s.callbackNode!==h)return null;var m=Qi(s,s===Pn?zn:0);if(m===0)return null;if(m&30||m&s.expiredLanes||a)a=Ch(s,m);else{a=m;var I=Rt;Rt|=2;var M=ZI();(Pn!==s||zn!==a)&&(ss=null,cl=Qe()+500,Do(s,a));do try{H6();break}catch(W){JI(s,W)}while(1);Tg(),ph.current=M,Rt=I,_n!==null?a=0:(Pn=null,zn=0,a=wn)}if(a!==0){if(a===2&&(I=Io(s),I!==0&&(m=I,a=fm(s,I))),a===1)throw h=Qc,Do(s,0),Vs(s,m),vi(s,Qe()),h;if(a===6)Vs(s,m);else{if(I=s.current.alternate,!(m&30)&&!z6(I)&&(a=Ch(s,m),a===2&&(M=Io(s),M!==0&&(m=M,a=fm(s,M))),a===1))throw h=Qc,Do(s,0),Vs(s,m),vi(s,Qe()),h;switch(s.finishedWork=I,s.finishedLanes=m,a){case 0:case 1:throw Error(t(345));case 2:No(s,mi,ss);break;case 3:if(Vs(s,m),(m&130023424)===m&&(a=lm+500-Qe(),10<a)){if(Qi(s,0)!==0)break;if(I=s.suspendedLanes,(I&m)!==m){ai(),s.pingedLanes|=s.suspendedLanes&I;break}s.timeoutHandle=mg(No.bind(null,s,mi,ss),a);break}No(s,mi,ss);break;case 4:if(Vs(s,m),(m&4194240)===m)break;for(a=s.eventTimes,I=-1;0<m;){var P=31-ri(m);M=1<<P,P=a[P],P>I&&(I=P),m&=~M}if(m=I,m=Qe()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*O6(m/1960))-m,10<m){s.timeoutHandle=mg(No.bind(null,s,mi,ss),m);break}No(s,mi,ss);break;case 5:No(s,mi,ss);break;default:throw Error(t(329))}}}return vi(s,Qe()),s.callbackNode===h?XI.bind(null,s):null}function fm(s,a){var h=Oc;return s.current.memoizedState.isDehydrated&&(Do(s,a).flags|=256),s=Ch(s,a),s!==2&&(a=mi,mi=h,a!==null&&hm(a)),s}function hm(s){mi===null?mi=s:mi.push.apply(mi,s)}function z6(s){for(var a=s;;){if(a.flags&16384){var h=a.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var m=0;m<h.length;m++){var I=h[m],M=I.getSnapshot;I=I.value;try{if(!rr(M(),I))return!1}catch{return!1}}}if(h=a.child,a.subtreeFlags&16384&&h!==null)h.return=a,a=h;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Vs(s,a){for(a&=~am,a&=~gh,s.suspendedLanes|=a,s.pingedLanes&=~a,s=s.expirationTimes;0<a;){var h=31-ri(a),m=1<<h;s[h]=-1,a&=~m}}function KI(s){if(Rt&6)throw Error(t(327));ul();var a=Qi(s,0);if(!(a&1))return vi(s,Qe()),null;var h=Ch(s,a);if(s.tag!==0&&h===2){var m=Io(s);m!==0&&(a=m,h=fm(s,m))}if(h===1)throw h=Qc,Do(s,0),Vs(s,a),vi(s,Qe()),h;if(h===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=a,No(s,mi,ss),vi(s,Qe()),null}function dm(s,a){var h=Rt;Rt|=1;try{return s(a)}finally{Rt=h,Rt===0&&(cl=Qe()+500,Xf&&ks())}}function Lo(s){Gs!==null&&Gs.tag===0&&!(Rt&6)&&ul();var a=Rt;Rt|=1;var h=Vi.transition,m=kt;try{if(Vi.transition=null,kt=1,s)return s()}finally{kt=m,Vi.transition=h,Rt=a,!(Rt&6)&&ks()}}function Am(){Li=ll.current,Zt(ll)}function Do(s,a){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,m6(h)),_n!==null)for(h=_n.return;h!==null;){var m=h;switch(Ig(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Yf();break;case 3:sl(),Zt(Ai),Zt(jn),Fg();break;case 5:Ug(m);break;case 4:sl();break;case 13:Zt(rn);break;case 19:Zt(rn);break;case 10:Bg(m.type._context);break;case 22:case 23:Am()}h=h.return}if(Pn=s,_n=s=Ws(s.current,null),zn=Li=a,wn=0,Qc=null,am=gh=bo=0,mi=Oc=null,To!==null){for(a=0;a<To.length;a++)if(h=To[a],m=h.interleaved,m!==null){h.interleaved=null;var I=m.next,M=h.pending;if(M!==null){var P=M.next;M.next=I,m.next=P}h.pending=m}To=null}return s}function JI(s,a){do{var h=_n;try{if(Tg(),oh.current=uh,ah){for(var m=sn.memoizedState;m!==null;){var I=m.queue;I!==null&&(I.pending=null),m=m.next}ah=!1}if(Ro=0,Nn=Sn=sn=null,Dc=!1,Nc=0,om.current=null,h===null||h.return===null){wn=1,Qc=a,_n=null;break}e:{var M=s,P=h.return,W=h,Z=a;if(a=zn,W.flags|=32768,Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var le=Z,Ee=W,Ie=Ee.tag;if(!(Ee.mode&1)&&(Ie===0||Ie===11||Ie===15)){var ve=Ee.alternate;ve?(Ee.updateQueue=ve.updateQueue,Ee.memoizedState=ve.memoizedState,Ee.lanes=ve.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Fe=CI(P);if(Fe!==null){Fe.flags&=-257,II(Fe,P,W,M,a),Fe.mode&1&&yI(M,le,a),a=Fe,Z=le;var Ve=a.updateQueue;if(Ve===null){var Ye=new Set;Ye.add(Z),a.updateQueue=Ye}else Ve.add(Z);break e}else{if(!(a&1)){yI(M,le,a),pm();break e}Z=Error(t(426))}}else if(en&&W.mode&1){var pn=CI(P);if(pn!==null){!(pn.flags&65536)&&(pn.flags|=256),II(pn,P,W,M,a),wg(ol(Z,W));break e}}M=Z=ol(Z,W),wn!==4&&(wn=2),Oc===null?Oc=[M]:Oc.push(M),M=P;do{switch(M.tag){case 3:M.flags|=65536,a&=-a,M.lanes|=a;var ie=_I(M,Z,a);GC(M,ie);break e;case 1:W=Z;var ne=M.type,ae=M.stateNode;if(!(M.flags&128)&&(typeof ne.getDerivedStateFromError=="function"||ae!==null&&typeof ae.componentDidCatch=="function"&&(zs===null||!zs.has(ae)))){M.flags|=65536,a&=-a,M.lanes|=a;var Be=EI(M,W,a);GC(M,Be);break e}}M=M.return}while(M!==null)}ex(h)}catch(Xe){a=Xe,_n===h&&h!==null&&(_n=h=h.return);continue}break}while(1)}function ZI(){var s=ph.current;return ph.current=uh,s===null?uh:s}function pm(){(wn===0||wn===3||wn===2)&&(wn=4),Pn===null||!(bo&268435455)&&!(gh&268435455)||Vs(Pn,zn)}function Ch(s,a){var h=Rt;Rt|=2;var m=ZI();(Pn!==s||zn!==a)&&(ss=null,Do(s,a));do try{G6();break}catch(I){JI(s,I)}while(1);if(Tg(),Rt=h,ph.current=m,_n!==null)throw Error(t(261));return Pn=null,zn=0,wn}function G6(){for(;_n!==null;)$I(_n)}function H6(){for(;_n!==null&&!et();)$I(_n)}function $I(s){var a=ix(s.alternate,s,Li);s.memoizedProps=s.pendingProps,a===null?ex(s):_n=a,om.current=null}function ex(s){var a=s;do{var h=a.alternate;if(s=a.return,a.flags&32768){if(h=U6(h,a),h!==null){h.flags&=32767,_n=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{wn=6,_n=null;return}}else if(h=P6(h,a,Li),h!==null){_n=h;return}if(a=a.sibling,a!==null){_n=a;return}_n=a=s}while(a!==null);wn===0&&(wn=5)}function No(s,a,h){var m=kt,I=Vi.transition;try{Vi.transition=null,kt=1,V6(s,a,h,m)}finally{Vi.transition=I,kt=m}return null}function V6(s,a,h,m){do ul();while(Gs!==null);if(Rt&6)throw Error(t(327));h=s.finishedWork;var I=s.finishedLanes;if(h===null)return null;if(s.finishedWork=null,s.finishedLanes=0,h===s.current)throw Error(t(177));s.callbackNode=null,s.callbackPriority=0;var M=h.lanes|h.childLanes;if(xD(s,M),s===Pn&&(_n=Pn=null,zn=0),!(h.subtreeFlags&2064)&&!(h.flags&2064)||vh||(vh=!0,rx(jt,function(){return ul(),null})),M=(h.flags&15990)!==0,h.subtreeFlags&15990||M){M=Vi.transition,Vi.transition=null;var P=kt;kt=1;var W=Rt;Rt|=4,om.current=null,F6(s,h),VI(h,s),u6(pg),Df=!!Ag,pg=Ag=null,s.current=h,Q6(h),at(),Rt=W,kt=P,Vi.transition=M}else s.current=h;if(vh&&(vh=!1,Gs=s,_h=I),M=s.pendingLanes,M===0&&(zs=null),Et(h.stateNode),vi(s,Qe()),a!==null)for(m=s.onRecoverableError,h=0;h<a.length;h++)I=a[h],m(I.value,{componentStack:I.stack,digest:I.digest});if(mh)throw mh=!1,s=cm,cm=null,s;return _h&1&&s.tag!==0&&ul(),M=s.pendingLanes,M&1?s===um?zc++:(zc=0,um=s):zc=0,ks(),null}function ul(){if(Gs!==null){var s=zy(_h),a=Vi.transition,h=kt;try{if(Vi.transition=null,kt=16>s?16:s,Gs===null)var m=!1;else{if(s=Gs,Gs=null,_h=0,Rt&6)throw Error(t(331));var I=Rt;for(Rt|=4,ze=s.current;ze!==null;){var M=ze,P=M.child;if(ze.flags&16){var W=M.deletions;if(W!==null){for(var Z=0;Z<W.length;Z++){var le=W[Z];for(ze=le;ze!==null;){var Ee=ze;switch(Ee.tag){case 0:case 11:case 15:Fc(8,Ee,M)}var Ie=Ee.child;if(Ie!==null)Ie.return=Ee,ze=Ie;else for(;ze!==null;){Ee=ze;var ve=Ee.sibling,Fe=Ee.return;if(QI(Ee),Ee===le){ze=null;break}if(ve!==null){ve.return=Fe,ze=ve;break}ze=Fe}}}var Ve=M.alternate;if(Ve!==null){var Ye=Ve.child;if(Ye!==null){Ve.child=null;do{var pn=Ye.sibling;Ye.sibling=null,Ye=pn}while(Ye!==null)}}ze=M}}if(M.subtreeFlags&2064&&P!==null)P.return=M,ze=P;else e:for(;ze!==null;){if(M=ze,M.flags&2048)switch(M.tag){case 0:case 11:case 15:Fc(9,M,M.return)}var ie=M.sibling;if(ie!==null){ie.return=M.return,ze=ie;break e}ze=M.return}}var ne=s.current;for(ze=ne;ze!==null;){P=ze;var ae=P.child;if(P.subtreeFlags&2064&&ae!==null)ae.return=P,ze=ae;else e:for(P=ne;ze!==null;){if(W=ze,W.flags&2048)try{switch(W.tag){case 0:case 11:case 15:Ah(9,W)}}catch(Xe){cn(W,W.return,Xe)}if(W===P){ze=null;break e}var Be=W.sibling;if(Be!==null){Be.return=W.return,ze=Be;break e}ze=W.return}}if(Rt=I,ks(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(di,s)}catch{}m=!0}return m}finally{kt=h,Vi.transition=a}}return!1}function tx(s,a,h){a=ol(h,a),a=_I(s,a,1),s=Qs(s,a,1),a=ai(),s!==null&&(fc(s,1,a),vi(s,a))}function cn(s,a,h){if(s.tag===3)tx(s,s,h);else for(;a!==null;){if(a.tag===3){tx(a,s,h);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(zs===null||!zs.has(m))){s=ol(h,s),s=EI(a,s,1),a=Qs(a,s,1),s=ai(),a!==null&&(fc(a,1,s),vi(a,s));break}}a=a.return}}function W6(s,a,h){var m=s.pingCache;m!==null&&m.delete(a),a=ai(),s.pingedLanes|=s.suspendedLanes&h,Pn===s&&(zn&h)===h&&(wn===4||wn===3&&(zn&130023424)===zn&&500>Qe()-lm?Do(s,0):am|=h),vi(s,a)}function nx(s,a){a===0&&(s.mode&1?(a=Ms,Ms<<=1,!(Ms&130023424)&&(Ms=4194304)):a=1);var h=ai();s=ns(s,a),s!==null&&(fc(s,a,h),vi(s,h))}function j6(s){var a=s.memoizedState,h=0;a!==null&&(h=a.retryLane),nx(s,h)}function Y6(s,a){var h=0;switch(s.tag){case 13:var m=s.stateNode,I=s.memoizedState;I!==null&&(h=I.retryLane);break;case 19:m=s.stateNode;break;default:throw Error(t(314))}m!==null&&m.delete(a),nx(s,h)}var ix;ix=function(s,a,h){if(s!==null)if(s.memoizedProps!==a.pendingProps||Ai.current)gi=!0;else{if(!(s.lanes&h)&&!(a.flags&128))return gi=!1,N6(s,a,h);gi=!!(s.flags&131072)}else gi=!1,en&&a.flags&1048576&&PC(a,Jf,a.index);switch(a.lanes=0,a.tag){case 2:var m=a.type;hh(s,a),s=a.pendingProps;var I=Za(a,jn.current);il(a,h),I=zg(null,a,m,s,I,h);var M=Gg();return a.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,pi(m)?(M=!0,qf(a)):M=!1,a.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Lg(a),I.updater=ih,a.stateNode=I,I._reactInternals=a,Ng(a,m,s,h),a=Kg(null,a,m,!0,M,h)):(a.tag=0,en&&M&&Cg(a),oi(null,a,I,h),a=a.child),a;case 16:m=a.elementType;e:{switch(hh(s,a),s=a.pendingProps,I=m._init,m=I(m._payload),a.type=m,I=a.tag=X6(m),s=or(m,s),I){case 0:a=Xg(null,a,m,s,h);break e;case 1:a=BI(null,a,m,s,h);break e;case 11:a=xI(null,a,m,s,h);break e;case 14:a=SI(null,a,m,or(m.type,s),h);break e}throw Error(t(306,m,""))}return a;case 0:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),Xg(s,a,m,I,h);case 1:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),BI(s,a,m,I,h);case 3:e:{if(RI(a),s===null)throw Error(t(387));m=a.pendingProps,M=a.memoizedState,I=M.element,zC(s,a),nh(a,m,null,h);var P=a.memoizedState;if(m=P.element,M.isDehydrated)if(M={element:m,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},a.updateQueue.baseState=M,a.memoizedState=M,a.flags&256){I=ol(Error(t(423)),a),a=bI(s,a,m,h,I);break e}else if(m!==I){I=ol(Error(t(424)),a),a=bI(s,a,m,h,I);break e}else for(bi=Ns(a.stateNode.containerInfo.firstChild),Ri=a,en=!0,sr=null,h=KC(a,null,m,h),a.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(tl(),m===I){a=rs(s,a,h);break e}oi(s,a,m,h)}a=a.child}return a;case 5:return JC(a),s===null&&Sg(a),m=a.type,I=a.pendingProps,M=s!==null?s.memoizedProps:null,P=I.children,gg(m,I)?P=null:M!==null&&gg(m,M)&&(a.flags|=32),TI(s,a),oi(s,a,P,h),a.child;case 6:return s===null&&Sg(a),null;case 13:return LI(s,a,h);case 4:return Pg(a,a.stateNode.containerInfo),m=a.pendingProps,s===null?a.child=rl(a,null,m,h):oi(s,a,m,h),a.child;case 11:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),xI(s,a,m,I,h);case 7:return oi(s,a,a.pendingProps,h),a.child;case 8:return oi(s,a,a.pendingProps.children,h),a.child;case 12:return oi(s,a,a.pendingProps.children,h),a.child;case 10:e:{if(m=a.type._context,I=a.pendingProps,M=a.memoizedProps,P=I.value,Yt($f,m._currentValue),m._currentValue=P,M!==null)if(rr(M.value,P)){if(M.children===I.children&&!Ai.current){a=rs(s,a,h);break e}}else for(M=a.child,M!==null&&(M.return=a);M!==null;){var W=M.dependencies;if(W!==null){P=M.child;for(var Z=W.firstContext;Z!==null;){if(Z.context===m){if(M.tag===1){Z=is(-1,h&-h),Z.tag=2;var le=M.updateQueue;if(le!==null){le=le.shared;var Ee=le.pending;Ee===null?Z.next=Z:(Z.next=Ee.next,Ee.next=Z),le.pending=Z}}M.lanes|=h,Z=M.alternate,Z!==null&&(Z.lanes|=h),Rg(M.return,h,a),W.lanes|=h;break}Z=Z.next}}else if(M.tag===10)P=M.type===a.type?null:M.child;else if(M.tag===18){if(P=M.return,P===null)throw Error(t(341));P.lanes|=h,W=P.alternate,W!==null&&(W.lanes|=h),Rg(P,h,a),P=M.sibling}else P=M.child;if(P!==null)P.return=M;else for(P=M;P!==null;){if(P===a){P=null;break}if(M=P.sibling,M!==null){M.return=P.return,P=M;break}P=P.return}M=P}oi(s,a,I.children,h),a=a.child}return a;case 9:return I=a.type,m=a.pendingProps.children,il(a,h),I=Gi(I),m=m(I),a.flags|=1,oi(s,a,m,h),a.child;case 14:return m=a.type,I=or(m,a.pendingProps),I=or(m.type,I),SI(s,a,m,I,h);case 15:return wI(s,a,a.type,a.pendingProps,h);case 17:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),hh(s,a),a.tag=1,pi(m)?(s=!0,qf(a)):s=!1,il(a,h),jC(a,m,I),Ng(a,m,I,h),Kg(null,a,m,!0,s,h);case 19:return NI(s,a,h);case 22:return MI(s,a,h)}throw Error(t(156,a.tag))};function rx(s,a){return fe(s,a)}function q6(s,a,h,m){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wi(s,a,h,m){return new q6(s,a,h,m)}function gm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function X6(s){if(typeof s=="function")return gm(s)?1:0;if(s!=null){if(s=s.$$typeof,s===k)return 11;if(s===V)return 14}return 2}function Ws(s,a){var h=s.alternate;return h===null?(h=Wi(s.tag,a,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=a,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&14680064,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,a=s.dependencies,h.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function Ih(s,a,h,m,I,M){var P=2;if(m=s,typeof s=="function")gm(s)&&(P=1);else if(typeof s=="string")P=5;else e:switch(s){case B:return Po(h.children,I,M,a);case L:P=8,I|=8;break;case R:return s=Wi(12,h,a,I|2),s.elementType=R,s.lanes=M,s;case O:return s=Wi(13,h,a,I),s.elementType=O,s.lanes=M,s;case F:return s=Wi(19,h,a,I),s.elementType=F,s.lanes=M,s;case te:return xh(h,I,M,a);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:P=10;break e;case N:P=9;break e;case k:P=11;break e;case V:P=14;break e;case X:P=16,m=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return a=Wi(P,h,a,I),a.elementType=s,a.type=m,a.lanes=M,a}function Po(s,a,h,m){return s=Wi(7,s,m,a),s.lanes=h,s}function xh(s,a,h,m){return s=Wi(22,s,m,a),s.elementType=te,s.lanes=h,s.stateNode={isHidden:!1},s}function mm(s,a,h){return s=Wi(6,s,null,a),s.lanes=h,s}function vm(s,a,h){return a=Wi(4,s.children!==null?s.children:[],s.key,a),a.lanes=h,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function K6(s,a,h,m,I){this.tag=a,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ga(0),this.expirationTimes=Ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ga(0),this.identifierPrefix=m,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function _m(s,a,h,m,I,M,P,W,Z){return s=new K6(s,a,h,W,Z),a===1?(a=1,M===!0&&(a|=8)):a=0,M=Wi(3,null,null,a),s.current=M,M.stateNode=s,M.memoizedState={element:m,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lg(M),s}function J6(s,a,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:m==null?null:""+m,children:s,containerInfo:a,implementation:h}}function sx(s){if(!s)return Us;s=s._reactInternals;e:{if(Kr(s)!==s||s.tag!==1)throw Error(t(170));var a=s;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(pi(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(t(171))}if(s.tag===1){var h=s.type;if(pi(h))return LC(s,h,a)}return a}function ox(s,a,h,m,I,M,P,W,Z){return s=_m(h,m,!0,s,I,M,P,W,Z),s.context=sx(null),h=s.current,m=ai(),I=Hs(h),M=is(m,I),M.callback=a??null,Qs(h,M,I),s.current.lanes=I,fc(s,I,m),vi(s,m),s}function Sh(s,a,h,m){var I=a.current,M=ai(),P=Hs(I);return h=sx(h),a.context===null?a.context=h:a.pendingContext=h,a=is(M,P),a.payload={element:s},m=m===void 0?null:m,m!==null&&(a.callback=m),s=Qs(I,a,P),s!==null&&(cr(s,I,P,M),th(s,I,P)),P}function wh(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function ax(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<a?h:a}}function Em(s,a){ax(s,a),(s=s.alternate)&&ax(s,a)}function Z6(){return null}var lx=typeof reportError=="function"?reportError:function(s){console.error(s)};function ym(s){this._internalRoot=s}Mh.prototype.render=ym.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(t(409));Sh(s,a,null,null)},Mh.prototype.unmount=ym.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;Lo(function(){Sh(null,s,null,null)}),a[Zr]=null}};function Mh(s){this._internalRoot=s}Mh.prototype.unstable_scheduleHydration=function(s){if(s){var a=Vy();s={blockedOn:null,target:s,priority:a};for(var h=0;h<bs.length&&a!==0&&a<bs[h].priority;h++);bs.splice(h,0,s),h===0&&Yy(s)}};function Cm(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Th(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function cx(){}function $6(s,a,h,m,I){if(I){if(typeof m=="function"){var M=m;m=function(){var le=wh(P);M.call(le)}}var P=ox(a,m,s,0,null,!1,!1,"",cx);return s._reactRootContainer=P,s[Zr]=P.current,Sc(s.nodeType===8?s.parentNode:s),Lo(),P}for(;I=s.lastChild;)s.removeChild(I);if(typeof m=="function"){var W=m;m=function(){var le=wh(Z);W.call(le)}}var Z=_m(s,0,!1,null,null,!1,!1,"",cx);return s._reactRootContainer=Z,s[Zr]=Z.current,Sc(s.nodeType===8?s.parentNode:s),Lo(function(){Sh(a,Z,h,m)}),Z}function Bh(s,a,h,m,I){var M=h._reactRootContainer;if(M){var P=M;if(typeof I=="function"){var W=I;I=function(){var Z=wh(P);W.call(Z)}}Sh(a,P,s,I)}else P=$6(h,a,s,I,m);return wh(P)}Gy=function(s){switch(s.tag){case 3:var a=s.stateNode;if(a.current.memoizedState.isDehydrated){var h=An(a.pendingLanes);h!==0&&(jp(a,h|1),vi(a,Qe()),!(Rt&6)&&(cl=Qe()+500,ks()))}break;case 13:Lo(function(){var m=ns(s,1);if(m!==null){var I=ai();cr(m,s,1,I)}}),Em(s,1)}},Yp=function(s){if(s.tag===13){var a=ns(s,134217728);if(a!==null){var h=ai();cr(a,s,134217728,h)}Em(s,134217728)}},Hy=function(s){if(s.tag===13){var a=Hs(s),h=ns(s,a);if(h!==null){var m=ai();cr(h,s,a,m)}Em(s,a)}},Vy=function(){return kt},Wy=function(s,a){var h=kt;try{return kt=s,a()}finally{kt=h}},dt=function(s,a,h){switch(a){case"input":if(it(s,h),a=h.name,h.type==="radio"&&a!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<h.length;a++){var m=h[a];if(m!==s&&m.form===s.form){var I=jf(m);if(!I)throw Error(t(90));oe(m),it(m,I)}}}break;case"textarea":Q(s,h);break;case"select":a=h.value,a!=null&&lt(s,!!h.multiple,a,!1)}},qe=dm,At=Lo;var eN={usingClientEntryPoint:!1,Events:[Tc,Ka,jf,he,we,dm]},Gc={findFiberByHostInstance:xo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},tN={bundleType:Gc.bundleType,version:Gc.version,rendererPackageName:Gc.rendererPackageName,rendererConfig:Gc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=ce(s),s===null?null:s.stateNode},findFiberByHostInstance:Gc.findFiberByHostInstance||Z6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rh.isDisabled&&Rh.supportsFiber)try{di=Rh.inject(tN),Bt=Rh}catch{}}return hi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eN,hi.createPortal=function(s,a){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cm(a))throw Error(t(200));return J6(s,a,null,h)},hi.createRoot=function(s,a){if(!Cm(s))throw Error(t(299));var h=!1,m="",I=lx;return a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onRecoverableError!==void 0&&(I=a.onRecoverableError)),a=_m(s,1,!1,null,null,h,!1,m,I),s[Zr]=a.current,Sc(s.nodeType===8?s.parentNode:s),new ym(a)},hi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=ce(a),s=s===null?null:s.stateNode,s},hi.flushSync=function(s){return Lo(s)},hi.hydrate=function(s,a,h){if(!Th(a))throw Error(t(200));return Bh(null,s,a,!0,h)},hi.hydrateRoot=function(s,a,h){if(!Cm(s))throw Error(t(405));var m=h!=null&&h.hydratedSources||null,I=!1,M="",P=lx;if(h!=null&&(h.unstable_strictMode===!0&&(I=!0),h.identifierPrefix!==void 0&&(M=h.identifierPrefix),h.onRecoverableError!==void 0&&(P=h.onRecoverableError)),a=ox(a,null,s,1,h??null,I,!1,M,P),s[Zr]=a.current,Sc(s),m)for(s=0;s<m.length;s++)h=m[s],I=h._getVersion,I=I(h._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[h,I]:a.mutableSourceEagerHydrationData.push(h,I);return new Mh(a)},hi.render=function(s,a,h){if(!Th(a))throw Error(t(200));return Bh(null,s,a,!1,h)},hi.unmountComponentAtNode=function(s){if(!Th(s))throw Error(t(40));return s._reactRootContainer?(Lo(function(){Bh(null,null,s,!1,function(){s._reactRootContainer=null,s[Zr]=null})}),!0):!1},hi.unstable_batchedUpdates=dm,hi.unstable_renderSubtreeIntoContainer=function(s,a,h,m){if(!Th(h))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return Bh(s,a,h,!1,m)},hi.version="18.2.0-next-9e3b772b8-20220608",hi}function wy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wy)}catch(i){console.error(i)}}wy(),Cy.exports=sD();var oD=Cy.exports,My=oD;Op.createRoot=My.createRoot,Op.hydrateRoot=My.hydrateRoot;class aD{constructor({apiService:e,events:t}){Lt(this,"targetElement");Lt(this,"apiService");Lt(this,"events");Lt(this,"htmlTarget");this.apiService=e,this.events=t}mount(e,t){if(!this.targetElement){const n=t.customId??"dita-3dconfig-element",r=document.getElementById(n);if(!r)throw new Error(`Element not found with id => '${n}' `);this.htmlTarget=r,this.htmlTarget.style.height="100%",this.htmlTarget.style.width="100%",this.targetElement=Op.createRoot(document.getElementById(n))}this.targetElement.render(Hc.createElement(nD,{apiService:this.apiService,events:this.events,sku:e,viewerOnly:t.viewerOnly}))}unmount(){this.targetElement&&(this.targetElement.unmount(),this.targetElement=void 0,this.htmlTarget&&(this.htmlTarget.style.height="0px",this.htmlTarget.style.width="auto"))}}var Hp={exports:{}},za=typeof Reflect=="object"?Reflect:null,Ty=za&&typeof za.apply=="function"?za.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},xf;za&&typeof za.ownKeys=="function"?xf=za.ownKeys:Object.getOwnPropertySymbols?xf=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:xf=function(e){return Object.getOwnPropertyNames(e)};function lD(i){console&&console.warn&&console.warn(i)}var By=Number.isNaN||function(e){return e!==e};function zt(){zt.init.call(this)}Hp.exports=zt,Hp.exports.once=hD,zt.EventEmitter=zt,zt.prototype._events=void 0,zt.prototype._eventsCount=0,zt.prototype._maxListeners=void 0;var Ry=10;function Sf(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(zt,"defaultMaxListeners",{enumerable:!0,get:function(){return Ry},set:function(i){if(typeof i!="number"||i<0||By(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Ry=i}}),zt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},zt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||By(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function by(i){return i._maxListeners===void 0?zt.defaultMaxListeners:i._maxListeners}zt.prototype.getMaxListeners=function(){return by(this)},zt.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r=e==="error",o=this._events;if(o!==void 0)r=r&&o.error===void 0;else if(!r)return!1;if(r){var l;if(t.length>0&&(l=t[0]),l instanceof Error)throw l;var c=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw c.context=l,c}var f=o[e];if(f===void 0)return!1;if(typeof f=="function")Ty(f,this,t);else for(var u=f.length,d=Uy(f,u),n=0;n<u;++n)Ty(d[n],this,t);return!0};function Ly(i,e,t,n){var r,o,l;if(Sf(t),o=i._events,o===void 0?(o=i._events=Object.create(null),i._eventsCount=0):(o.newListener!==void 0&&(i.emit("newListener",e,t.listener?t.listener:t),o=i._events),l=o[e]),l===void 0)l=o[e]=t,++i._eventsCount;else if(typeof l=="function"?l=o[e]=n?[t,l]:[l,t]:n?l.unshift(t):l.push(t),r=by(i),r>0&&l.length>r&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=i,c.type=e,c.count=l.length,lD(c)}return i}zt.prototype.addListener=function(e,t){return Ly(this,e,t,!1)},zt.prototype.on=zt.prototype.addListener,zt.prototype.prependListener=function(e,t){return Ly(this,e,t,!0)};function cD(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Dy(i,e,t){var n={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},r=cD.bind(n);return r.listener=t,n.wrapFn=r,r}zt.prototype.once=function(e,t){return Sf(t),this.on(e,Dy(this,e,t)),this},zt.prototype.prependOnceListener=function(e,t){return Sf(t),this.prependListener(e,Dy(this,e,t)),this},zt.prototype.removeListener=function(e,t){var n,r,o,l,c;if(Sf(t),r=this._events,r===void 0)return this;if(n=r[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(o=-1,l=n.length-1;l>=0;l--)if(n[l]===t||n[l].listener===t){c=n[l].listener,o=l;break}if(o<0)return this;o===0?n.shift():uD(n,o),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",e,c||t)}return this},zt.prototype.off=zt.prototype.removeListener,zt.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),l;for(r=0;r<o.length;++r)l=o[r],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function Ny(i,e,t){var n=i._events;if(n===void 0)return[];var r=n[e];return r===void 0?[]:typeof r=="function"?t?[r.listener||r]:[r]:t?fD(r):Uy(r,r.length)}zt.prototype.listeners=function(e){return Ny(this,e,!0)},zt.prototype.rawListeners=function(e){return Ny(this,e,!1)},zt.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):Py.call(i,e)},zt.prototype.listenerCount=Py;function Py(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}zt.prototype.eventNames=function(){return this._eventsCount>0?xf(this._events):[]};function Uy(i,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=i[n];return t}function uD(i,e){for(;e+1<i.length;e++)i[e]=i[e+1];i.pop()}function fD(i){for(var e=new Array(i.length),t=0;t<e.length;++t)e[t]=i[t].listener||i[t];return e}function hD(i,e){return new Promise(function(t,n){function r(l){i.removeListener(e,o),n(l)}function o(){typeof i.removeListener=="function"&&i.removeListener("error",r),t([].slice.call(arguments))}ky(i,e,o,{once:!0}),e!=="error"&&dD(i,r,{once:!0})})}function dD(i,e,t){typeof i.on=="function"&&ky(i,"error",e,t)}function ky(i,e,t,n){if(typeof i.on=="function")n.once?i.once(e,t):i.on(e,t);else if(typeof i.addEventListener=="function")i.addEventListener(e,function r(o){n.once&&i.removeEventListener(e,r),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var AD=Hp.exports;const cc=class cc extends AD.EventEmitter{emitEvent(e,t){Object.keys(cc.EVENTS).includes(e)&&this.emit(cc.EVENTS[e],t)}};Lt(cc,"EVENTS",{onAddToCart:"add-to-cart"});let Vp=cc;const pD={getCartUrl:((Qy=window.Shopify)==null?void 0:Qy.routes.root)+"cart.js",addToCartUrl:((Oy=window.Shopify)==null?void 0:Oy.routes.root)+"cart/add.js"},Fy=Object.freeze(pD);class gD{constructor(e){Lt(this,"config");this.config=e}RequestOptions(e,t){return{method:e,headers:{Accept:"application/json","Content-Type":"application/json"},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(){return(await fetch(this.config.getCartUrl,this.RequestOptions("GET"))).json()}async Post(e){return(await fetch(this.config.addToCartUrl,this.RequestOptions("POST",e||{}))).json()}}const{log:mD,error:vD}=console,_D=(...i)=>{vD("❌ Sprie Error:",...i)},ED="&ui_animations=0&ui_infos=0&ui_stop=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_ar=0&ui_help=0&ui_settings=0&ui_vr=0&ui_fullscreen=0&ui_annotations=0&ui_start=0&",yD={HOST:Br.host,STORE_PREFIX:Br.storePrefix},CD={addToCartUrl:Fy.addToCartUrl,getCartUrl:Fy.getCartUrl};class ID{constructor(){Lt(this,"sdkService");Lt(this,"apiService");Lt(this,"uiService");Lt(this,"events");this.events=new Vp,this.apiService=new hx(new Ys(yD),new gD(CD)),this.uiService=new aD({apiService:this.apiService,events:this.events});const e={apiService:this.apiService,config:Br,log:mD,logErr:_D,metaData:{appVersion:ux,previewUrlPrams:ED,targetClassName:"sprie-embed-element"}};this.sdkService=new dx(e),this.sdkService.Init()}load(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!1,customId:t})}loadViewerOnly(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!0,customId:t})}unload(){this.uiService.unmount()}}window.ditaConfigurator=new ID})();
4256
+ `+M.stack}return{value:s,source:a,stack:I,digest:null}}function Yg(s,a,h){return{value:s,source:null,stack:h??null,digest:a??null}}function qg(s,a){try{console.error(a.value)}catch(h){setTimeout(function(){throw h})}}var b6=typeof WeakMap=="function"?WeakMap:Map;function _I(s,a,h){h=is(-1,h),h.tag=3,h.payload={element:null};var m=a.value;return h.callback=function(){mh||(mh=!0,cm=m),qg(s,a)},h}function EI(s,a,h){h=is(-1,h),h.tag=3;var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var I=a.value;h.payload=function(){return m(I)},h.callback=function(){qg(s,a)}}var M=s.stateNode;return M!==null&&typeof M.componentDidCatch=="function"&&(h.callback=function(){qg(s,a),typeof m!="function"&&(zs===null?zs=new Set([this]):zs.add(this));var P=a.stack;this.componentDidCatch(a.value,{componentStack:P!==null?P:""})}),h}function yI(s,a,h){var m=s.pingCache;if(m===null){m=s.pingCache=new b6;var I=new Set;m.set(a,I)}else I=m.get(a),I===void 0&&(I=new Set,m.set(a,I));I.has(h)||(I.add(h),s=W6.bind(null,s,a,h),a.then(s,s))}function CI(s){do{var a;if((a=s.tag===13)&&(a=s.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return s;s=s.return}while(s!==null);return null}function II(s,a,h,m,I){return s.mode&1?(s.flags|=65536,s.lanes=I,s):(s===a?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(a=is(-1,1),a.tag=2,Qs(h,a,1))),h.lanes|=1),s)}var L6=x.ReactCurrentOwner,gi=!1;function oi(s,a,h,m){a.child=s===null?KC(a,null,h,m):rl(a,s.child,h,m)}function xI(s,a,h,m,I){h=h.render;var M=a.ref;return il(a,I),m=zg(s,a,h,m,M,I),h=Gg(),s!==null&&!gi?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~I,rs(s,a,I)):(en&&h&&Cg(a),a.flags|=1,oi(s,a,m,I),a.child)}function SI(s,a,h,m,I){if(s===null){var M=h.type;return typeof M=="function"&&!gm(M)&&M.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(a.tag=15,a.type=M,wI(s,a,M,m,I)):(s=Ih(h.type,null,m,a,a.mode,I),s.ref=a.ref,s.return=a,a.child=s)}if(M=s.child,!(s.lanes&I)){var P=M.memoizedProps;if(h=h.compare,h=h!==null?h:Cc,h(P,m)&&s.ref===a.ref)return rs(s,a,I)}return a.flags|=1,s=Ws(M,m),s.ref=a.ref,s.return=a,a.child=s}function wI(s,a,h,m,I){if(s!==null){var M=s.memoizedProps;if(Cc(M,m)&&s.ref===a.ref)if(gi=!1,a.pendingProps=m=M,(s.lanes&I)!==0)s.flags&131072&&(gi=!0);else return a.lanes=s.lanes,rs(s,a,I)}return Xg(s,a,h,m,I)}function MI(s,a,h){var m=a.pendingProps,I=m.children,M=s!==null?s.memoizedState:null;if(m.mode==="hidden")if(!(a.mode&1))a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yt(ll,Li),Li|=h;else{if(!(h&1073741824))return s=M!==null?M.baseLanes|h:h,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:s,cachePool:null,transitions:null},a.updateQueue=null,Yt(ll,Li),Li|=s,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=M!==null?M.baseLanes:h,Yt(ll,Li),Li|=m}else M!==null?(m=M.baseLanes|h,a.memoizedState=null):m=h,Yt(ll,Li),Li|=m;return oi(s,a,I,h),a.child}function TI(s,a){var h=a.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(a.flags|=512,a.flags|=2097152)}function Xg(s,a,h,m,I){var M=pi(h)?So:jn.current;return M=Za(a,M),il(a,I),h=zg(s,a,h,m,M,I),m=Gg(),s!==null&&!gi?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~I,rs(s,a,I)):(en&&m&&Cg(a),a.flags|=1,oi(s,a,h,I),a.child)}function BI(s,a,h,m,I){if(pi(h)){var M=!0;qf(a)}else M=!1;if(il(a,I),a.stateNode===null)hh(s,a),jC(a,h,m),Ng(a,h,m,I),m=!0;else if(s===null){var P=a.stateNode,W=a.memoizedProps;P.props=W;var Z=P.context,le=h.contextType;typeof le=="object"&&le!==null?le=Gi(le):(le=pi(h)?So:jn.current,le=Za(a,le));var Ee=h.getDerivedStateFromProps,Ie=typeof Ee=="function"||typeof P.getSnapshotBeforeUpdate=="function";Ie||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(W!==m||Z!==le)&&YC(a,P,m,le),Fs=!1;var ve=a.memoizedState;P.state=ve,nh(a,m,P,I),Z=a.memoizedState,W!==m||ve!==Z||Ai.current||Fs?(typeof Ee=="function"&&(Dg(a,h,Ee,m),Z=a.memoizedState),(W=Fs||WC(a,h,W,m,ve,Z,le))?(Ie||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(a.flags|=4194308)):(typeof P.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=Z),P.props=m,P.state=Z,P.context=le,m=W):(typeof P.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{P=a.stateNode,zC(s,a),W=a.memoizedProps,le=a.type===a.elementType?W:or(a.type,W),P.props=le,Ie=a.pendingProps,ve=P.context,Z=h.contextType,typeof Z=="object"&&Z!==null?Z=Gi(Z):(Z=pi(h)?So:jn.current,Z=Za(a,Z));var Fe=h.getDerivedStateFromProps;(Ee=typeof Fe=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(W!==Ie||ve!==Z)&&YC(a,P,m,Z),Fs=!1,ve=a.memoizedState,P.state=ve,nh(a,m,P,I);var Ve=a.memoizedState;W!==Ie||ve!==Ve||Ai.current||Fs?(typeof Fe=="function"&&(Dg(a,h,Fe,m),Ve=a.memoizedState),(le=Fs||WC(a,h,le,m,ve,Ve,Z)||!1)?(Ee||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(m,Ve,Z),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(m,Ve,Z)),typeof P.componentDidUpdate=="function"&&(a.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof P.componentDidUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Ve),P.props=m,P.state=Ve,P.context=Z,m=le):(typeof P.componentDidUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&ve===s.memoizedState||(a.flags|=1024),m=!1)}return Kg(s,a,h,m,M,I)}function Kg(s,a,h,m,I,M){TI(s,a);var P=(a.flags&128)!==0;if(!m&&!P)return I&&DC(a,h,!1),rs(s,a,M);m=a.stateNode,L6.current=a;var W=P&&typeof h.getDerivedStateFromError!="function"?null:m.render();return a.flags|=1,s!==null&&P?(a.child=rl(a,s.child,null,M),a.child=rl(a,null,W,M)):oi(s,a,W,M),a.memoizedState=m.state,I&&DC(a,h,!0),a.child}function RI(s){var a=s.stateNode;a.pendingContext?bC(s,a.pendingContext,a.pendingContext!==a.context):a.context&&bC(s,a.context,!1),Pg(s,a.containerInfo)}function bI(s,a,h,m,I){return tl(),wg(I),a.flags|=256,oi(s,a,h,m),a.child}var Jg={dehydrated:null,treeContext:null,retryLane:0};function Zg(s){return{baseLanes:s,cachePool:null,transitions:null}}function LI(s,a,h){var m=a.pendingProps,I=rn.current,M=!1,P=(a.flags&128)!==0,W;if((W=P)||(W=s!==null&&s.memoizedState===null?!1:(I&2)!==0),W?(M=!0,a.flags&=-129):(s===null||s.memoizedState!==null)&&(I|=1),Yt(rn,I&1),s===null)return Sg(a),s=a.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(a.mode&1?s.data==="$!"?a.lanes=8:a.lanes=1073741824:a.lanes=1,null):(P=m.children,s=m.fallback,M?(m=a.mode,M=a.child,P={mode:"hidden",children:P},!(m&1)&&M!==null?(M.childLanes=0,M.pendingProps=P):M=xh(P,m,0,null),s=Po(s,m,h,null),M.return=a,s.return=a,M.sibling=s,a.child=M,a.child.memoizedState=Zg(h),a.memoizedState=Jg,s):$g(a,P));if(I=s.memoizedState,I!==null&&(W=I.dehydrated,W!==null))return D6(s,a,P,m,W,I,h);if(M){M=m.fallback,P=a.mode,I=s.child,W=I.sibling;var Z={mode:"hidden",children:m.children};return!(P&1)&&a.child!==I?(m=a.child,m.childLanes=0,m.pendingProps=Z,a.deletions=null):(m=Ws(I,Z),m.subtreeFlags=I.subtreeFlags&14680064),W!==null?M=Ws(W,M):(M=Po(M,P,h,null),M.flags|=2),M.return=a,m.return=a,m.sibling=M,a.child=m,m=M,M=a.child,P=s.child.memoizedState,P=P===null?Zg(h):{baseLanes:P.baseLanes|h,cachePool:null,transitions:P.transitions},M.memoizedState=P,M.childLanes=s.childLanes&~h,a.memoizedState=Jg,m}return M=s.child,s=M.sibling,m=Ws(M,{mode:"visible",children:m.children}),!(a.mode&1)&&(m.lanes=h),m.return=a,m.sibling=null,s!==null&&(h=a.deletions,h===null?(a.deletions=[s],a.flags|=16):h.push(s)),a.child=m,a.memoizedState=null,m}function $g(s,a){return a=xh({mode:"visible",children:a},s.mode,0,null),a.return=s,s.child=a}function fh(s,a,h,m){return m!==null&&wg(m),rl(a,s.child,null,h),s=$g(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function D6(s,a,h,m,I,M,P){if(h)return a.flags&256?(a.flags&=-257,m=Yg(Error(t(422))),fh(s,a,P,m)):a.memoizedState!==null?(a.child=s.child,a.flags|=128,null):(M=m.fallback,I=a.mode,m=xh({mode:"visible",children:m.children},I,0,null),M=Po(M,I,P,null),M.flags|=2,m.return=a,M.return=a,m.sibling=M,a.child=m,a.mode&1&&rl(a,s.child,null,P),a.child.memoizedState=Zg(P),a.memoizedState=Jg,M);if(!(a.mode&1))return fh(s,a,P,null);if(I.data==="$!"){if(m=I.nextSibling&&I.nextSibling.dataset,m)var W=m.dgst;return m=W,M=Error(t(419)),m=Yg(M,m,void 0),fh(s,a,P,m)}if(W=(P&s.childLanes)!==0,gi||W){if(m=Pn,m!==null){switch(P&-P){case 4:I=2;break;case 16:I=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:I=32;break;case 536870912:I=268435456;break;default:I=0}I=I&(m.suspendedLanes|P)?0:I,I!==0&&I!==M.retryLane&&(M.retryLane=I,ns(s,I),cr(m,s,I,-1))}return pm(),m=Yg(Error(t(421))),fh(s,a,P,m)}return I.data==="$?"?(a.flags|=128,a.child=s.child,a=j6.bind(null,s),I._reactRetry=a,null):(s=M.treeContext,bi=Ns(I.nextSibling),Ri=a,en=!0,sr=null,s!==null&&(Oi[zi++]=es,Oi[zi++]=ts,Oi[zi++]=wo,es=s.id,ts=s.overflow,wo=a),a=$g(a,m.children),a.flags|=4096,a)}function DI(s,a,h){s.lanes|=a;var m=s.alternate;m!==null&&(m.lanes|=a),Rg(s.return,a,h)}function em(s,a,h,m,I){var M=s.memoizedState;M===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:h,tailMode:I}:(M.isBackwards=a,M.rendering=null,M.renderingStartTime=0,M.last=m,M.tail=h,M.tailMode=I)}function NI(s,a,h){var m=a.pendingProps,I=m.revealOrder,M=m.tail;if(oi(s,a,m.children,h),m=rn.current,m&2)m=m&1|2,a.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&DI(s,h,a);else if(s.tag===19)DI(s,h,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}m&=1}if(Yt(rn,m),!(a.mode&1))a.memoizedState=null;else switch(I){case"forwards":for(h=a.child,I=null;h!==null;)s=h.alternate,s!==null&&sh(s)===null&&(I=h),h=h.sibling;h=I,h===null?(I=a.child,a.child=null):(I=h.sibling,h.sibling=null),em(a,!1,I,h,M);break;case"backwards":for(h=null,I=a.child,a.child=null;I!==null;){if(s=I.alternate,s!==null&&sh(s)===null){a.child=I;break}s=I.sibling,I.sibling=h,h=I,I=s}em(a,!0,h,null,M);break;case"together":em(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function hh(s,a){!(a.mode&1)&&s!==null&&(s.alternate=null,a.alternate=null,a.flags|=2)}function rs(s,a,h){if(s!==null&&(a.dependencies=s.dependencies),bo|=a.lanes,!(h&a.childLanes))return null;if(s!==null&&a.child!==s.child)throw Error(t(153));if(a.child!==null){for(s=a.child,h=Ws(s,s.pendingProps),a.child=h,h.return=a;s.sibling!==null;)s=s.sibling,h=h.sibling=Ws(s,s.pendingProps),h.return=a;h.sibling=null}return a.child}function N6(s,a,h){switch(a.tag){case 3:RI(a),tl();break;case 5:JC(a);break;case 1:pi(a.type)&&qf(a);break;case 4:Pg(a,a.stateNode.containerInfo);break;case 10:var m=a.type._context,I=a.memoizedProps.value;Yt($f,m._currentValue),m._currentValue=I;break;case 13:if(m=a.memoizedState,m!==null)return m.dehydrated!==null?(Yt(rn,rn.current&1),a.flags|=128,null):h&a.child.childLanes?LI(s,a,h):(Yt(rn,rn.current&1),s=rs(s,a,h),s!==null?s.sibling:null);Yt(rn,rn.current&1);break;case 19:if(m=(h&a.childLanes)!==0,s.flags&128){if(m)return NI(s,a,h);a.flags|=128}if(I=a.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Yt(rn,rn.current),m)break;return null;case 22:case 23:return a.lanes=0,MI(s,a,h)}return rs(s,a,h)}var PI,tm,UI,kI;PI=function(s,a){for(var h=a.child;h!==null;){if(h.tag===5||h.tag===6)s.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===a)break;for(;h.sibling===null;){if(h.return===null||h.return===a)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},tm=function(){},UI=function(s,a,h,m){var I=s.memoizedProps;if(I!==m){s=a.stateNode,Bo(Sr.current);var M=null;switch(h){case"input":I=Ne(s,I),m=Ne(s,m),M=[];break;case"select":I=U({},I,{value:void 0}),m=U({},m,{value:void 0}),M=[];break;case"textarea":I=At(s,I),m=At(s,m),M=[];break;default:typeof I.onClick!="function"&&typeof m.onClick=="function"&&(s.onclick=Wf)}je(h,m);var P;h=null;for(le in I)if(!m.hasOwnProperty(le)&&I.hasOwnProperty(le)&&I[le]!=null)if(le==="style"){var W=I[le];for(P in W)W.hasOwnProperty(P)&&(h||(h={}),h[P]="")}else le!=="dangerouslySetInnerHTML"&&le!=="children"&&le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&le!=="autoFocus"&&(r.hasOwnProperty(le)?M||(M=[]):(M=M||[]).push(le,null));for(le in m){var Z=m[le];if(W=I!=null?I[le]:void 0,m.hasOwnProperty(le)&&Z!==W&&(Z!=null||W!=null))if(le==="style")if(W){for(P in W)!W.hasOwnProperty(P)||Z&&Z.hasOwnProperty(P)||(h||(h={}),h[P]="");for(P in Z)Z.hasOwnProperty(P)&&W[P]!==Z[P]&&(h||(h={}),h[P]=Z[P])}else h||(M||(M=[]),M.push(le,h)),h=Z;else le==="dangerouslySetInnerHTML"?(Z=Z?Z.__html:void 0,W=W?W.__html:void 0,Z!=null&&W!==Z&&(M=M||[]).push(le,Z)):le==="children"?typeof Z!="string"&&typeof Z!="number"||(M=M||[]).push(le,""+Z):le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&(r.hasOwnProperty(le)?(Z!=null&&le==="onScroll"&&Jt("scroll",s),M||W===Z||(M=[])):(M=M||[]).push(le,Z))}h&&(M=M||[]).push("style",h);var le=M;(a.updateQueue=le)&&(a.flags|=4)}},kI=function(s,a,h,m){h!==m&&(a.flags|=4)};function kc(s,a){if(!en)switch(s.tailMode){case"hidden":a=s.tail;for(var h=null;a!==null;)a.alternate!==null&&(h=a),a=a.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var m=null;h!==null;)h.alternate!==null&&(m=h),h=h.sibling;m===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function qn(s){var a=s.alternate!==null&&s.alternate.child===s.child,h=0,m=0;if(a)for(var I=s.child;I!==null;)h|=I.lanes|I.childLanes,m|=I.subtreeFlags&14680064,m|=I.flags&14680064,I.return=s,I=I.sibling;else for(I=s.child;I!==null;)h|=I.lanes|I.childLanes,m|=I.subtreeFlags,m|=I.flags,I.return=s,I=I.sibling;return s.subtreeFlags|=m,s.childLanes=h,a}function P6(s,a,h){var m=a.pendingProps;switch(Ig(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(a),null;case 1:return pi(a.type)&&Yf(),qn(a),null;case 3:return m=a.stateNode,sl(),Zt(Ai),Zt(jn),Fg(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(s===null||s.child===null)&&(Zf(a)?a.flags|=4:s===null||s.memoizedState.isDehydrated&&!(a.flags&256)||(a.flags|=1024,sr!==null&&(hm(sr),sr=null))),tm(s,a),qn(a),null;case 5:Ug(a);var I=Bo(Lc.current);if(h=a.type,s!==null&&a.stateNode!=null)UI(s,a,h,m,I),s.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!m){if(a.stateNode===null)throw Error(t(166));return qn(a),null}if(s=Bo(Sr.current),Zf(a)){m=a.stateNode,h=a.type;var M=a.memoizedProps;switch(m[xr]=a,m[Mc]=M,s=(a.mode&1)!==0,h){case"dialog":Jt("cancel",m),Jt("close",m);break;case"iframe":case"object":case"embed":Jt("load",m);break;case"video":case"audio":for(I=0;I<xc.length;I++)Jt(xc[I],m);break;case"source":Jt("error",m);break;case"img":case"image":case"link":Jt("error",m),Jt("load",m);break;case"details":Jt("toggle",m);break;case"input":Ze(m,M),Jt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!M.multiple},Jt("invalid",m);break;case"textarea":H(m,M),Jt("invalid",m)}je(h,M),I=null;for(var P in M)if(M.hasOwnProperty(P)){var W=M[P];P==="children"?typeof W=="string"?m.textContent!==W&&(M.suppressHydrationWarning!==!0&&Vf(m.textContent,W,s),I=["children",W]):typeof W=="number"&&m.textContent!==""+W&&(M.suppressHydrationWarning!==!0&&Vf(m.textContent,W,s),I=["children",""+W]):r.hasOwnProperty(P)&&W!=null&&P==="onScroll"&&Jt("scroll",m)}switch(h){case"input":ot(m),Ue(m,M,!0);break;case"textarea":ot(m),se(m);break;case"select":case"option":break;default:typeof M.onClick=="function"&&(m.onclick=Wf)}m=I,a.updateQueue=m,m!==null&&(a.flags|=4)}else{P=I.nodeType===9?I:I.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Ce(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=P.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof m.is=="string"?s=P.createElement(h,{is:m.is}):(s=P.createElement(h),h==="select"&&(P=s,m.multiple?P.multiple=!0:m.size&&(P.size=m.size))):s=P.createElementNS(s,h),s[xr]=a,s[Mc]=m,PI(s,a,!1,!1),a.stateNode=s;e:{switch(P=Je(h,m),h){case"dialog":Jt("cancel",s),Jt("close",s),I=m;break;case"iframe":case"object":case"embed":Jt("load",s),I=m;break;case"video":case"audio":for(I=0;I<xc.length;I++)Jt(xc[I],s);I=m;break;case"source":Jt("error",s),I=m;break;case"img":case"image":case"link":Jt("error",s),Jt("load",s),I=m;break;case"details":Jt("toggle",s),I=m;break;case"input":Ze(s,m),I=Ne(s,m),Jt("invalid",s);break;case"option":I=m;break;case"select":s._wrapperState={wasMultiple:!!m.multiple},I=U({},m,{value:void 0}),Jt("invalid",s);break;case"textarea":H(s,m),I=At(s,m),Jt("invalid",s);break;default:I=m}je(h,I),W=I;for(M in W)if(W.hasOwnProperty(M)){var Z=W[M];M==="style"?pe(s,Z):M==="dangerouslySetInnerHTML"?(Z=Z?Z.__html:void 0,Z!=null&&We(s,Z)):M==="children"?typeof Z=="string"?(h!=="textarea"||Z!=="")&&Se(s,Z):typeof Z=="number"&&Se(s,""+Z):M!=="suppressContentEditableWarning"&&M!=="suppressHydrationWarning"&&M!=="autoFocus"&&(r.hasOwnProperty(M)?Z!=null&&M==="onScroll"&&Jt("scroll",s):Z!=null&&y(s,M,Z,P))}switch(h){case"input":ot(s),Ue(s,m,!1);break;case"textarea":ot(s),se(s);break;case"option":m.value!=null&&s.setAttribute("value",""+de(m.value));break;case"select":s.multiple=!!m.multiple,M=m.value,M!=null?at(s,!!m.multiple,M,!1):m.defaultValue!=null&&at(s,!!m.multiple,m.defaultValue,!0);break;default:typeof I.onClick=="function"&&(s.onclick=Wf)}switch(h){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return qn(a),null;case 6:if(s&&a.stateNode!=null)kI(s,a,s.memoizedProps,m);else{if(typeof m!="string"&&a.stateNode===null)throw Error(t(166));if(h=Bo(Lc.current),Bo(Sr.current),Zf(a)){if(m=a.stateNode,h=a.memoizedProps,m[xr]=a,(M=m.nodeValue!==h)&&(s=Ri,s!==null))switch(s.tag){case 3:Vf(m.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Vf(m.nodeValue,h,(s.mode&1)!==0)}M&&(a.flags|=4)}else m=(h.nodeType===9?h:h.ownerDocument).createTextNode(m),m[xr]=a,a.stateNode=m}return qn(a),null;case 13:if(Zt(rn),m=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(en&&bi!==null&&a.mode&1&&!(a.flags&128))QC(),tl(),a.flags|=98560,M=!1;else if(M=Zf(a),m!==null&&m.dehydrated!==null){if(s===null){if(!M)throw Error(t(318));if(M=a.memoizedState,M=M!==null?M.dehydrated:null,!M)throw Error(t(317));M[xr]=a}else tl(),!(a.flags&128)&&(a.memoizedState=null),a.flags|=4;qn(a),M=!1}else sr!==null&&(hm(sr),sr=null),M=!0;if(!M)return a.flags&65536?a:null}return a.flags&128?(a.lanes=h,a):(m=m!==null,m!==(s!==null&&s.memoizedState!==null)&&m&&(a.child.flags|=8192,a.mode&1&&(s===null||rn.current&1?wn===0&&(wn=3):pm())),a.updateQueue!==null&&(a.flags|=4),qn(a),null);case 4:return sl(),tm(s,a),s===null&&Sc(a.stateNode.containerInfo),qn(a),null;case 10:return Bg(a.type._context),qn(a),null;case 17:return pi(a.type)&&Yf(),qn(a),null;case 19:if(Zt(rn),M=a.memoizedState,M===null)return qn(a),null;if(m=(a.flags&128)!==0,P=M.rendering,P===null)if(m)kc(M,!1);else{if(wn!==0||s!==null&&s.flags&128)for(s=a.child;s!==null;){if(P=sh(s),P!==null){for(a.flags|=128,kc(M,!1),m=P.updateQueue,m!==null&&(a.updateQueue=m,a.flags|=4),a.subtreeFlags=0,m=h,h=a.child;h!==null;)M=h,s=m,M.flags&=14680066,P=M.alternate,P===null?(M.childLanes=0,M.lanes=s,M.child=null,M.subtreeFlags=0,M.memoizedProps=null,M.memoizedState=null,M.updateQueue=null,M.dependencies=null,M.stateNode=null):(M.childLanes=P.childLanes,M.lanes=P.lanes,M.child=P.child,M.subtreeFlags=0,M.deletions=null,M.memoizedProps=P.memoizedProps,M.memoizedState=P.memoizedState,M.updateQueue=P.updateQueue,M.type=P.type,s=P.dependencies,M.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return Yt(rn,rn.current&1|2),a.child}s=s.sibling}M.tail!==null&&Qe()>cl&&(a.flags|=128,m=!0,kc(M,!1),a.lanes=4194304)}else{if(!m)if(s=sh(P),s!==null){if(a.flags|=128,m=!0,h=s.updateQueue,h!==null&&(a.updateQueue=h,a.flags|=4),kc(M,!0),M.tail===null&&M.tailMode==="hidden"&&!P.alternate&&!en)return qn(a),null}else 2*Qe()-M.renderingStartTime>cl&&h!==1073741824&&(a.flags|=128,m=!0,kc(M,!1),a.lanes=4194304);M.isBackwards?(P.sibling=a.child,a.child=P):(h=M.last,h!==null?h.sibling=P:a.child=P,M.last=P)}return M.tail!==null?(a=M.tail,M.rendering=a,M.tail=a.sibling,M.renderingStartTime=Qe(),a.sibling=null,h=rn.current,Yt(rn,m?h&1|2:h&1),a):(qn(a),null);case 22:case 23:return Am(),m=a.memoizedState!==null,s!==null&&s.memoizedState!==null!==m&&(a.flags|=8192),m&&a.mode&1?Li&1073741824&&(qn(a),a.subtreeFlags&6&&(a.flags|=8192)):qn(a),null;case 24:return null;case 25:return null}throw Error(t(156,a.tag))}function U6(s,a){switch(Ig(a),a.tag){case 1:return pi(a.type)&&Yf(),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return sl(),Zt(Ai),Zt(jn),Fg(),s=a.flags,s&65536&&!(s&128)?(a.flags=s&-65537|128,a):null;case 5:return Ug(a),null;case 13:if(Zt(rn),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(t(340));tl()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return Zt(rn),null;case 4:return sl(),null;case 10:return Bg(a.type._context),null;case 22:case 23:return Am(),null;case 24:return null;default:return null}}var dh=!1,Xn=!1,k6=typeof WeakSet=="function"?WeakSet:Set,ze=null;function al(s,a){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(m){cn(s,a,m)}else h.current=null}function nm(s,a,h){try{h()}catch(m){cn(s,a,m)}}var FI=!1;function F6(s,a){if(Ag=Df,s=pC(),og(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var m=h.getSelection&&h.getSelection();if(m&&m.rangeCount!==0){h=m.anchorNode;var I=m.anchorOffset,M=m.focusNode;m=m.focusOffset;try{h.nodeType,M.nodeType}catch{h=null;break e}var P=0,W=-1,Z=-1,le=0,Ee=0,Ie=s,ve=null;t:for(;;){for(var Fe;Ie!==h||I!==0&&Ie.nodeType!==3||(W=P+I),Ie!==M||m!==0&&Ie.nodeType!==3||(Z=P+m),Ie.nodeType===3&&(P+=Ie.nodeValue.length),(Fe=Ie.firstChild)!==null;)ve=Ie,Ie=Fe;for(;;){if(Ie===s)break t;if(ve===h&&++le===I&&(W=P),ve===M&&++Ee===m&&(Z=P),(Fe=Ie.nextSibling)!==null)break;Ie=ve,ve=Ie.parentNode}Ie=Fe}h=W===-1||Z===-1?null:{start:W,end:Z}}else h=null}h=h||{start:0,end:0}}else h=null;for(pg={focusedElem:s,selectionRange:h},Df=!1,ze=a;ze!==null;)if(a=ze,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,ze=s;else for(;ze!==null;){a=ze;try{var Ve=a.alternate;if(a.flags&1024)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ve!==null){var Ye=Ve.memoizedProps,pn=Ve.memoizedState,ie=a.stateNode,ne=ie.getSnapshotBeforeUpdate(a.elementType===a.type?Ye:or(a.type,Ye),pn);ie.__reactInternalSnapshotBeforeUpdate=ne}break;case 3:var ae=a.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Be){cn(a,a.return,Be)}if(s=a.sibling,s!==null){s.return=a.return,ze=s;break}ze=a.return}return Ve=FI,FI=!1,Ve}function Fc(s,a,h){var m=a.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var I=m=m.next;do{if((I.tag&s)===s){var M=I.destroy;I.destroy=void 0,M!==void 0&&nm(a,h,M)}I=I.next}while(I!==m)}}function Ah(s,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var h=a=a.next;do{if((h.tag&s)===s){var m=h.create;h.destroy=m()}h=h.next}while(h!==a)}}function im(s){var a=s.ref;if(a!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof a=="function"?a(s):a.current=s}}function QI(s){var a=s.alternate;a!==null&&(s.alternate=null,QI(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&(delete a[xr],delete a[Mc],delete a[_g],delete a[E6],delete a[y6])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function OI(s){return s.tag===5||s.tag===3||s.tag===4}function zI(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||OI(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function rm(s,a,h){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?h.nodeType===8?h.parentNode.insertBefore(s,a):h.insertBefore(s,a):(h.nodeType===8?(a=h.parentNode,a.insertBefore(s,h)):(a=h,a.appendChild(s)),h=h._reactRootContainer,h!=null||a.onclick!==null||(a.onclick=Wf));else if(m!==4&&(s=s.child,s!==null))for(rm(s,a,h),s=s.sibling;s!==null;)rm(s,a,h),s=s.sibling}function sm(s,a,h){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?h.insertBefore(s,a):h.appendChild(s);else if(m!==4&&(s=s.child,s!==null))for(sm(s,a,h),s=s.sibling;s!==null;)sm(s,a,h),s=s.sibling}var On=null,ar=!1;function Os(s,a,h){for(h=h.child;h!==null;)GI(s,a,h),h=h.sibling}function GI(s,a,h){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(di,h)}catch{}switch(h.tag){case 5:Xn||al(h,a);case 6:var m=On,I=ar;On=null,Os(s,a,h),On=m,ar=I,On!==null&&(ar?(s=On,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):On.removeChild(h.stateNode));break;case 18:On!==null&&(ar?(s=On,h=h.stateNode,s.nodeType===8?vg(s.parentNode,h):s.nodeType===1&&vg(s,h),gc(s)):vg(On,h.stateNode));break;case 4:m=On,I=ar,On=h.stateNode.containerInfo,ar=!0,Os(s,a,h),On=m,ar=I;break;case 0:case 11:case 14:case 15:if(!Xn&&(m=h.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){I=m=m.next;do{var M=I,P=M.destroy;M=M.tag,P!==void 0&&(M&2||M&4)&&nm(h,a,P),I=I.next}while(I!==m)}Os(s,a,h);break;case 1:if(!Xn&&(al(h,a),m=h.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=h.memoizedProps,m.state=h.memoizedState,m.componentWillUnmount()}catch(W){cn(h,a,W)}Os(s,a,h);break;case 21:Os(s,a,h);break;case 22:h.mode&1?(Xn=(m=Xn)||h.memoizedState!==null,Os(s,a,h),Xn=m):Os(s,a,h);break;default:Os(s,a,h)}}function HI(s){var a=s.updateQueue;if(a!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new k6),a.forEach(function(m){var I=Y6.bind(null,s,m);h.has(m)||(h.add(m),m.then(I,I))})}}function lr(s,a){var h=a.deletions;if(h!==null)for(var m=0;m<h.length;m++){var I=h[m];try{var M=s,P=a,W=P;e:for(;W!==null;){switch(W.tag){case 5:On=W.stateNode,ar=!1;break e;case 3:On=W.stateNode.containerInfo,ar=!0;break e;case 4:On=W.stateNode.containerInfo,ar=!0;break e}W=W.return}if(On===null)throw Error(t(160));GI(M,P,I),On=null,ar=!1;var Z=I.alternate;Z!==null&&(Z.return=null),I.return=null}catch(le){cn(I,a,le)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)VI(a,s),a=a.sibling}function VI(s,a){var h=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(lr(a,s),Mr(s),m&4){try{Fc(3,s,s.return),Ah(3,s)}catch(Ye){cn(s,s.return,Ye)}try{Fc(5,s,s.return)}catch(Ye){cn(s,s.return,Ye)}}break;case 1:lr(a,s),Mr(s),m&512&&h!==null&&al(h,h.return);break;case 5:if(lr(a,s),Mr(s),m&512&&h!==null&&al(h,h.return),s.flags&32){var I=s.stateNode;try{Se(I,"")}catch(Ye){cn(s,s.return,Ye)}}if(m&4&&(I=s.stateNode,I!=null)){var M=s.memoizedProps,P=h!==null?h.memoizedProps:M,W=s.type,Z=s.updateQueue;if(s.updateQueue=null,Z!==null)try{W==="input"&&M.type==="radio"&&M.name!=null&&_e(I,M),Je(W,P);var le=Je(W,M);for(P=0;P<Z.length;P+=2){var Ee=Z[P],Ie=Z[P+1];Ee==="style"?pe(I,Ie):Ee==="dangerouslySetInnerHTML"?We(I,Ie):Ee==="children"?Se(I,Ie):y(I,Ee,Ie,le)}switch(W){case"input":it(I,M);break;case"textarea":Q(I,M);break;case"select":var ve=I._wrapperState.wasMultiple;I._wrapperState.wasMultiple=!!M.multiple;var Fe=M.value;Fe!=null?at(I,!!M.multiple,Fe,!1):ve!==!!M.multiple&&(M.defaultValue!=null?at(I,!!M.multiple,M.defaultValue,!0):at(I,!!M.multiple,M.multiple?[]:"",!1))}I[Mc]=M}catch(Ye){cn(s,s.return,Ye)}}break;case 6:if(lr(a,s),Mr(s),m&4){if(s.stateNode===null)throw Error(t(162));I=s.stateNode,M=s.memoizedProps;try{I.nodeValue=M}catch(Ye){cn(s,s.return,Ye)}}break;case 3:if(lr(a,s),Mr(s),m&4&&h!==null&&h.memoizedState.isDehydrated)try{gc(a.containerInfo)}catch(Ye){cn(s,s.return,Ye)}break;case 4:lr(a,s),Mr(s);break;case 13:lr(a,s),Mr(s),I=s.child,I.flags&8192&&(M=I.memoizedState!==null,I.stateNode.isHidden=M,!M||I.alternate!==null&&I.alternate.memoizedState!==null||(lm=Qe())),m&4&&HI(s);break;case 22:if(Ee=h!==null&&h.memoizedState!==null,s.mode&1?(Xn=(le=Xn)||Ee,lr(a,s),Xn=le):lr(a,s),Mr(s),m&8192){if(le=s.memoizedState!==null,(s.stateNode.isHidden=le)&&!Ee&&s.mode&1)for(ze=s,Ee=s.child;Ee!==null;){for(Ie=ze=Ee;ze!==null;){switch(ve=ze,Fe=ve.child,ve.tag){case 0:case 11:case 14:case 15:Fc(4,ve,ve.return);break;case 1:al(ve,ve.return);var Ve=ve.stateNode;if(typeof Ve.componentWillUnmount=="function"){m=ve,h=ve.return;try{a=m,Ve.props=a.memoizedProps,Ve.state=a.memoizedState,Ve.componentWillUnmount()}catch(Ye){cn(m,h,Ye)}}break;case 5:al(ve,ve.return);break;case 22:if(ve.memoizedState!==null){YI(Ie);continue}}Fe!==null?(Fe.return=ve,ze=Fe):YI(Ie)}Ee=Ee.sibling}e:for(Ee=null,Ie=s;;){if(Ie.tag===5){if(Ee===null){Ee=Ie;try{I=Ie.stateNode,le?(M=I.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none"):(W=Ie.stateNode,Z=Ie.memoizedProps.style,P=Z!=null&&Z.hasOwnProperty("display")?Z.display:null,W.style.display=Me("display",P))}catch(Ye){cn(s,s.return,Ye)}}}else if(Ie.tag===6){if(Ee===null)try{Ie.stateNode.nodeValue=le?"":Ie.memoizedProps}catch(Ye){cn(s,s.return,Ye)}}else if((Ie.tag!==22&&Ie.tag!==23||Ie.memoizedState===null||Ie===s)&&Ie.child!==null){Ie.child.return=Ie,Ie=Ie.child;continue}if(Ie===s)break e;for(;Ie.sibling===null;){if(Ie.return===null||Ie.return===s)break e;Ee===Ie&&(Ee=null),Ie=Ie.return}Ee===Ie&&(Ee=null),Ie.sibling.return=Ie.return,Ie=Ie.sibling}}break;case 19:lr(a,s),Mr(s),m&4&&HI(s);break;case 21:break;default:lr(a,s),Mr(s)}}function Mr(s){var a=s.flags;if(a&2){try{e:{for(var h=s.return;h!==null;){if(OI(h)){var m=h;break e}h=h.return}throw Error(t(160))}switch(m.tag){case 5:var I=m.stateNode;m.flags&32&&(Se(I,""),m.flags&=-33);var M=zI(s);sm(s,M,I);break;case 3:case 4:var P=m.stateNode.containerInfo,W=zI(s);rm(s,W,P);break;default:throw Error(t(161))}}catch(Z){cn(s,s.return,Z)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function Q6(s,a,h){ze=s,WI(s)}function WI(s,a,h){for(var m=(s.mode&1)!==0;ze!==null;){var I=ze,M=I.child;if(I.tag===22&&m){var P=I.memoizedState!==null||dh;if(!P){var W=I.alternate,Z=W!==null&&W.memoizedState!==null||Xn;W=dh;var le=Xn;if(dh=P,(Xn=Z)&&!le)for(ze=I;ze!==null;)P=ze,Z=P.child,P.tag===22&&P.memoizedState!==null?qI(I):Z!==null?(Z.return=P,ze=Z):qI(I);for(;M!==null;)ze=M,WI(M),M=M.sibling;ze=I,dh=W,Xn=le}jI(s)}else I.subtreeFlags&8772&&M!==null?(M.return=I,ze=M):jI(s)}}function jI(s){for(;ze!==null;){var a=ze;if(a.flags&8772){var h=a.alternate;try{if(a.flags&8772)switch(a.tag){case 0:case 11:case 15:Xn||Ah(5,a);break;case 1:var m=a.stateNode;if(a.flags&4&&!Xn)if(h===null)m.componentDidMount();else{var I=a.elementType===a.type?h.memoizedProps:or(a.type,h.memoizedProps);m.componentDidUpdate(I,h.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var M=a.updateQueue;M!==null&&HC(a,M,m);break;case 3:var P=a.updateQueue;if(P!==null){if(h=null,a.child!==null)switch(a.child.tag){case 5:h=a.child.stateNode;break;case 1:h=a.child.stateNode}HC(a,P,h)}break;case 5:var W=a.stateNode;if(h===null&&a.flags&4){h=W;var Z=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":Z.autoFocus&&h.focus();break;case"img":Z.src&&(h.src=Z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var le=a.alternate;if(le!==null){var Ee=le.memoizedState;if(Ee!==null){var Ie=Ee.dehydrated;Ie!==null&&gc(Ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Xn||a.flags&512&&im(a)}catch(ve){cn(a,a.return,ve)}}if(a===s){ze=null;break}if(h=a.sibling,h!==null){h.return=a.return,ze=h;break}ze=a.return}}function YI(s){for(;ze!==null;){var a=ze;if(a===s){ze=null;break}var h=a.sibling;if(h!==null){h.return=a.return,ze=h;break}ze=a.return}}function qI(s){for(;ze!==null;){var a=ze;try{switch(a.tag){case 0:case 11:case 15:var h=a.return;try{Ah(4,a)}catch(Z){cn(a,h,Z)}break;case 1:var m=a.stateNode;if(typeof m.componentDidMount=="function"){var I=a.return;try{m.componentDidMount()}catch(Z){cn(a,I,Z)}}var M=a.return;try{im(a)}catch(Z){cn(a,M,Z)}break;case 5:var P=a.return;try{im(a)}catch(Z){cn(a,P,Z)}}}catch(Z){cn(a,a.return,Z)}if(a===s){ze=null;break}var W=a.sibling;if(W!==null){W.return=a.return,ze=W;break}ze=a.return}}var O6=Math.ceil,ph=x.ReactCurrentDispatcher,om=x.ReactCurrentOwner,Vi=x.ReactCurrentBatchConfig,Rt=0,Pn=null,_n=null,zn=0,Li=0,ll=Ps(0),wn=0,Qc=null,bo=0,gh=0,am=0,Oc=null,mi=null,lm=0,cl=1/0,ss=null,mh=!1,cm=null,zs=null,vh=!1,Gs=null,_h=0,zc=0,um=null,Eh=-1,yh=0;function ai(){return Rt&6?Qe():Eh!==-1?Eh:Eh=Qe()}function Hs(s){return s.mode&1?Rt&2&&zn!==0?zn&-zn:I6.transition!==null?(yh===0&&(yh=Rf()),yh):(s=kt,s!==0||(s=window.event,s=s===void 0?16:Xy(s.type)),s):1}function cr(s,a,h,m){if(50<zc)throw zc=0,um=null,Error(t(185));fc(s,h,m),(!(Rt&2)||s!==Pn)&&(s===Pn&&(!(Rt&2)&&(gh|=h),wn===4&&Vs(s,zn)),vi(s,m),h===1&&Rt===0&&!(a.mode&1)&&(cl=Qe()+500,Xf&&ks()))}function vi(s,a){var h=s.callbackNode;si(s,a);var m=Qi(s,s===Pn?zn:0);if(m===0)h!==null&&ke(h),s.callbackNode=null,s.callbackPriority=0;else if(a=m&-m,s.callbackPriority!==a){if(h!=null&&ke(h),a===1)s.tag===0?C6(KI.bind(null,s)):NC(KI.bind(null,s)),v6(function(){!(Rt&6)&&ks()}),h=null;else{switch(zy(m)){case 1:h=ft;break;case 4:h=ht;break;case 16:h=jt;break;case 536870912:h=dn;break;default:h=jt}h=rx(h,XI.bind(null,s))}s.callbackPriority=a,s.callbackNode=h}}function XI(s,a){if(Eh=-1,yh=0,Rt&6)throw Error(t(327));var h=s.callbackNode;if(ul()&&s.callbackNode!==h)return null;var m=Qi(s,s===Pn?zn:0);if(m===0)return null;if(m&30||m&s.expiredLanes||a)a=Ch(s,m);else{a=m;var I=Rt;Rt|=2;var M=ZI();(Pn!==s||zn!==a)&&(ss=null,cl=Qe()+500,Do(s,a));do try{H6();break}catch(W){JI(s,W)}while(1);Tg(),ph.current=M,Rt=I,_n!==null?a=0:(Pn=null,zn=0,a=wn)}if(a!==0){if(a===2&&(I=Io(s),I!==0&&(m=I,a=fm(s,I))),a===1)throw h=Qc,Do(s,0),Vs(s,m),vi(s,Qe()),h;if(a===6)Vs(s,m);else{if(I=s.current.alternate,!(m&30)&&!z6(I)&&(a=Ch(s,m),a===2&&(M=Io(s),M!==0&&(m=M,a=fm(s,M))),a===1))throw h=Qc,Do(s,0),Vs(s,m),vi(s,Qe()),h;switch(s.finishedWork=I,s.finishedLanes=m,a){case 0:case 1:throw Error(t(345));case 2:No(s,mi,ss);break;case 3:if(Vs(s,m),(m&130023424)===m&&(a=lm+500-Qe(),10<a)){if(Qi(s,0)!==0)break;if(I=s.suspendedLanes,(I&m)!==m){ai(),s.pingedLanes|=s.suspendedLanes&I;break}s.timeoutHandle=mg(No.bind(null,s,mi,ss),a);break}No(s,mi,ss);break;case 4:if(Vs(s,m),(m&4194240)===m)break;for(a=s.eventTimes,I=-1;0<m;){var P=31-ri(m);M=1<<P,P=a[P],P>I&&(I=P),m&=~M}if(m=I,m=Qe()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*O6(m/1960))-m,10<m){s.timeoutHandle=mg(No.bind(null,s,mi,ss),m);break}No(s,mi,ss);break;case 5:No(s,mi,ss);break;default:throw Error(t(329))}}}return vi(s,Qe()),s.callbackNode===h?XI.bind(null,s):null}function fm(s,a){var h=Oc;return s.current.memoizedState.isDehydrated&&(Do(s,a).flags|=256),s=Ch(s,a),s!==2&&(a=mi,mi=h,a!==null&&hm(a)),s}function hm(s){mi===null?mi=s:mi.push.apply(mi,s)}function z6(s){for(var a=s;;){if(a.flags&16384){var h=a.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var m=0;m<h.length;m++){var I=h[m],M=I.getSnapshot;I=I.value;try{if(!rr(M(),I))return!1}catch{return!1}}}if(h=a.child,a.subtreeFlags&16384&&h!==null)h.return=a,a=h;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Vs(s,a){for(a&=~am,a&=~gh,s.suspendedLanes|=a,s.pingedLanes&=~a,s=s.expirationTimes;0<a;){var h=31-ri(a),m=1<<h;s[h]=-1,a&=~m}}function KI(s){if(Rt&6)throw Error(t(327));ul();var a=Qi(s,0);if(!(a&1))return vi(s,Qe()),null;var h=Ch(s,a);if(s.tag!==0&&h===2){var m=Io(s);m!==0&&(a=m,h=fm(s,m))}if(h===1)throw h=Qc,Do(s,0),Vs(s,a),vi(s,Qe()),h;if(h===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=a,No(s,mi,ss),vi(s,Qe()),null}function dm(s,a){var h=Rt;Rt|=1;try{return s(a)}finally{Rt=h,Rt===0&&(cl=Qe()+500,Xf&&ks())}}function Lo(s){Gs!==null&&Gs.tag===0&&!(Rt&6)&&ul();var a=Rt;Rt|=1;var h=Vi.transition,m=kt;try{if(Vi.transition=null,kt=1,s)return s()}finally{kt=m,Vi.transition=h,Rt=a,!(Rt&6)&&ks()}}function Am(){Li=ll.current,Zt(ll)}function Do(s,a){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,m6(h)),_n!==null)for(h=_n.return;h!==null;){var m=h;switch(Ig(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Yf();break;case 3:sl(),Zt(Ai),Zt(jn),Fg();break;case 5:Ug(m);break;case 4:sl();break;case 13:Zt(rn);break;case 19:Zt(rn);break;case 10:Bg(m.type._context);break;case 22:case 23:Am()}h=h.return}if(Pn=s,_n=s=Ws(s.current,null),zn=Li=a,wn=0,Qc=null,am=gh=bo=0,mi=Oc=null,To!==null){for(a=0;a<To.length;a++)if(h=To[a],m=h.interleaved,m!==null){h.interleaved=null;var I=m.next,M=h.pending;if(M!==null){var P=M.next;M.next=I,m.next=P}h.pending=m}To=null}return s}function JI(s,a){do{var h=_n;try{if(Tg(),oh.current=uh,ah){for(var m=sn.memoizedState;m!==null;){var I=m.queue;I!==null&&(I.pending=null),m=m.next}ah=!1}if(Ro=0,Nn=Sn=sn=null,Dc=!1,Nc=0,om.current=null,h===null||h.return===null){wn=1,Qc=a,_n=null;break}e:{var M=s,P=h.return,W=h,Z=a;if(a=zn,W.flags|=32768,Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var le=Z,Ee=W,Ie=Ee.tag;if(!(Ee.mode&1)&&(Ie===0||Ie===11||Ie===15)){var ve=Ee.alternate;ve?(Ee.updateQueue=ve.updateQueue,Ee.memoizedState=ve.memoizedState,Ee.lanes=ve.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Fe=CI(P);if(Fe!==null){Fe.flags&=-257,II(Fe,P,W,M,a),Fe.mode&1&&yI(M,le,a),a=Fe,Z=le;var Ve=a.updateQueue;if(Ve===null){var Ye=new Set;Ye.add(Z),a.updateQueue=Ye}else Ve.add(Z);break e}else{if(!(a&1)){yI(M,le,a),pm();break e}Z=Error(t(426))}}else if(en&&W.mode&1){var pn=CI(P);if(pn!==null){!(pn.flags&65536)&&(pn.flags|=256),II(pn,P,W,M,a),wg(ol(Z,W));break e}}M=Z=ol(Z,W),wn!==4&&(wn=2),Oc===null?Oc=[M]:Oc.push(M),M=P;do{switch(M.tag){case 3:M.flags|=65536,a&=-a,M.lanes|=a;var ie=_I(M,Z,a);GC(M,ie);break e;case 1:W=Z;var ne=M.type,ae=M.stateNode;if(!(M.flags&128)&&(typeof ne.getDerivedStateFromError=="function"||ae!==null&&typeof ae.componentDidCatch=="function"&&(zs===null||!zs.has(ae)))){M.flags|=65536,a&=-a,M.lanes|=a;var Be=EI(M,W,a);GC(M,Be);break e}}M=M.return}while(M!==null)}ex(h)}catch(Xe){a=Xe,_n===h&&h!==null&&(_n=h=h.return);continue}break}while(1)}function ZI(){var s=ph.current;return ph.current=uh,s===null?uh:s}function pm(){(wn===0||wn===3||wn===2)&&(wn=4),Pn===null||!(bo&268435455)&&!(gh&268435455)||Vs(Pn,zn)}function Ch(s,a){var h=Rt;Rt|=2;var m=ZI();(Pn!==s||zn!==a)&&(ss=null,Do(s,a));do try{G6();break}catch(I){JI(s,I)}while(1);if(Tg(),Rt=h,ph.current=m,_n!==null)throw Error(t(261));return Pn=null,zn=0,wn}function G6(){for(;_n!==null;)$I(_n)}function H6(){for(;_n!==null&&!et();)$I(_n)}function $I(s){var a=ix(s.alternate,s,Li);s.memoizedProps=s.pendingProps,a===null?ex(s):_n=a,om.current=null}function ex(s){var a=s;do{var h=a.alternate;if(s=a.return,a.flags&32768){if(h=U6(h,a),h!==null){h.flags&=32767,_n=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{wn=6,_n=null;return}}else if(h=P6(h,a,Li),h!==null){_n=h;return}if(a=a.sibling,a!==null){_n=a;return}_n=a=s}while(a!==null);wn===0&&(wn=5)}function No(s,a,h){var m=kt,I=Vi.transition;try{Vi.transition=null,kt=1,V6(s,a,h,m)}finally{Vi.transition=I,kt=m}return null}function V6(s,a,h,m){do ul();while(Gs!==null);if(Rt&6)throw Error(t(327));h=s.finishedWork;var I=s.finishedLanes;if(h===null)return null;if(s.finishedWork=null,s.finishedLanes=0,h===s.current)throw Error(t(177));s.callbackNode=null,s.callbackPriority=0;var M=h.lanes|h.childLanes;if(xD(s,M),s===Pn&&(_n=Pn=null,zn=0),!(h.subtreeFlags&2064)&&!(h.flags&2064)||vh||(vh=!0,rx(jt,function(){return ul(),null})),M=(h.flags&15990)!==0,h.subtreeFlags&15990||M){M=Vi.transition,Vi.transition=null;var P=kt;kt=1;var W=Rt;Rt|=4,om.current=null,F6(s,h),VI(h,s),u6(pg),Df=!!Ag,pg=Ag=null,s.current=h,Q6(h),lt(),Rt=W,kt=P,Vi.transition=M}else s.current=h;if(vh&&(vh=!1,Gs=s,_h=I),M=s.pendingLanes,M===0&&(zs=null),Et(h.stateNode),vi(s,Qe()),a!==null)for(m=s.onRecoverableError,h=0;h<a.length;h++)I=a[h],m(I.value,{componentStack:I.stack,digest:I.digest});if(mh)throw mh=!1,s=cm,cm=null,s;return _h&1&&s.tag!==0&&ul(),M=s.pendingLanes,M&1?s===um?zc++:(zc=0,um=s):zc=0,ks(),null}function ul(){if(Gs!==null){var s=zy(_h),a=Vi.transition,h=kt;try{if(Vi.transition=null,kt=16>s?16:s,Gs===null)var m=!1;else{if(s=Gs,Gs=null,_h=0,Rt&6)throw Error(t(331));var I=Rt;for(Rt|=4,ze=s.current;ze!==null;){var M=ze,P=M.child;if(ze.flags&16){var W=M.deletions;if(W!==null){for(var Z=0;Z<W.length;Z++){var le=W[Z];for(ze=le;ze!==null;){var Ee=ze;switch(Ee.tag){case 0:case 11:case 15:Fc(8,Ee,M)}var Ie=Ee.child;if(Ie!==null)Ie.return=Ee,ze=Ie;else for(;ze!==null;){Ee=ze;var ve=Ee.sibling,Fe=Ee.return;if(QI(Ee),Ee===le){ze=null;break}if(ve!==null){ve.return=Fe,ze=ve;break}ze=Fe}}}var Ve=M.alternate;if(Ve!==null){var Ye=Ve.child;if(Ye!==null){Ve.child=null;do{var pn=Ye.sibling;Ye.sibling=null,Ye=pn}while(Ye!==null)}}ze=M}}if(M.subtreeFlags&2064&&P!==null)P.return=M,ze=P;else e:for(;ze!==null;){if(M=ze,M.flags&2048)switch(M.tag){case 0:case 11:case 15:Fc(9,M,M.return)}var ie=M.sibling;if(ie!==null){ie.return=M.return,ze=ie;break e}ze=M.return}}var ne=s.current;for(ze=ne;ze!==null;){P=ze;var ae=P.child;if(P.subtreeFlags&2064&&ae!==null)ae.return=P,ze=ae;else e:for(P=ne;ze!==null;){if(W=ze,W.flags&2048)try{switch(W.tag){case 0:case 11:case 15:Ah(9,W)}}catch(Xe){cn(W,W.return,Xe)}if(W===P){ze=null;break e}var Be=W.sibling;if(Be!==null){Be.return=W.return,ze=Be;break e}ze=W.return}}if(Rt=I,ks(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(di,s)}catch{}m=!0}return m}finally{kt=h,Vi.transition=a}}return!1}function tx(s,a,h){a=ol(h,a),a=_I(s,a,1),s=Qs(s,a,1),a=ai(),s!==null&&(fc(s,1,a),vi(s,a))}function cn(s,a,h){if(s.tag===3)tx(s,s,h);else for(;a!==null;){if(a.tag===3){tx(a,s,h);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(zs===null||!zs.has(m))){s=ol(h,s),s=EI(a,s,1),a=Qs(a,s,1),s=ai(),a!==null&&(fc(a,1,s),vi(a,s));break}}a=a.return}}function W6(s,a,h){var m=s.pingCache;m!==null&&m.delete(a),a=ai(),s.pingedLanes|=s.suspendedLanes&h,Pn===s&&(zn&h)===h&&(wn===4||wn===3&&(zn&130023424)===zn&&500>Qe()-lm?Do(s,0):am|=h),vi(s,a)}function nx(s,a){a===0&&(s.mode&1?(a=Ms,Ms<<=1,!(Ms&130023424)&&(Ms=4194304)):a=1);var h=ai();s=ns(s,a),s!==null&&(fc(s,a,h),vi(s,h))}function j6(s){var a=s.memoizedState,h=0;a!==null&&(h=a.retryLane),nx(s,h)}function Y6(s,a){var h=0;switch(s.tag){case 13:var m=s.stateNode,I=s.memoizedState;I!==null&&(h=I.retryLane);break;case 19:m=s.stateNode;break;default:throw Error(t(314))}m!==null&&m.delete(a),nx(s,h)}var ix;ix=function(s,a,h){if(s!==null)if(s.memoizedProps!==a.pendingProps||Ai.current)gi=!0;else{if(!(s.lanes&h)&&!(a.flags&128))return gi=!1,N6(s,a,h);gi=!!(s.flags&131072)}else gi=!1,en&&a.flags&1048576&&PC(a,Jf,a.index);switch(a.lanes=0,a.tag){case 2:var m=a.type;hh(s,a),s=a.pendingProps;var I=Za(a,jn.current);il(a,h),I=zg(null,a,m,s,I,h);var M=Gg();return a.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,pi(m)?(M=!0,qf(a)):M=!1,a.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Lg(a),I.updater=ih,a.stateNode=I,I._reactInternals=a,Ng(a,m,s,h),a=Kg(null,a,m,!0,M,h)):(a.tag=0,en&&M&&Cg(a),oi(null,a,I,h),a=a.child),a;case 16:m=a.elementType;e:{switch(hh(s,a),s=a.pendingProps,I=m._init,m=I(m._payload),a.type=m,I=a.tag=X6(m),s=or(m,s),I){case 0:a=Xg(null,a,m,s,h);break e;case 1:a=BI(null,a,m,s,h);break e;case 11:a=xI(null,a,m,s,h);break e;case 14:a=SI(null,a,m,or(m.type,s),h);break e}throw Error(t(306,m,""))}return a;case 0:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),Xg(s,a,m,I,h);case 1:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),BI(s,a,m,I,h);case 3:e:{if(RI(a),s===null)throw Error(t(387));m=a.pendingProps,M=a.memoizedState,I=M.element,zC(s,a),nh(a,m,null,h);var P=a.memoizedState;if(m=P.element,M.isDehydrated)if(M={element:m,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},a.updateQueue.baseState=M,a.memoizedState=M,a.flags&256){I=ol(Error(t(423)),a),a=bI(s,a,m,h,I);break e}else if(m!==I){I=ol(Error(t(424)),a),a=bI(s,a,m,h,I);break e}else for(bi=Ns(a.stateNode.containerInfo.firstChild),Ri=a,en=!0,sr=null,h=KC(a,null,m,h),a.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(tl(),m===I){a=rs(s,a,h);break e}oi(s,a,m,h)}a=a.child}return a;case 5:return JC(a),s===null&&Sg(a),m=a.type,I=a.pendingProps,M=s!==null?s.memoizedProps:null,P=I.children,gg(m,I)?P=null:M!==null&&gg(m,M)&&(a.flags|=32),TI(s,a),oi(s,a,P,h),a.child;case 6:return s===null&&Sg(a),null;case 13:return LI(s,a,h);case 4:return Pg(a,a.stateNode.containerInfo),m=a.pendingProps,s===null?a.child=rl(a,null,m,h):oi(s,a,m,h),a.child;case 11:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),xI(s,a,m,I,h);case 7:return oi(s,a,a.pendingProps,h),a.child;case 8:return oi(s,a,a.pendingProps.children,h),a.child;case 12:return oi(s,a,a.pendingProps.children,h),a.child;case 10:e:{if(m=a.type._context,I=a.pendingProps,M=a.memoizedProps,P=I.value,Yt($f,m._currentValue),m._currentValue=P,M!==null)if(rr(M.value,P)){if(M.children===I.children&&!Ai.current){a=rs(s,a,h);break e}}else for(M=a.child,M!==null&&(M.return=a);M!==null;){var W=M.dependencies;if(W!==null){P=M.child;for(var Z=W.firstContext;Z!==null;){if(Z.context===m){if(M.tag===1){Z=is(-1,h&-h),Z.tag=2;var le=M.updateQueue;if(le!==null){le=le.shared;var Ee=le.pending;Ee===null?Z.next=Z:(Z.next=Ee.next,Ee.next=Z),le.pending=Z}}M.lanes|=h,Z=M.alternate,Z!==null&&(Z.lanes|=h),Rg(M.return,h,a),W.lanes|=h;break}Z=Z.next}}else if(M.tag===10)P=M.type===a.type?null:M.child;else if(M.tag===18){if(P=M.return,P===null)throw Error(t(341));P.lanes|=h,W=P.alternate,W!==null&&(W.lanes|=h),Rg(P,h,a),P=M.sibling}else P=M.child;if(P!==null)P.return=M;else for(P=M;P!==null;){if(P===a){P=null;break}if(M=P.sibling,M!==null){M.return=P.return,P=M;break}P=P.return}M=P}oi(s,a,I.children,h),a=a.child}return a;case 9:return I=a.type,m=a.pendingProps.children,il(a,h),I=Gi(I),m=m(I),a.flags|=1,oi(s,a,m,h),a.child;case 14:return m=a.type,I=or(m,a.pendingProps),I=or(m.type,I),SI(s,a,m,I,h);case 15:return wI(s,a,a.type,a.pendingProps,h);case 17:return m=a.type,I=a.pendingProps,I=a.elementType===m?I:or(m,I),hh(s,a),a.tag=1,pi(m)?(s=!0,qf(a)):s=!1,il(a,h),jC(a,m,I),Ng(a,m,I,h),Kg(null,a,m,!0,s,h);case 19:return NI(s,a,h);case 22:return MI(s,a,h)}throw Error(t(156,a.tag))};function rx(s,a){return fe(s,a)}function q6(s,a,h,m){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wi(s,a,h,m){return new q6(s,a,h,m)}function gm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function X6(s){if(typeof s=="function")return gm(s)?1:0;if(s!=null){if(s=s.$$typeof,s===k)return 11;if(s===V)return 14}return 2}function Ws(s,a){var h=s.alternate;return h===null?(h=Wi(s.tag,a,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=a,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&14680064,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,a=s.dependencies,h.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function Ih(s,a,h,m,I,M){var P=2;if(m=s,typeof s=="function")gm(s)&&(P=1);else if(typeof s=="string")P=5;else e:switch(s){case B:return Po(h.children,I,M,a);case L:P=8,I|=8;break;case R:return s=Wi(12,h,a,I|2),s.elementType=R,s.lanes=M,s;case O:return s=Wi(13,h,a,I),s.elementType=O,s.lanes=M,s;case F:return s=Wi(19,h,a,I),s.elementType=F,s.lanes=M,s;case te:return xh(h,I,M,a);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:P=10;break e;case N:P=9;break e;case k:P=11;break e;case V:P=14;break e;case X:P=16,m=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return a=Wi(P,h,a,I),a.elementType=s,a.type=m,a.lanes=M,a}function Po(s,a,h,m){return s=Wi(7,s,m,a),s.lanes=h,s}function xh(s,a,h,m){return s=Wi(22,s,m,a),s.elementType=te,s.lanes=h,s.stateNode={isHidden:!1},s}function mm(s,a,h){return s=Wi(6,s,null,a),s.lanes=h,s}function vm(s,a,h){return a=Wi(4,s.children!==null?s.children:[],s.key,a),a.lanes=h,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function K6(s,a,h,m,I){this.tag=a,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ga(0),this.expirationTimes=Ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ga(0),this.identifierPrefix=m,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function _m(s,a,h,m,I,M,P,W,Z){return s=new K6(s,a,h,W,Z),a===1?(a=1,M===!0&&(a|=8)):a=0,M=Wi(3,null,null,a),s.current=M,M.stateNode=s,M.memoizedState={element:m,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lg(M),s}function J6(s,a,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:m==null?null:""+m,children:s,containerInfo:a,implementation:h}}function sx(s){if(!s)return Us;s=s._reactInternals;e:{if(Kr(s)!==s||s.tag!==1)throw Error(t(170));var a=s;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(pi(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(t(171))}if(s.tag===1){var h=s.type;if(pi(h))return LC(s,h,a)}return a}function ox(s,a,h,m,I,M,P,W,Z){return s=_m(h,m,!0,s,I,M,P,W,Z),s.context=sx(null),h=s.current,m=ai(),I=Hs(h),M=is(m,I),M.callback=a??null,Qs(h,M,I),s.current.lanes=I,fc(s,I,m),vi(s,m),s}function Sh(s,a,h,m){var I=a.current,M=ai(),P=Hs(I);return h=sx(h),a.context===null?a.context=h:a.pendingContext=h,a=is(M,P),a.payload={element:s},m=m===void 0?null:m,m!==null&&(a.callback=m),s=Qs(I,a,P),s!==null&&(cr(s,I,P,M),th(s,I,P)),P}function wh(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function ax(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<a?h:a}}function Em(s,a){ax(s,a),(s=s.alternate)&&ax(s,a)}function Z6(){return null}var lx=typeof reportError=="function"?reportError:function(s){console.error(s)};function ym(s){this._internalRoot=s}Mh.prototype.render=ym.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(t(409));Sh(s,a,null,null)},Mh.prototype.unmount=ym.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;Lo(function(){Sh(null,s,null,null)}),a[Zr]=null}};function Mh(s){this._internalRoot=s}Mh.prototype.unstable_scheduleHydration=function(s){if(s){var a=Vy();s={blockedOn:null,target:s,priority:a};for(var h=0;h<bs.length&&a!==0&&a<bs[h].priority;h++);bs.splice(h,0,s),h===0&&Yy(s)}};function Cm(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Th(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function cx(){}function $6(s,a,h,m,I){if(I){if(typeof m=="function"){var M=m;m=function(){var le=wh(P);M.call(le)}}var P=ox(a,m,s,0,null,!1,!1,"",cx);return s._reactRootContainer=P,s[Zr]=P.current,Sc(s.nodeType===8?s.parentNode:s),Lo(),P}for(;I=s.lastChild;)s.removeChild(I);if(typeof m=="function"){var W=m;m=function(){var le=wh(Z);W.call(le)}}var Z=_m(s,0,!1,null,null,!1,!1,"",cx);return s._reactRootContainer=Z,s[Zr]=Z.current,Sc(s.nodeType===8?s.parentNode:s),Lo(function(){Sh(a,Z,h,m)}),Z}function Bh(s,a,h,m,I){var M=h._reactRootContainer;if(M){var P=M;if(typeof I=="function"){var W=I;I=function(){var Z=wh(P);W.call(Z)}}Sh(a,P,s,I)}else P=$6(h,a,s,I,m);return wh(P)}Gy=function(s){switch(s.tag){case 3:var a=s.stateNode;if(a.current.memoizedState.isDehydrated){var h=An(a.pendingLanes);h!==0&&(jp(a,h|1),vi(a,Qe()),!(Rt&6)&&(cl=Qe()+500,ks()))}break;case 13:Lo(function(){var m=ns(s,1);if(m!==null){var I=ai();cr(m,s,1,I)}}),Em(s,1)}},Yp=function(s){if(s.tag===13){var a=ns(s,134217728);if(a!==null){var h=ai();cr(a,s,134217728,h)}Em(s,134217728)}},Hy=function(s){if(s.tag===13){var a=Hs(s),h=ns(s,a);if(h!==null){var m=ai();cr(h,s,a,m)}Em(s,a)}},Vy=function(){return kt},Wy=function(s,a){var h=kt;try{return kt=s,a()}finally{kt=h}},dt=function(s,a,h){switch(a){case"input":if(it(s,h),a=h.name,h.type==="radio"&&a!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<h.length;a++){var m=h[a];if(m!==s&&m.form===s.form){var I=jf(m);if(!I)throw Error(t(90));oe(m),it(m,I)}}}break;case"textarea":Q(s,h);break;case"select":a=h.value,a!=null&&at(s,!!h.multiple,a,!1)}},qe=dm,pt=Lo;var eN={usingClientEntryPoint:!1,Events:[Tc,Ka,jf,he,we,dm]},Gc={findFiberByHostInstance:xo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},tN={bundleType:Gc.bundleType,version:Gc.version,rendererPackageName:Gc.rendererPackageName,rendererConfig:Gc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=ce(s),s===null?null:s.stateNode},findFiberByHostInstance:Gc.findFiberByHostInstance||Z6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rh.isDisabled&&Rh.supportsFiber)try{di=Rh.inject(tN),Bt=Rh}catch{}}return hi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eN,hi.createPortal=function(s,a){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cm(a))throw Error(t(200));return J6(s,a,null,h)},hi.createRoot=function(s,a){if(!Cm(s))throw Error(t(299));var h=!1,m="",I=lx;return a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onRecoverableError!==void 0&&(I=a.onRecoverableError)),a=_m(s,1,!1,null,null,h,!1,m,I),s[Zr]=a.current,Sc(s.nodeType===8?s.parentNode:s),new ym(a)},hi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=ce(a),s=s===null?null:s.stateNode,s},hi.flushSync=function(s){return Lo(s)},hi.hydrate=function(s,a,h){if(!Th(a))throw Error(t(200));return Bh(null,s,a,!0,h)},hi.hydrateRoot=function(s,a,h){if(!Cm(s))throw Error(t(405));var m=h!=null&&h.hydratedSources||null,I=!1,M="",P=lx;if(h!=null&&(h.unstable_strictMode===!0&&(I=!0),h.identifierPrefix!==void 0&&(M=h.identifierPrefix),h.onRecoverableError!==void 0&&(P=h.onRecoverableError)),a=ox(a,null,s,1,h??null,I,!1,M,P),s[Zr]=a.current,Sc(s),m)for(s=0;s<m.length;s++)h=m[s],I=h._getVersion,I=I(h._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[h,I]:a.mutableSourceEagerHydrationData.push(h,I);return new Mh(a)},hi.render=function(s,a,h){if(!Th(a))throw Error(t(200));return Bh(null,s,a,!1,h)},hi.unmountComponentAtNode=function(s){if(!Th(s))throw Error(t(40));return s._reactRootContainer?(Lo(function(){Bh(null,null,s,!1,function(){s._reactRootContainer=null,s[Zr]=null})}),!0):!1},hi.unstable_batchedUpdates=dm,hi.unstable_renderSubtreeIntoContainer=function(s,a,h,m){if(!Th(h))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return Bh(s,a,h,!1,m)},hi.version="18.2.0-next-9e3b772b8-20220608",hi}function wy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wy)}catch(i){console.error(i)}}wy(),Cy.exports=sD();var oD=Cy.exports,My=oD;Op.createRoot=My.createRoot,Op.hydrateRoot=My.hydrateRoot;class aD{constructor({apiService:e,events:t}){Lt(this,"targetElement");Lt(this,"apiService");Lt(this,"events");Lt(this,"htmlTarget");this.apiService=e,this.events=t}mount(e,t){if(!this.targetElement){const n=t.customId??"dita-3dconfig-element",r=document.getElementById(n);if(!r)throw new Error(`Element not found with id => '${n}' `);this.htmlTarget=r,this.htmlTarget.style.height="100%",this.htmlTarget.style.width="100%",this.targetElement=Op.createRoot(document.getElementById(n))}this.targetElement.render(Hc.createElement(nD,{apiService:this.apiService,events:this.events,sku:e,viewerOnly:t.viewerOnly}))}unmount(){this.targetElement&&(this.targetElement.unmount(),this.targetElement=void 0,this.htmlTarget&&(this.htmlTarget.style.height="0px",this.htmlTarget.style.width="auto"))}}var Hp={exports:{}},za=typeof Reflect=="object"?Reflect:null,Ty=za&&typeof za.apply=="function"?za.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},xf;za&&typeof za.ownKeys=="function"?xf=za.ownKeys:Object.getOwnPropertySymbols?xf=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:xf=function(e){return Object.getOwnPropertyNames(e)};function lD(i){console&&console.warn&&console.warn(i)}var By=Number.isNaN||function(e){return e!==e};function zt(){zt.init.call(this)}Hp.exports=zt,Hp.exports.once=hD,zt.EventEmitter=zt,zt.prototype._events=void 0,zt.prototype._eventsCount=0,zt.prototype._maxListeners=void 0;var Ry=10;function Sf(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(zt,"defaultMaxListeners",{enumerable:!0,get:function(){return Ry},set:function(i){if(typeof i!="number"||i<0||By(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Ry=i}}),zt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},zt.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||By(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function by(i){return i._maxListeners===void 0?zt.defaultMaxListeners:i._maxListeners}zt.prototype.getMaxListeners=function(){return by(this)},zt.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r=e==="error",o=this._events;if(o!==void 0)r=r&&o.error===void 0;else if(!r)return!1;if(r){var l;if(t.length>0&&(l=t[0]),l instanceof Error)throw l;var c=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw c.context=l,c}var f=o[e];if(f===void 0)return!1;if(typeof f=="function")Ty(f,this,t);else for(var u=f.length,d=Uy(f,u),n=0;n<u;++n)Ty(d[n],this,t);return!0};function Ly(i,e,t,n){var r,o,l;if(Sf(t),o=i._events,o===void 0?(o=i._events=Object.create(null),i._eventsCount=0):(o.newListener!==void 0&&(i.emit("newListener",e,t.listener?t.listener:t),o=i._events),l=o[e]),l===void 0)l=o[e]=t,++i._eventsCount;else if(typeof l=="function"?l=o[e]=n?[t,l]:[l,t]:n?l.unshift(t):l.push(t),r=by(i),r>0&&l.length>r&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=i,c.type=e,c.count=l.length,lD(c)}return i}zt.prototype.addListener=function(e,t){return Ly(this,e,t,!1)},zt.prototype.on=zt.prototype.addListener,zt.prototype.prependListener=function(e,t){return Ly(this,e,t,!0)};function cD(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Dy(i,e,t){var n={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},r=cD.bind(n);return r.listener=t,n.wrapFn=r,r}zt.prototype.once=function(e,t){return Sf(t),this.on(e,Dy(this,e,t)),this},zt.prototype.prependOnceListener=function(e,t){return Sf(t),this.prependListener(e,Dy(this,e,t)),this},zt.prototype.removeListener=function(e,t){var n,r,o,l,c;if(Sf(t),r=this._events,r===void 0)return this;if(n=r[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(o=-1,l=n.length-1;l>=0;l--)if(n[l]===t||n[l].listener===t){c=n[l].listener,o=l;break}if(o<0)return this;o===0?n.shift():uD(n,o),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",e,c||t)}return this},zt.prototype.off=zt.prototype.removeListener,zt.prototype.removeAllListeners=function(e){var t,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),l;for(r=0;r<o.length;++r)l=o[r],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function Ny(i,e,t){var n=i._events;if(n===void 0)return[];var r=n[e];return r===void 0?[]:typeof r=="function"?t?[r.listener||r]:[r]:t?fD(r):Uy(r,r.length)}zt.prototype.listeners=function(e){return Ny(this,e,!0)},zt.prototype.rawListeners=function(e){return Ny(this,e,!1)},zt.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):Py.call(i,e)},zt.prototype.listenerCount=Py;function Py(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}zt.prototype.eventNames=function(){return this._eventsCount>0?xf(this._events):[]};function Uy(i,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=i[n];return t}function uD(i,e){for(;e+1<i.length;e++)i[e]=i[e+1];i.pop()}function fD(i){for(var e=new Array(i.length),t=0;t<e.length;++t)e[t]=i[t].listener||i[t];return e}function hD(i,e){return new Promise(function(t,n){function r(l){i.removeListener(e,o),n(l)}function o(){typeof i.removeListener=="function"&&i.removeListener("error",r),t([].slice.call(arguments))}ky(i,e,o,{once:!0}),e!=="error"&&dD(i,r,{once:!0})})}function dD(i,e,t){typeof i.on=="function"&&ky(i,"error",e,t)}function ky(i,e,t,n){if(typeof i.on=="function")n.once?i.once(e,t):i.on(e,t);else if(typeof i.addEventListener=="function")i.addEventListener(e,function r(o){n.once&&i.removeEventListener(e,r),t(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}var AD=Hp.exports;const cc=class cc extends AD.EventEmitter{emitEvent(e,t){Object.keys(cc.EVENTS).includes(e)&&this.emit(cc.EVENTS[e],t)}};Lt(cc,"EVENTS",{onAddToCart:"add-to-cart"});let Vp=cc;const pD={getCartUrl:((Qy=window.Shopify)==null?void 0:Qy.routes.root)+"cart.js",addToCartUrl:((Oy=window.Shopify)==null?void 0:Oy.routes.root)+"cart/add.js"},Fy=Object.freeze(pD);class gD{constructor(e){Lt(this,"config");this.config=e}RequestOptions(e,t){return{method:e,headers:{Accept:"application/json","Content-Type":"application/json"},...e==="POST"&&{body:JSON.stringify(t)}}}async Get(){return(await fetch(this.config.getCartUrl,this.RequestOptions("GET"))).json()}async Post(e){return(await fetch(this.config.addToCartUrl,this.RequestOptions("POST",e||{}))).json()}}const{log:mD,error:vD}=console,_D=(...i)=>{vD("❌ Sprie Error:",...i)},ED="&ui_animations=0&ui_infos=0&ui_stop=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_ar=0&ui_help=0&ui_settings=0&ui_vr=0&ui_fullscreen=0&ui_annotations=0&ui_start=0&",yD={HOST:Br.host,STORE_PREFIX:Br.storePrefix},CD={addToCartUrl:Fy.addToCartUrl,getCartUrl:Fy.getCartUrl};class ID{constructor(){Lt(this,"sdkService");Lt(this,"apiService");Lt(this,"uiService");Lt(this,"events");this.events=new Vp,this.apiService=new hx(new Ys(yD),new gD(CD)),this.uiService=new aD({apiService:this.apiService,events:this.events});const e={apiService:this.apiService,config:Br,log:mD,logErr:_D,metaData:{appVersion:ux,previewUrlPrams:ED,targetClassName:"sprie-embed-element"}};this.sdkService=new dx(e),this.sdkService.Init()}load(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!1,customId:t})}loadViewerOnly(e,t){this.uiService.unmount(),this.uiService.mount(e,{viewerOnly:!0,customId:t})}unload(){this.uiService.unmount()}}window.ditaConfigurator=new ID})();